![MACROMEDIA FLASH 8-FLASH Скачать руководство пользователя страница 242](http://html2.mh-extra.com/html/macromedia/flash-8-flash/flash-8-flash_tutorials-manual_3348958242.webp)
242 ActionScript: Add Interactivity
Unload the movie clip
After the movie clip plays, you need a way to remove the movie clip from
the Stage when the user goes to Scene 2. You can modify your script for the
goScene_btn to “unload” the movie clip.
1.
In the Timeline, select Frame 1 of the Actions layer.
Then click at the end of the following line of script in the Script pane,
within the function that takes the user to Scene 2, to place the insertion
point:
gotoAndStop("Scene 2", 1);
2.
Press Enter (Windows) or Return (Macintosh) and type the following
script, which unloads the movie clip when the function runs, so that the
movie clip does not continue to play when the user goes to Scene 2:
unloadMovie("trio_mc");
Your entire function for the goScene_btn should appear as follows:
// This script takes user to Scene 2 when goScene_btn
// instance is released.
goScene_btn.onRelease = function() {
gotoAndStop("Scene 2", 1);
unloadMovie("trio_mc");
};
Your entire script should appears as follows:
// Stops the playhead at Frame 1.
stop();
// This script takes user to Scene 2 when goScene_btn
// instance is released.
goScene_btn.onRelease = function (){
gotoAndStop("Scene 2", 1);
unloadMovie("trio_mc");
};
// This function plays trio_mc when attachMovie_btn
// instance is released.
attachMovie_btn.onRelease = function(){
this._parent.attachMovie("MCTrio", "trio_mc", 1);
trio_mc._x = 275;
trio_mc._y = 200;
Содержание FLASH 8-FLASH
Страница 1: ...Flash Tutorials...
Страница 10: ...10 Contents...
Страница 12: ...12 Introduction...
Страница 42: ...42 Basic Tasks Creating a banner Part 1...
Страница 78: ...78 Basic Tasks Creating a banner Part 3...
Страница 88: ...88 Basic Tasks Create Accessible Flash Content...
Страница 106: ...106 Basic Tasks Create an Application...
Страница 116: ...116 Basic Tasks Use Layout Tools...
Страница 124: ...124 Basic Tasks Create Symbols and Instances...
Страница 134: ...134 Basic Tasks Add Button Animation and Navigation...
Страница 144: ...144 Basic Tasks Create a Presentation with Screens Flash Professional Only...
Страница 192: ...192 Creating Graphics Applying Gradients...
Страница 198: ...198 Creating Graphics Apply Graphic Filters and Blends Flash Professional Only...
Страница 224: ...224 ActionScript Use Script Assist mode...
Страница 268: ...268 ActionScript Work with Objects and Classes...
Страница 270: ...270 Data Integration Overview Flash Professional Only...