I've built a website for my music and I'm fairly new to all this so bear with me.
Essentially, I have two flash-based music players on my site. One is a simple single-track player that auto-plays some background music for the site. The functionality is limited to the user starting/stopping the music and adjusting the volume. The other is an advanced music player featuring a playlist of preselected tracks and allows the user to start/stop music, rewind, fast forward, adjust volume and select tracks in the playlist. This player does not start automatically.
My question is this: when someone visits the site, the single-track background music player will start. Is there code that would allow the advanced music player, should it be turned on (i.e. someone selects a track and plays it), to override and actually stop the play of the single-track?
Is there code that would allow the advanced music player
That depends entirely on your players. Nobody can tell you if it's possible just from this. Well okay, maybe Chuck Norris would....
But the point is - if it is possible, then it's your players that will allow it to be possible.
You need an event in your "advanced" player that can fire up a function when triggered (song starts playing). And then you need an API on your background-playing player that will allow you to execute a pause.
And what's TIA?
Last edited by 3Nex; 12-31-2011 at 06:36 PM.
i love easter eggs
(if you got any creative easter eggs, send me a PM)
That depends entirely on your players. Nobody can tell you if it's possible just from this. Well okay, maybe Chuck Norris would....
But the point is - if it is possible, then it's your players that will allow it to be possible. And what's TIA?
Yes, Chuck Norris can do anything! "TIA" stands for "Thanks In Advance".
The players I have are very simple, downloaded from this site: http://flash-mp3-player.net/. I have the two .swf files but I have no idea how to open/read/manipulate them (if such a thing is even possible), I only know how to reference them in the site code to make the player work properly on the website.
Here is the code for the advanced player (the one I'd need to do the overriding):
You need an event in your "advanced" player that can fire up a function when triggered (song starts playing). And then you need an API on your background-playing player that will allow you to execute a pause.
No clue what an "event" or an "API" is or how to create one. Any help you could provide in that area or point me in the right direction would be much appreciated!
It says there's a parameter listener, which is "The javascript listener waiting for the flash events". So i guess you should pass a function name as a parameter called listener, and then in that function you should read what parameter you get to determine which event happened.
Then if the event is that the song started playing (in the advanced player of course), you would execute this on the other player:
method: pause "Pauses the track."
I'm too lazy to try it out, but play with it enough and you'll figure it out i guess.
i love easter eggs
(if you got any creative easter eggs, send me a PM)
Bookmarks