dcsimg
A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: mySound.loadSound()

  1. #1
    Senior Member
    Join Date
    May 2004
    Location
    usa
    Posts
    132

    mySound.loadSound()

    Is there a way to delay the playing of an mp3 file being loaded using the loadSound()?

    here is part of my code:

    _global.goAudio = function() {
    mySound = new Sound();
    //static value to set volume. will come from session setup page
    mySound.setVolume(100);
    mySound.loadSound(_global.fpath+_global.audFile, true);
    mySound.onSoundComplete = nextAudio;
    mySound.start();
    };

    onSoundComplete I'm calling another function that iterates over an array holding mp3 file names so as to play the next file in the array. They play just fine, but I want a bit of a delay before the play. Can anyone help?

    Thank you,

  2. #2
    Rainy Day Member eightamrock's Avatar
    Join Date
    Jun 2003
    Location
    Neshanic Station NJ
    Posts
    303

    Re: mySound.loadSound()

    Originally posted by bluntmonk40
    Is there a way to delay the playing of an mp3 file being loaded using the loadSound()?

    here is part of my code:

    _global.goAudio = function() {
    mySound = new Sound();
    //static value to set volume. will come from session setup page
    mySound.setVolume(100);
    mySound.loadSound(_global.fpath+_global.audFile, true);
    mySound.onSoundComplete = nextAudio;
    mySound.start(2,0);
    };

    onSoundComplete I'm calling another function that iterates over an array holding mp3 file names so as to play the next file in the array. They play just fine, but I want a bit of a delay before the play. Can anyone help?

    Thank you,

    This will give you an offset calculated by seconds in this case 2 seconds is what I have there. for your reference you can also loop however many times as well the arguments are like this.

    mySound.start('offset in seconds','loops');

    Cheers
    Last edited by eightamrock; 03-01-2005 at 08:18 PM.
    "Shhhhh I have insomnia and Im trying to sleep it off."

  3. #3
    Senior Member
    Join Date
    May 2004
    Location
    usa
    Posts
    132
    first of all, thank you for taking the time to reply to my post.

    All mySound.start(2,0) does, is step me into the sound file 2 seconds, it doesn't provide any sort of delay.

    Any other suggestions?

    Thank you,

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