A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: loading mp3 from web.

  1. #1
    Member
    Join Date
    Jan 2004
    Location
    Canada, Ontario, toronto
    Posts
    40

    loading mp3 from web.

    Hey guys, I was wondering if someone could tell me how you could go about doing this.

    I have an .swf and 1.mp3 hosted on my website.
    How would I get the swf to load 1.mp3 from the website?

    Thanks alot.

  2. #2
    Junior Member scudsucker's Avatar
    Join Date
    Feb 2003
    Location
    Cape Town, RSA
    Posts
    1,509
    The traditional approach to problems is to look in the flash help before posting a question.

    Nevertheless, if you were to press F1 and do a search for the Sound Object, soon enough you'd find this code:

    Example
    The following example loads an event sound, which cannot play until it is fully loaded:
    code:

    var my_sound:Sound = new Sound();
    my_sound.loadSound("song1.mp3", false);


    The following example loads a streaming sound:
    code:

    var my_sound:Sound = new Sound();
    my_sound.loadSound("song1.mp3", true)


    Hariyemadzisawira nhaka yedu! Down the SCUD and win!
    I'm too lazy to read Private Messages.

  3. #3

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