Workshop Mission Services Portfolio Content Contact
  bookmark me  
Home > Content

(1) (2) (3) (4) (5)

Loading Shockwaves into Shockwave
Another powerful capability of Flash is the ability to load other shockwave animations into an existing shockwave project and have the power to control that file's playback. The 'LoadMovie' action script command makes this possible. For this project I created three separate shockwave animations; tires.swf, interior.swf and roof.swf. Of course, you could have any number of .swf files.

At FRAME 5 I selected the 'Tires' button and added an 'on Mouse event' action, then added a 'gotoAndStop' for FRAME 10. Then I input the 'loadMovie' command. I set the 'URL location' to - tires.swf (I stored my .swf files in the same folder), and then I set my location to - 'Level' - '1' (this loads the .swf file on top of 'Fordstone_Cars.swf which occupies level0). I left the 'variables' menu alone.

Note: When using 'loadMovie' actions make all shockwave movies the same size. My files were 600 x 400. Also, all shockwave animations you load will run at the same speed as the main shockwave file on level0. In my case 12 FPS.

Now when I test my movie, I press the 'Flintstone Coupe' button I jump to FRAME 5 and the 'coupe1' movie clip plays. I then press the 'Tires' button, and jump to FRAME 10 and the 'tires.swf file loads. The 'coupe1' movie clip occupies FRAME 5 only so it disappears.

Note: When using URLs specify an absolute or relative URL for the .swf file you wish to load. Remember, when using in the Flash Player or testing all .swf files must be stored in the same folder and listed as file names without any folder or disk drive specifications.

Action script for 'Tires' button

(1) (2) (3) (4) (5)

 

1.818.509.2649