A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: [F8] sound / restart

  1. #1
    Junior Member
    Join Date
    Apr 2008

    [F8] sound / restart

    Hi, i'm nt too good with actionscript so i was wondering if any1 could help me, as i'm stuck with two bits of script.

    The first problem i'm having is with the start / stopping of sound, as i currently understand how to start / stop individual sounds within a flash file, but is there a way to create two buttons one to start and one to stop all of the different sounds within a flash file ? ? ?

    The 2nd problem is i can get my file 2 restart, as in loop back to the begining of the time line, however is there a script where i can completley reload the movie, as if i was just opening it ? ? ?

    Any help welcome, thanks

  2. #2
    Junior Member
    Join Date
    Mar 2008

    Hope this helps....

    PHP Code:
    var xx = new Sound();
    xx.attachSound("what ever your sound is"); 
    This creates a new variable called "xx" and attaches a sound to it...

    Do this for all your sounds... ie. sound 1 attached to variable xx, sound 2 attached to variable yy....

    then on your "on" button....

    PHP Code:
    on (release){

    this starts xx and yy sounds from the start.

    on your off button.....

    PHP Code:
    on (release){

    this will stop xx and yy sounds....

    Hope this helps and is what u are looking for.

    If u need to pause the sound and restart from where it stopped just let me know

  3. #3
    Junior Member
    Join Date
    Apr 2008


    Cheers for that, al try it out soon, and let you know how it went

  4. #4
    Senior Member inder_s2010's Avatar
    Join Date
    Apr 2004
    don't no

    Better Idea

    better idea is to use setVolume and set the volume of root clip

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