|
June 3, 2001 Replacing a Movie on the Fly Tips: June 2001
Yehuda Shiran, Ph.D.
|
|
In some of your applications you may need to use Flash movies and JavaScript directly, without any prepackaged APIs such as the FlashSound JavaScript API. You will enjoy more features, methods, and properties, but you'll have to take care of all the tiny details that are taken for granted when using the FlashSound API, for example.
One of those "tiny" details is embedding the Flash object. The JavaScript file LoadMovie() to load a SWF file. The syntax is:
This method loads a given SWF (2nd argument) into the SWF object that the method belongs to. The parameter layerNumber designates the position of the new SWF with respect to other SWFs in the same page area. Set layerNumber to zero to ensure that any old SWFs are deleted before the new SWF is loaded.
In this tip we preload Rewind | Play | Load Movie
Here is the code:
People who read this tip also read these tips: Look for similar tips by subject: |
| ||||||||||||||||||||