Flash to make a beautiful courseware exit window

Source: Internet
Author: User
Tags exit

Author: Wang Xiaosu, Anhui buried Hill Middle School

For the convenience of users, there should be a [exit] button in the courseware. To prevent misoperation, however, a dialog box window appears when the button is clicked, allowing the user to choose whether or not to actually exit. In Flash, we can easily make an elegant exit window similar to Windows XP "Turn off the computer" (Figure 1).


Figure 1


Production idea: First make the Dialog box window background panel, then make two buttons, and then add the command.

The production method is as follows:

1. Start Flash MX, select the Insert → new symbol command to open the Create New Symbol dialog box, in the Name box, enter the panel, behavior, select Graphics. Draw a rectangle that fills the appropriate color with the rectangle tool and the paint bucket tool in the scene in the panel. Use the Text tool to enter the text "Exit courseware" in the upper-left corner of the rectangle, and then insert a small picture in the upper-right corner, dotted with a window (Figure 2).


Figure 2


2. Select the insert → new symbol command to open the Create New Symbol dialog box, enter Yes in the Name box, behavior Select button. In the first frame ("bounce") of the button "yes", draw a personalized button shape and press F5 in frame fourth ("click") to insert the frame. Create a new layer, press F6 to insert a keyframe in the second frame ("pointer passes"), and enter the prompt text with the text tool, such as "Click to exit the courseware." Do you really want to quit? "(Figure 3).


Figure 3

3. Make a similar "no" button (you can also take advantage of ready-made buttons in the common library).

4. Create a new movie clip called dialog box, drag the panel graphic symbol from the library and drop it into the scene, create a new layer, drag the button "Yes" and button "no" from the library and drop it over the panel, and adjust the position.

5. Select the button "Yes", press F9 to pull up the action panel, switch to "Expert mode", and add the command:

On (release) {

Fscommand ("Quit", "ture");

}

6. Add the command to the button "no":

On (release) {

gotoAndStop (Currentfame);

SetProperty ("_root.tuichu", _visible, false);

}

7. Return to the main scene, drag the movie Clip dialog box from the library into the scene, in the properties column, set the instance name of the dialog box to "Tuichu" (limited to space, there is nothing else in this example, the Movie Clip dialog box layer should be placed above the other layer in the specific courseware).

8. In order to make the dialog box not appear when not needed, create a new layer, select the first frame to join the command:

SetProperty ("_root.tuichu", _visible, false);

9. Make an "exit" button and put it in the main scene and give the button command:

On (release) {

SetProperty ("_root.tuichu", _visible, True);

SetProperty ("_root.tuichu", _x, 400);

SetProperty ("_root.tuichu", _y, 400);

}

Note: The given command causes the dialog box to appear and sets the location where the dialog box appears, 400 of which can be adjusted appropriately according to the window of the main movie. In this example, the window size of the movie is 800x600.

At this point, quit the Courseware dialog box window finished. Export movie viewing effect.



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.