Flash to make a simple slide menu

Source: Internet
Author: User
Tags insert xdiff
Menu

Let's take a look at the effect: (move the mouse pointer over the three pictures below and click to see the Middle menu slide.) )

Click here to download the source file

1, open Flash, a new document, size set to 480*360, background black. Draw two white lines on the stage, spacing 124px, placing three pictures of the same size below the white line and adjusting the position.

2, the new component menu, the behavior of the selected movie clips, and then insert pictures and text, as shown in the picture.

3, the new component BTN, Action selection button, in the press the frame insert blank key frame, select a rectangular tool, the color of the Strokes selected colorless, fill the color arbitrary, on the stage to draw a rectangle.

4, create a new layer 2, press F11 to open the library panel, drag the component menu to the middle of two white lines in the scene, adjust the position and the left edge of the stage alignment. In the property panel, enter the instance Name menu, select Symbol menu, press F9 to open the Action panel, and enter the statement

Onclipevent (enterframe) {
Xsquare = _root.menu._x;
Xdiff = Xpos-xsquare;
Xmove = XDIFF/10;
_root.menu._x = Xsquare+xmove;
Updateafterevent (Enterframe);
}

5, new layer three, the button components dragged into the scene, placed in the white line below the picture, resize and position just cover the picture, here I placed three pictures, so put three buttons.

6, click to select the first button, press F9 key to open the action panel, enter the statement

On (release) {
_root.menu.xpos = 0;
Enter a statement on the second button
On (release) {
_root.menu.xpos =-480;
}
Enter a statement on the third button
On (release) {
_root.menu.xpos =-960;
}
Test, save the disk.

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.