Pause Button

Discussion in 'Graphics & Multimedia' started by jacobbannier, Jan 3, 2007.

  1. #1
    Hi,
    I have a pause button in Macromedia Flash Pro. 8.
    I wanted to know if there was Action Script which i could impliment which would make it pause on the frame, and then play again if it was clicked again.
    Thanks a lot!
    Jacob.
     
    jacobbannier, Jan 3, 2007 IP
  2. ThemePorter

    ThemePorter Active Member

    Messages:
    203
    Likes Received:
    20
    Best Answers:
    0
    Trophy Points:
    60
    #2
    i could suggest a pseudo code if it helps,

    initialise flag = 0;

    now in d button try this code,

    on press
    {
    if(flag==0) //(this means flag count is even)
    goto and stop at current frame; (get the frame number first)

    if (flag==1)
    goto and play at current frame; (get the frame number first)

    flag++;
    flag = flag%2;
    }
     
    ThemePorter, Jan 5, 2007 IP
    jacobbannier likes this.