Copy link to clipboard
Copied
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...
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.
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
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,
Copy link to clipboard
Copied
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.
Copy link to clipboard
Copied
Ned!!! Thank you !!! Thank you very much
I follow your instruction and it work as what i want. once again, Thank you because you give me another perspective to make this one
Copy link to clipboard
Copied
You're welcome
Find more inspiration, events, and resources on the new Adobe Community
Explore Now