Hello and welcome to our community! Is this your first visit?
Register
Results 1 to 3 of 3

Thread: Action Script

  1. #1
    Veteran Enthusiast

    Join Date
    Jul 2006
    Location
    106 is fumpin', pumpin' up in this hoe, for sho, my bro
    Posts
    7,112

    Action Script

    hey guys.
    I'm a bit stuck with my crappy skills at actionscript, and I need yourses helps.
    I have a button, with the instance name "stop_btn" and one with "play_btn".
    The music I have is playing through a layer in the timeline.

    How would I get the music to stop when the button is clicked. I have tried ( in an actionscript layer)

    Code:
    play_btn.onRelease = function(){
    	play();
    }
    
    stop_btn.onRelease = function(){
    	stop();
    }
    But this only stops the animation, not the music. How do I stop teh music?

    Thanks for anyone/everyones help.
    [center:3mdlh4lx]Fuck you. Cunt.[/center:3mdlh4lx]

  2. #2
    Veteran Enthusiast


    Join Date
    Sep 2005
    Location
    Dorset, England
    Posts
    6,792
    I don't know how to include it in the script but i know that if you write

    Code:
    stopAllSounds();
    That stops all the sounds in the animation/game whatever.


    ...........[img]http://**********.com/img/1215620802.jpg[/img]
    LAZYTOWN FOR THE WIN!
    Quote Originally Posted by silverlucario
    Um... Can you please stop calling Kankuro a clown? It's hurting my feelings

  3. #3
    Veteran Enthusiast

    Join Date
    Jul 2006
    Location
    106 is fumpin', pumpin' up in this hoe, for sho, my bro
    Posts
    7,112
    Yeah, but that only stops the sound.Using that, I don't think there is a way to restart it from the same spot.

    EDIT: Fixed, thanks to Bert.
    [center:3mdlh4lx]Fuck you. Cunt.[/center:3mdlh4lx]


 

Posting Permissions

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