Skip to main content
December 3, 2015
Answered

How to resume from the current frame

  • December 3, 2015
  • 1 reply
  • 442 views

Hi, everyone...

I have one Flash project and i'm totally newbie...

the first thing i want to build is exit button. when you click this button there will be a pop up that warn you to exit the application. if you click yes you will exit the app but if you click no, the app will continue from the last frame before you click the exit button.

so far, i made this code :

import flash.system.fscommand;

stop();

cncl.addEventListener(MouseEvent.MOUSE_DOWN, cncl); //No_button

function cncl(event:MouseEvent):void {

prevFrame(); // i don't if this right or wrong

ext.addEventListener(MouseEvent.MOUSE_DOWN, ext); //Yes_button

function ext(event:MouseEvent):void {

fscommand("quit");

}


So, basically i just want if you cancel to exit , you back into the app. Anyone, please your help...

This topic has been closed for replies.
Correct answer Ned Murphy

prevFrame will move you back one frame on the timeline.   Based on the description of what you say you want, it sounds like you do not need to move anywhere along the timeline but just need to make the popup go away instead.

1 reply

Ned Murphy
Ned MurphyCorrect answer
Brainiac
December 3, 2015

prevFrame will move you back one frame on the timeline.   Based on the description of what you say you want, it sounds like you do not need to move anywhere along the timeline but just need to make the popup go away instead.

December 3, 2015

How to make this pop up disappear?

Because i made another frame as this pop up, so, when i click the exit button it will bring to this pop up frame.

any suggestion for made pop up without make it in another frame?

Thank you,

Ned Murphy
Brainiac
December 3, 2015

Instead of having it in a particular frame, have it on a layer that extends the length of where you would like it to be able to appear and create it as a movieclip and control its visible property.