-
HTML/Flash mp3 Player
I Wanted a really simple mp3 player to ues as a link from other sites (MySpace, blogs, groups, etc.) I made a small .swf with action script on each frame to call up the .mp3. I use this code in an .html doc to run the .swf:
<a href="javascript:;" onclick="window.document.snd_hifi.GotoFrame(2);">S ong 1</a>
Works great as a popup player, but looks O.K. in a open window too.
The .html navigation moves everything up a frame. GotoFrame(1) in the .html goes to Frame 2 in the .swf and so on. When I change the Key Frame names, it doesn't work. The .html won't call up the new names for some reason.
Only Song 9 works in this example (They all work in the online example). Change the .fun file to make the rest work.
Popup Players
KoolMoves Player
-
<a href="javascript:;" onclick="window.document.snd_hifi.GotoFrame(2);">S ong 1</a>
try href="javascript:void();" - some older browsers may have problems with your link.
maybe try GotoFrame('framename'); ?
a long time ago ive tried to make a html link to key frame in flash, using PHP $_GET array, but it seemed to dont work. You can try that way; when ill find the code ill post it.
-
The "void()" works, but causes a script error to popup. "GotoFrame" goes to a frame number, no matter what it is named. I tried ("framename") and all the variations, with more errors. But you can make a 100 frame .swf with code for a different song on each and change the code in the .html to call up the right frame. Makes for simple editing of song links.