A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: help with simple play/pause button

Threaded View

  1. #1
    Member
    Join Date
    Apr 2002
    Posts
    81

    help with simple play/pause button

    I'm trying to make a single button both stop and play the movie. (I'm using setInterval to pause the movie at various points.) I'm trying to learn actionscript, so please excuse any terrible errors. (simple example file attached)

    First frame of movie:

    function pause(){
    play();
    clearInterval(timer);
    }
    playing=true;

    if (playing=true){
    playing!=false;
    }
    else if (playing!=true){
    playing=false;
    }

    On the button:

    on (release, keyPress "<Space>"){
    clearInterval(timer);
    if (playing=true){
    stop();
    playing!=true;
    }
    else if (playing=false){
    play();
    }
    }
    Attached Files Attached Files

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