Example 7

This example shows you how to pop up a window, then control the player from this page.

IMPORTANT, IMPORTANT, IMPORTATNT:

You must first pop up the player by performing one of the following:

- Pop up Rave with default playlist.

- Pop up Rave with specific file and start playing immediately.

OR, click the "fullscreen / detach" button within Rave below (the button to the left of the blue info area)

You need to upgrade your Flash Player

- a Ask if Wimpy is ready

- Get info on current track
- Get info on the second track in the playlist.
- Call multiple functions (Syncronous behaviour)

- Get playhead position in seconds
- Get playhead position in percent complete
- Set playhead position to 5 seconds
- Set playhead position to 35 percent complete
- Get load percent
- Get load state
- Get player state
- Get total playlist items
- Get playlist
- Set volume to 40 percent : 100 percent
- Turn Loop Track: "on" : "off"
- Turn Random Playback "on" : "off"
- Turn Repeat Playlist: "on" : "off"
- Turn Mute: "on" : "off"
- Update Artist and Title

Add One Track
Add Multiple Tracks
Clear Playlist
Load and open external playlist

Clear Playlist
Add One Track (and play immediately)
Pause
Play
Stop

Clear Playlist
Add Multiple Tracks
Go to and play the second track in the playlist
Next
Previous

Wimpy Returns:

Track Info will display here

 

We use the same setup as in examples 5 and 6, however, we need to "tack on" the popped up window object to the beginning of each function call:

<a href="javascript:;" onClick="wimpy_popout_window.wimpy_play();">Play </a>

When Wimpy detaches the player or when you use the wimpy_popout(), a new object named "wimpy_popout_window" is created, which allows "this" page to communicate with the popped up page.

Wimpy is also set up so that if a user navigates from "this" page to another page on your site, the popped up player can still be controlled from the other page.

 


©2007 Plaino