Very good flash ease advertising navigation _flash Tutorial

Source: Internet
Author: User
Very good flash ease advertising navigation
Today, the computer to see this effect, and then practice again
First look at the effect:
Create a new flash name casually, size 588*350:

1, the picture you want to put into the library inside.
2, a new MC name for MC1, the picture just dragged in, on the alignment, left-aligned.
3, a new MC name for color with a rectangular tool to drag a color bar width 20 high 350, and then back to mc1 a new layer, the color dragged in is left-aligned, on the alignment.
4, create a new layer on the MC1 to write the text to be displayed.
5, and then create a new layer on the MC1, add a 20*350 button, the instance name is BTN.
6, repeat the above steps to build 5 MC, the name is MC1-MC5 respectively.
As shown in figure:

7, create a new MC new 5 layer put just M1-M5 dragged into the separate layer of the instance name is M0-M5 respectively.
8, write on the first frame:

For (i=0 i<5; i++) {
this["M" +i]._x = _root.my_qlx0[i];
var btnnum = this["M" +I].BTN;
Btnnum.mnum = i;
Btnnum.onrollover = function () {
This._parent._parent.m1.moveto (0.200000, _root["MY_QLX" +this. MNUM][1]);
This._parent._parent.m2.moveto (0.200000, _root["MY_QLX" +this. MNUM][2]);
This._parent._parent.m3.moveto (0.200000, _root["MY_QLX" +this. MNUM][3]);
This._parent._parent.m4.moveto (0.200000, _root["MY_QLX" +this. MNUM][4]);
};
}

9, then drag the MC into the scene and write in the first frame:
MovieClip.prototype.smoothMove = function (sp, TX) {
this._x = this._x+sp* (tx-this._x);//Ease
};
MovieClip.prototype.MoveTo = function (sp, SX) {
this.age = 0;
This.onenterframe = function () {
if (this.age<30) {
This.smoothmove (SP, SX);
} else {
Delete Onenterframe;
}
this.age++;
};
};
Coordinate control
My_qlx0 = [0, 500,522,544,566];//[m1 start position, M2 to right position, M3 to right position]
MY_QLX1 = [0, 22,522,544,566];//when M2 slide to the left the position of each m
MY_QLX2 = [0, 22,44,544,566];//when m2,m3 slide to the left the position of each m
MY_QLX3 = [0, 22,44,66,566];//when m2,m3,m4 slide to the left the position of each m
MY_QLX4 = [0, 22,44,66,88];//when M2,M3,M4,M5 slide to the left the position of each m

10,ctrl+enter test the film.

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.