A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: HTML/Flash mp3 Player

  1. #1
    Thick as a Brick bobgodwin's Avatar
    Join Date
    Sep 2003
    Location
    Metro Detroit
    Posts
    217

    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
    Last edited by bobgodwin; 01-05-2008 at 05:06 PM.
    Bob Godwin

  2. #2
    Polak Maly ant_Z's Avatar
    Join Date
    Jul 2006
    Location
    Poland
    Posts
    440
    <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.

  3. #3
    Thick as a Brick bobgodwin's Avatar
    Join Date
    Sep 2003
    Location
    Metro Detroit
    Posts
    217
    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.
    Bob Godwin

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center