A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: external sound

  1. #1
    Member
    Join Date
    Aug 2003
    Posts
    46

    external sound

    My music mp3 file is on a server. I'm using the get url action to access the music file when users click on a button. Is it possible to make it stream while it loads? how?

    otherwise what are my alternatives?

    tks

  2. #2
    There is a Hope
    Join Date
    Apr 2003
    Location
    MK, UK - Only visiting earth!
    Posts
    144
    From Actionscript Dictionary

    Sound.loadSound

    sound, Sound.loadSound, loadSound

    Availability


    Flash Player 6.

    Usage


    mySound.loadSound("url", isStreaming)
    Parameters


    url The location on a server of an MP3 sound file.

    isStreaming A Boolean value that indicates whether the sound is a streaming or event sound.

    Returns


    Nothing.

    Description


    Method; loads an MP3 file into an instance of the Sound object. You can use the isSteaming parameter to indicate whether the sound is an event or a streaming sound.

    Event sounds are completely loaded before they play. They are managed by the ActionScript Sound object and respond to all methods and properties of this object.

    Streaming sounds play while they are downloading. Playback begins when sufficient data has been received to start the decompressor.

    All MP3s (event or streaming) loaded with the Sound.loadSound method are saved in the browser's file cache on the user's system.

    Example


    The following example loads an event sound:

    s.loadSound( "http://serverpath:port/mp3filename", false);
    The following example loads a streaming sound:

    s.loadSound( "http://serverpath:port/mp3filename", true);
    Just set the "isStreaming" to true (Which is actually default I believe)
    Ali_W

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