PDA

View Full Version : [f5] Hide/show levels?



thorseye
August 5th, 2003, 08:01 AM
I've tried to find something that could help me by searching the forum, but I can't really find what I need. I've got a main fla, which I load 3 swf's into. This is done by this script in the first frame:
loadMovieNum("meny.swf", 10);
loadMovieNum("boll.swf", 11);
loadMovieNum("introbild.swf", 8);
Until a variable is set, I don't want these three swf's to be shown. I've tried with this script:
_level8._visible = false;
_level10._visible = false;
_level11._visible = false;
But this doesn't seem to work. Is there some way to hide a level? Please help! :)

claudio
August 5th, 2003, 09:12 AM
This should work:_level1._visible = false;

thorseye
August 5th, 2003, 09:42 AM
Isn't that exactly the same script I used? I can't get it to work... :(

andr.in
August 5th, 2003, 10:04 AM
:-\ :-\ :-\ ...

If there really ain't any way of doing it then you could always createEmptyMovieClip(); and load the movies into them and then hide the movieclips!

thorseye
August 5th, 2003, 10:12 AM
Syko, I don't think I can do that, because all the buttons and mc's are linked to i.e. _level10.someMC._dosomething. If I put the movies inside a movieclip I would have to change all the buttons and mc's, wouldn't I? Like _level10.myNewMC.someMC._dosomething. Am I right or wrong?

claudio
August 5th, 2003, 12:17 PM
Originally posted by thorseye
Isn't that exactly the same script I used? I can't get it to work... :( Yes its the same script and it works.
But if you set level3 visibility to false, and later you load a movie into that level, it becomes visible.

senocular
August 5th, 2003, 12:37 PM
levels dont exist until something are loaded into them. If you call a loadMovie in the first frame and then immediately try to turn off the visibility of whatever level you just tried to load something into, nothing will happen since the level still doesnt exist. You have to wait until something is within the level so Flash can recognise there being a level before you can alter any of its characteristics such as visibility. This is simply a matter of having some frame loop check for something if (_level1) _level1._visible = false;

andr.in
August 5th, 2003, 01:10 PM
Originally posted by thorseye
Syko, I don't think I can do that, because all the buttons and mc's are linked to i.e. _level10.someMC._dosomething.
I didn't know that : P! :P


Listen to Sen! He knows! ;)