# Have i got the concept of levels right?

**URL:** <https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113>\
**Category:** Uncategorized\
**Created:** [May 17, 2002, 7:04am UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113 "2002-05-17T07:04:35Z")\
**Posts on this page:** 18\
**Page:** 1

<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:** [May 17, 2002, 7:04am UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/1 "2002-05-17T07:04:35Z")

</div>

ok - as a mid-newby now, i’m still hoping (foolishly) to get somewhere without ever having to use loadMovie and levels, as they seem too hard to grasp. at the back of my mind however is the suspicion that i’m going to need them at some point.

ok - levels:

are levels related to the library it is? i.e. if i have a mc in a folder called movie1, which is inside another folder called movies, am i 2 levels deep?

and lastly: which is the good and the bad way to target locations: (\_) or (.)?

thanks

---

<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:** [May 17, 2002, 7:27am UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/2 "2002-05-17T07:27:43Z")

</div>

🙂 … you’re thinking that it’s too hard so it is. I’ve writen a few posts on this… so I do suggest taking a look around at the older posts, especially those in “best of Kirupa”, but these are the basics.

Levels are pretty simple. When you write the code in an html document, to embed a flash player, there is an address in there for an swf on the server.

The embeded player loads this swf into level0. From your words I can tell you right now that that’s all you’ve seen of your own movies.

## Now… the Flash player can also take more movies and display them. It starts with level0 the base movie. If you load something into level1, it is played by the Flash player in a place above level0 physicaly. A movie in level1 will cover the movie in level0 so that you can’t see it there. It’s still there though. The processor is still paying attention to it, it just doesn’t have to display it because it’s displaying things in level1.

## note… that’s a little deceiving because if you have a clear area of the stage in an swf in level1 whatever is below it on level0 will show through to the viewer.

Think of levels as layers of a sort which are not the same as internal layers of a movie, but instead are external layers (very much like html layers) which reside one above another in a stack.

Just to let you know… there will come a time when you will use loadMovieNum(); extensively, and it will be easy to understand. Once I started using and understanding them, I really realized that I couldn’t live without them.

* * *

You’re second question is actually a false notion. The nature of “_" vs “.” is that there is no vs. You use “.” in Flash 5.0 and above. You also use "_” in Flash 5.0 and above. Those are both part of the same naming syntax system for dot notation of location of movie clips.

\_root.myMovieClip.myVariable=something;

in a statement like this, you see both of those notations. The “\_” is used at the beginning of certain Flash words. In this case “\_root” refers to the main timeline… the timeline upon which all other media in your movie opperates. Each period is used to separate elements that you’re refering to in a chain of objects. So the variable called “myVariable” exists inside of the movie clip called “myMovieClip” which in turn exists on the main timeline or the root timeline.

If that’s still not too clear… take a look at my web site [www.centerspin.com](http://www.centerspin.com). gotoAndRead Flash 101: an introduction to Flash. Pay special attention to the paragraph on OOP, but read the whole thing… it should give you a more clear understanding of the notation that we use in Flash.

When you’re done reading that, come back to this post and make a reply to me. I’ll explain loadMovie and loadMovieNum so that you can understand them.

(PS you like that Flash humor in there? gotoAndRead 🙂 )

---

<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:** [May 17, 2002, 10:56am UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/3 "2002-05-17T10:56:44Z")

</div>

you explained levels fabulously!! 😃  
and i’m with it now on the “.” and the “\_” (i program in visual basic, so the notion of symbols in front of objects makes good sense (now that you pointed it out)  
😃

PS flash humour? well, i laughed but had to stopAllSounds because i’m in 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:** [May 17, 2002, 10:58am UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/4 "2002-05-17T10:58:34Z")

</div>

loadMovie and loadMovieNum…  
(shudder)

some people get through life without being able to read and write! can’t i get by without these things?  
😛

ok, just kidding  
ready!

---

<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:** [May 18, 2002, 2:12am UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/5 "2002-05-18T02:12:03Z")

</div>

I doubt it. Just be thankful you’re not into loading php variables yet. Just learning to understand loadMovie is not tough at all.

loadMovie(); is a method which lets you take any swf on the same server as the swf that’s calling for it to load; and load this into a movie clip on the stage.

loadMovieNum(); is a method which let’s you take any swf on the same server as the swf that’s calling for it to load; and load it into a level of the Flash player.

PS… there is a little bit of trickiness with loading an swf into a movie clip. The loaded movie uses it’s upper left corner as a registration point for where it is possitioned. The movie clip you’re loading it into uses it’s centerpoint as a registration point. So, when you do load an swf into a movie clip, some people get confused by the possitioning of the peice. Once you know what’s going to happen a head of time though, it’s easy to compensate for the offset.

---

<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:** [May 19, 2002, 4:11pm UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/6 "2002-05-19T16:11:42Z")

</div>

uh…

you mean loadMovie is for loading separate mc’s? (presumably that’s handy when you have seriously big sites?)

i thought loadMovie was to do with loading one movie clip on (let’s say) release from a button in another mc (that’s why i was asking about levels)

or did i get lost there somewhere? (scratch head)

it’s making vague sense, i just need to see an application for it, i suppose

many thanks, as always  
😃

---

<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:** [May 19, 2002, 4:51pm UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/7 "2002-05-19T16:51:25Z")

</div>

loadMovieNum, loads an swf from your server into a level.

loadMovie, loads an swf from your server into a target movie clip.

---

<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:** [May 19, 2002, 7:48pm UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/8 "2002-05-19T19:48:11Z")

</div>

Also check this : [www.kirupa.com/developer/mx/loading.asp](http://www.kirupa.com/developer/mx/loading.asp)  
and this : [www.kirupa.com/developer/…dmovie.asp](http://www.kirupa.com/developer/flash5/loadmovie.asp)

pom 0]

---

<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:** [May 19, 2002, 7:56pm UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/9 "2002-05-19T19:56:43Z")

</div>

i’ve been using labels in my scenes to landmark my movieclips and then using goTos from buttons in either my scene or other movieclips - and those scenes can get long!!

to make the scene shorter [visually] i wondered briefly if i could place many movieclips in the same frame (say, frame 1) and set their visible property to 0, then making them visible from the buttons as i need them

but i don’t want to start experimenting in the wrong direction - if loadMovie is the way to go

😃

ok - if i use loadMovieNum: am i referencing movieclips by their number?

---

<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:** [May 19, 2002, 8:03pm UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/10 "2002-05-19T20:03:24Z")

</div>

If you want to have all your movie clips on the scene, you’d rather not put them all at the same place and make them invisible. What you could do is make your buttons go to a frame where one of the movies is, is you see what I mean.

\>\> if i use loadMovieNum: am i referencing movieclips by their number?  
No. You’re referencing the \_level by its number. Did you check that tutorial ?

pom 0]

---

<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:** [May 20, 2002, 12:53am UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/11 "2002-05-20T00:53:51Z")

</div>

I agree with POM. You’ll bog down the processor if you have them all in the same frame.

---

<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:** [May 20, 2002, 6:05pm UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/12 "2002-05-20T18:05:48Z")

</div>

i follow your logic now, chaps!

i just read the tutorials (very nicely written, btw) and the thing that struck me was using an empty movie clip! (that concept took some getting used to…)

can i just ask then: is the point of loading movies in this way to save having to download the whole site when you’re visiting? (i.e. to improve performance over bandwidth?)

PS i like the idea of dynamically loading a pic - that’s so useful!! can i do the same with text?

(i’ll have to play with this more over the weekend)

cheers for your time  
🙂  
and for pointing out the tutorials page (i’d missed that previously) (and yes, i know there’s a link to it in the forum… he he…)  
🙂

---

<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:** [May 20, 2002, 8:55pm UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/13 "2002-05-20T20:55:49Z")

</div>

loading text is even easier than loading a pic to tell the truth.

The loading of a movie into a movie clip is exactly for that purpose… to save on download. Let the visitor get through to some of the site, while the rest continues to download streaming into the comp. The advantage to loading them into movie clips, as opposed to levels is that you get a more complete control over the location of the loaded material. You’re not restricted to the upper left corner of the stage, but instead are in the upper left corner of a clip, which you can move around and such using action script.

---

<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:** [May 22, 2002, 2:26pm UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/14 "2002-05-22T14:26:19Z")

</div>

cheers for that

well, i will be [forcing myself] using loadMovie at some point soon then, when i get my first effort underway (i’m re-doing work’s website using my 1 step forward, 2 steps back approach)

🙂

---

<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:** [May 23, 2002, 12:45am UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/15 "2002-05-23T00:45:01Z")

</div>

🙂 good luck to ya. If you’ve got any questions let us know.

---

<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:** [May 30, 2002, 10:27am UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/16 "2002-05-30T10:27:25Z")

</div>

can i export certain mc’s to .sfw so i can then target them using loadMovie? or does flash make a separate .sfw when the mc gets to a certain size?

on(releaseCoffeMug){  
gotoBed(“crypticActionscriptEverywhere”, “tooMuch”);  
headbroken();  
}

🙂

---

<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:** [May 30, 2002, 11:43am UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/17 "2002-05-30T11:43:16Z")

</div>

lol… now you’re scripting like a fellow Narcaleptic.

If you want something to be an swf then you have to open a new movie in Flash, and place what ever you want on that stage. Often times that’s as simple as droping a movie clip from your current work into this new movie… sometimes it’s as complex as copying and pasting frames, and or resetting wayword tweens.

---

<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:** [May 30, 2002, 1:12pm UTC](https://forum.kirupa.com/t/have-i-got-the-concept-of-levels-right/2113/18 "2002-05-30T13:12:43Z")

</div>

of course!  
i just needed to step back a little (the answer was just a matter of logic)

🙂
