Hello Flash people, I suspect this is an extremely easy and simple question from a beginner...
I need to make a pop up window effect within a flash movieclip.
I read another discussion where someone got the following advice...
--------------------------
So you want it in actionscript 3?
There are several ways to do it.
One is to pull it out of the library the second is to place it on stage, set it visible = false via actionscript and set it visible = true when you click the button.
popUp.visible = false;
showBtn.addEventListener(MouseEvent.CLICK, ShowPopUP);
function ShowPopUp(e:MouseEvent) {
popUp.visible = true;
}
popUp.hideBtn.addEventListener(MousEvent.CLICK, HidePopUp);
function HidePopUp(e:MouseEvent) {
e.currentTarget.parent.visible = false;
}
This should work if you have the popUp placed on stage and you have, inside it, a button with an instance name "hideBtn". Also, of course you should name you popup window "popUp" and the trigger button "showBtn".
----------------------------------------
So I tried this and but have the following compiler error...
ReferenceError: Error #1065: Variable ShowPopUP is not defined.
at default_fla::MainTimeline/default_fla::frame1()
Thank you for your fast reply Ned, Tried the correction you gave and got a new version of the error...
ReferenceError: Error #1065: Variable MousEvent is not defined.
at default_fla::MainTimeline/default_fla::frame1()
Hello and thank you for your reply!
Your code looks a bit like the there code.. But it seems to be a bit better. The other code also comes
with a com folder and .as files. And I think your code is all inclusive within the .fla.
I like that!
So going to try it now... I will let you know how it goes..
North America
Europe, Middle East and Africa
Asia Pacific