Flash hand to make a suspended label

Source: Internet
Author: User

Demo Effect:

The role of the suspension label everyone may know: the role of explanation, we can see in many parts of the computer, this time we use flash to make a suspension tag.

Step1: Prepare six icons, convert them to button, instance name B1,b2,b3,b4,b5,b6.
OK, now let's do the tag:

Draw a rectangle with a rectangular tool without a border, choose the color yellow bar, press F8 to convert to movie clip, instance named Cap.

Double-click into edit state, create a new layer, then do a dynamic text box: width:100,heigth:15, Color black, instance named Desc, return to the main movie.

Step2: Create a new layer on the main movie and put the action script:

B1.onrollover = function () {
CAPTIONFN (True, "Button1", this);
This.onrollout = function () {
CAPTIONFN (FALSE);
};
};
B2.onrollover = function () {
CAPTIONFN (True, "Button2", this);
This.onrollout = function () {
CAPTIONFN (FALSE);
};
};
B3.onrollover = function () {
CAPTIONFN (True, "Button3", this);
This.onrollout = function () {
CAPTIONFN (FALSE);
};
};
B4.onrollover = function () {
CAPTIONFN (True, "Button4", this);
This.onrollout = function () {
CAPTIONFN (FALSE);
};
};
B5.onrollover = function () {
CAPTIONFN (True, "Button5", this);
This.onrollout = function () {
CAPTIONFN (FALSE);
};
};
B6.onrollover = function () {
CAPTIONFN (True, "Button6", this);
This.onrollout = function () {
CAPTIONFN (FALSE);
};
};
CAPTIONFN = function (Showcaption, CaptionText, bname) {
if (showcaption) {
_root.createemptymovieclip ("Hovercaption", this.getnexthighestdepth ());
Cap.desc.text = CaptionText;
Cap._width = 7*cap.desc.text.length;
Cap._alpha = 75;
//
if ((bname._width+bname._x+cap._width) >stage.width) {
XO = -2-cap._width;
yo =-17;
} else {
XO = 2;
yo =-17;
}
Hovercaption.onenterframe = function () {
cap._x = _root._xmouse+xo;
cap._y = _root._ymouse+yo;
Cap._visible = true;
};
} else {
Delete Hovercaption.onenterframe;
Cap._visible = false;
}
};

Ok,ctr+enter



Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.