View Full Version : Popup layers
ctrlP
04-11-2003, 03:48 PM
I am pretty new to Actionscript and am having a problem.
Basically I am creating a movie and I want to include popup "layers". i.e. when the user clicks on a button a layer will popup with text in it and an X icon or close button to close the layer again. In essence, I want it to have the same effect as the show/hide layers function in javascript.
Thanks for any help!
Caimin
04-11-2003, 04:16 PM
How are ya head?
The easiest way is probably to make the the object you want to appear in the pop-up a movie clip, then use the _visible property of the movie clip to make it visible or not.
For example...
1. make your popup into a movie clip, place it on the stage, give it the instance name "popup"
3. put this code on the popup movie clip:
onClipEvent(load){
this._visible = false;
}
2 . put this code on a button on the stage next to the popup movie clip (but not IN the movie clip):
on(release){
popup._visible = true;
}
3. on the X button in your popup movie clip put this code:
on(release){
this._visible = true;
}
4. there's no step 4, that's it.
Hope this helps.
welcome ctrlP!
when the user clicks on a button a layer will popup with text in it and an X icon or close button to close the layer again.
you can create a movie clip that has a close button on it and use the button to call up that movie clip. for example:
on(release){
yourMovieclip._visible=true;
}
and on the close button or x icon inside "yourMovieclip"
on(release){
this._visible=false;
}
sth. like that
Darn!!! :D seemed like i'm a slow typer today. hee hee
ctrlP
04-11-2003, 04:38 PM
Thank you thank you thank you!!!
It has worked for me and I am now very happy- I have been trying to get that done for most of the afternoon!
Thanks for your help
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.