-
Removing/hidding a MC permentally
Hi, I'm wanting to remove/hide a mc permentally. I though visible = false would hid it but when you go forward a frame and then back a frame the mc is back.
Code:
function pickupKey(evt:MouseEvent):void
{
gotKey = true;
door_key.visible = false;
removeChild(door_key)
}
Thanks,
-
i know it's a very kludgy solution, but you can do this:
Code:
door_key.x = -30000
-
When you are comming back to the frame, it restarts it completely, if you have there a code which puts the mc on the stage or mc is putted by defaut, then it will be there again.
--
there is a place for those who dare to dream...
Flash Developer
VISTAPARK GMBH
BÄRENSTRASSE 11-13
D-42117 WUPPERTAL
-
sounds like the script is being initialized each time that frame is reached, is the script on the Frame?
sounds like you should set up a condition to check if the key has been retrieved.
if retrieved = true. don't run that script.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|