# \[f5\] Hide/show levels?

**URL:** https://forum.kirupa.com/t/f5-hide-show-levels/27673
**Category:** flash
**Created:** [August 5, 2003, 12:01pm UTC](https://forum.kirupa.com/t/f5-hide-show-levels/27673 "2003-08-05T12:01:10Z")
**Posts on this page:** 8
**Page:** 1

<div class="post-metadata">

### Author: ![thorseye](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/thorseye/32/66_2.png) [@thorseye](https://forum.kirupa.com/u/thorseye)
#### Post date: [August 5, 2003, 12:01pm UTC](https://forum.kirupa.com/t/f5-hide-show-levels/27673/1 "2003-08-05T12:01:10Z")

</div>

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:  
[AS]loadMovieNum(“meny.swf”, 10);  
loadMovieNum(“boll.swf”, 11);  
loadMovieNum(“introbild.swf”, 8);[/AS]  
Until a variable is set, I don’t want these three swf’s to be shown. I’ve tried with this script:[AS]  
\_level8.\_visible = false;  
\_level10.\_visible = false;  
\_level11.\_visible = false;[/AS]  
But this doesn’t seem to work. Is there some way to hide a level? Please help! 🙂

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2003, 1:12pm UTC](https://forum.kirupa.com/t/f5-hide-show-levels/27673/2 "2003-08-05T13:12:56Z")

</div>

This should work:[AS]\_level1.\_visible = false;[/AS]

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2003, 1:42pm UTC](https://forum.kirupa.com/t/f5-hide-show-levels/27673/3 "2003-08-05T13:42:18Z")

</div>

Isn’t that exactly the same script I used? I can’t get it to work… ☹

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2003, 2:04pm UTC](https://forum.kirupa.com/t/f5-hide-show-levels/27673/4 "2003-08-05T14:04:17Z")

</div>

:-\ :-\ :-\ …

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!

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2003, 2:12pm UTC](https://forum.kirupa.com/t/f5-hide-show-levels/27673/5 "2003-08-05T14:12:29Z")

</div>

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?

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2003, 4:17pm UTC](https://forum.kirupa.com/t/f5-hide-show-levels/27673/6 "2003-08-05T16:17:44Z")

</div>

> \*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.

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2003, 4:37pm UTC](https://forum.kirupa.com/t/f5-hide-show-levels/27673/7 "2003-08-05T16:37:00Z")

</div>

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;

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [August 5, 2003, 5:10pm UTC](https://forum.kirupa.com/t/f5-hide-show-levels/27673/8 "2003-08-05T17:10:04Z")

</div>

> \*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! 😛

Listen to Sen! He knows! 😉
