# Explain like you would to a 5 year old

**URL:** <https://forum.kirupa.com/t/explain-like-you-would-to-a-5-year-old/7205>\
**Category:** Uncategorized\
**Created:** [October 25, 2002, 6:12pm UTC](https://forum.kirupa.com/t/explain-like-you-would-to-a-5-year-old/7205 "2002-10-25T18:12:19Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![Neo\_Clone01](https://avatars.discourse-cdn.com/v4/letter/n/a183cd/32.png) [@Neo\_Clone01](https://forum.kirupa.com/u/Neo_Clone01)\
**Post date:** [October 25, 2002, 6:12pm UTC](https://forum.kirupa.com/t/explain-like-you-would-to-a-5-year-old/7205/1 "2002-10-25T18:12:19Z")

</div>

**please speak nooblar, as i will not understand anything else**

anyway im really trying to learn AS, sometimes sh\*t just puzzles me  
i attached an .fla - can someone plz look at it and explain

i generally understand things like addressing the ‘box’ movieclip by typing \_root.box.duplicateMovieClip  
(which will duplicate the instance of the MC)

BUT

i dont get what exactly “boxx” is, what the hell is that? is it possibly the name of the new duplicated movieclip?

and i dont understand what this whole ‘count’ thing is  
i know the random positioning and scaling and alpha, but ive never seen it done with ‘count’

if someone could explain it here thatd be great, if someone wants to make comments in the .fla thatd be better hehe  
thx all

---

<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:** [October 25, 2002, 8:45pm UTC](https://forum.kirupa.com/t/explain-like-you-would-to-a-5-year-old/7205/2 "2002-10-25T20:45:23Z")

</div>

count = number stored in a variable so if you change that number, it will change for all of them so you don’t have to change it on all of them seperately

while (count\<20) = while the number count equals is less than 20, do the following. This only allows 20 blocks on the screen at the same time. Raise or lower the number depending on how many you want.

“boxx”+count = creates a new movie clip with the name boxx and gives it the number that is in count. so if count keeps increasing your boxx clips will be called boxx1, boxx2, boxx3, so forth and so on.

\_root[“boxx”+count].\_something = do this to the newly created clip

count += 1; = add one to count and start over.

---

<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:** [October 25, 2002, 8:51pm UTC](https://forum.kirupa.com/t/explain-like-you-would-to-a-5-year-old/7205/3 "2002-10-25T20:51:55Z")

</div>

boxx is just a new name. You could call it anything, like dupbox, dup, etc…

count is used to do something a certain number of times.

The code says duplicated these boxes while count\<20

the code will go through, duplicate one box, and add “1” to the count, as if to say “okay, I already did that once, and since count doesn’t equal twenty yet, I’ll do it again”.

So, since this thing is creating duplicates, they can’t all have the same name. Makes sense? So, in this particular case boxx is used as the base of the name. Then, we take advantage of the fact that the variable “count” is increasing by one every time it goes through, so we use it as an aid to help us name our duplicates with individual names. Therefore, the first time around it is boxx1(because count equals 1), second time it is boxx2(count equals 2)… so on and so forth…

I hope that helps a bit.

---

<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:** [October 25, 2002, 8:52pm UTC](https://forum.kirupa.com/t/explain-like-you-would-to-a-5-year-old/7205/4 "2002-10-25T20:52:40Z")

</div>

I guess I took too long to reply.

Good call, Lost.

---

<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:** [October 25, 2002, 8:54pm UTC](https://forum.kirupa.com/t/explain-like-you-would-to-a-5-year-old/7205/5 "2002-10-25T20:54:42Z")

</div>

Well if he misunderstands something in my post, I am sure it will make sense in your post 🙂

---

<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:** [October 26, 2002, 12:22am UTC](https://forum.kirupa.com/t/explain-like-you-would-to-a-5-year-old/7205/6 "2002-10-26T00:22:03Z")

</div>

thx alot  
i am learning  
slowly but surely  
u guys are sooooooo helpful

it just baffles me that someone sat down, thought about what they wanted and was able to come up with that AS

ugggh i wish

i may have to ask u guys again on a future fla, cuz that was really helpful

---

<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:** [October 26, 2002, 12:47am UTC](https://forum.kirupa.com/t/explain-like-you-would-to-a-5-year-old/7205/7 "2002-10-26T00:47:17Z")

</div>

one more thing on this…

\_root.box.duplicateMovieClip(“boxx”+count, count);

whats the ,count for at the end?

u said the first part is simply the name of the duplicated MC, but what is the end for?

---

<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:** [October 26, 2002, 2:44am UTC](https://forum.kirupa.com/t/explain-like-you-would-to-a-5-year-old/7205/8 "2002-10-26T02:44:57Z")

</div>

do you know a good site (or do kirupa has tutorials on it?) where i can learn from basic 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:** [October 26, 2002, 2:48am UTC](https://forum.kirupa.com/t/explain-like-you-would-to-a-5-year-old/7205/9 "2002-10-26T02:48:09Z")

</div>

the second count there is the level it loads in. Since all your clips can’t load in the same level, you need to increase it by 1 with each clip… might as well use count since that is increasing by 1 anyway.

Hmmm… I don’t really know any. I stuck with kirupa… seems to be a real good place if you do his basic tutorials for Flash 5 and MX (if you use MX, most of the Flash 5 tutorials do work).

I also go to [www.actionscript.org](http://www.actionscript.org), the tutorials at [www.bit-101.com](http://www.bit-101.com) , but are not basic, and some tutorials at [www.flashkit.com](http://www.flashkit.com) are actually helpful.

I think that is all the sites I go to.

---

<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:** [October 26, 2002, 2:48am UTC](https://forum.kirupa.com/t/explain-like-you-would-to-a-5-year-old/7205/10 "2002-10-26T02:48:42Z")

</div>

nvm i found some AS tutorial on kirupa 😃 but if you do know n e other sites, let me 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:** [October 26, 2002, 2:49am UTC](https://forum.kirupa.com/t/explain-like-you-would-to-a-5-year-old/7205/11 "2002-10-26T02:49:57Z")

</div>

refer above

---

<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:** [October 26, 2002, 2:50am UTC](https://forum.kirupa.com/t/explain-like-you-would-to-a-5-year-old/7205/12 "2002-10-26T02:50:12Z")

</div>

thanx lostinbeta 😃

---

<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:** [October 26, 2002, 2:54am UTC](https://forum.kirupa.com/t/explain-like-you-would-to-a-5-year-old/7205/13 "2002-10-26T02:54:00Z")

</div>

No problem :beam:
