Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2
  1. #1
    New Coder
    Join Date
    Mar 2008
    Posts
    77
    Thanks
    15
    Thanked 1 Time in 1 Post

    play/pause code isnt cooperating

    Hey all- trying to make a play/pause button here. I assumed the code would be simple.. its all a self contained flash file- no outside files to be called upon or anything like that.. just a simple timeline control. However, the code I'm using works, but not til the SECOND click and i'm not sure why. Any thoughts?

    on(release){
    if(!playing){
    //if NOT playing
    playing = true;
    //playing is set true
    play();
    //play
    }else {
    //otherwise(if playing)
    stop();
    //stop
    playing = false;
    //playing is set false
    }
    }

  • #2
    New Coder
    Join Date
    Mar 2008
    Posts
    77
    Thanks
    15
    Thanked 1 Time in 1 Post
    nvm- forgot to define playing as true in the beginning. looks like it works now. hope i didnt waste anyones time


  •  

    Posting Permissions

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