• Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint
Share this Page URL
Help

Lesson 8. Flash Site Architecture > Using a Toggle Variable to Control Loading ...

Using a Toggle Variable to Control Loading Versus Unloading

The problem you now face is that each of the two tutorial buttons needs to toggle the loading and unloading of its respective movie. In other words, a single script needs to determine whether the movie is currently loaded or unloaded, and then perform the opposite action. If you are thinking that another if…else setup would do the job, you're right. Building on the code you have already created, you can put together the following script. The part in black is pseudocode, which I use to indicate what I want to do, even though I am not yet sure how to do it.

					on (release) {
					if (theMovie is unloaded) {
					loadMovie("sim_dsn.swf","container");
					} else {
					unloadMovie("container");
					}
					}
				


PREVIEW

                                                                          

Not a subscriber?

Start A Free Trial


  
  • Creative Edge
  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • PrintPrint