Example 4

You need to upgrade your Flash Player

 

This example loads and opens an external playlist at startup.

As you can see, we've simply over-written the "wimpyApp" variable that was previously defined within rave.js. Since rave.js is loaded in the <head> of this HTML page all the variables are already established and we can change thier value as needed in the <body> portion of this page just before the player gets rendered.

NOTE: One might think to use the wimpy_loadExternalPlaylist or wimpy_appendPlaylist functions immediately after makeWimpyPlayer. Attempting to call these functions will not work because it takes a couple seconds for wimpy to initialize. It is best to use these functions as "user input" functions, where a user has to click on something in order for it to ocur.

The only other alternative would be to use the wimpy_amReady_ask function to check to see if Wimpy is ready to accept function calls. Once wimpy_amReady_ask returns "true" you can use any given function to communicate with Wimpy.

Example Code*

<script language="JavaScript" >
   wimpyApp = "playlist1.xml";
   makeWimpyPlayer();
</script>

 

 

* Be sure to review "Real World Usage"

 

 

©2007 Plaino