dcsimg
www.webdeveloper.com
Results 1 to 2 of 2

Thread: Internal Flash function to load a new MP3

  1. #1
    Join Date
    Aug 2007
    Posts
    15

    Angry Internal Flash function to load a new MP3

    I am having trouble writing a function to load and play a new mp3 file in flash and I cant find any examples....Any code or links to code would be appreciated - wasted too much time on this already
    Thanks

  2. #2
    Join Date
    Aug 2007
    Posts
    15

    I have this

    function updateSong() {
    var fo = new SWFObject("flash/previewplayer.swf", "mp3player", "300", "350", "8.0.15", "#ffffff", true);
    // need this next line for local testing, it's optional if your swf is on the same domain as your html page
    fo.addParam("allowScriptAccess", "always");
    fo.addVariable("file","flash/test.mp3");
    fo.write("flashcontent");
    }
    I have this function and it working to update, but it creates a new object everytime which is not what I want, I can get my original object via:
    var flashMp3Player;
    function init() {
    if (document.getElementById) {
    flashMp3Player = document.getElementById("mp3player");
    }
    }
    surly I can just update this object:
    flashMp3Player. "load new song" ????????

    Any Ideas

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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



Recent Articles