# Laoding into MC with Preloader and animation

**URL:** https://forum.kirupa.com/t/laoding-into-mc-with-preloader-and-animation/15691
**Category:** flash
**Created:** [March 17, 2003, 5:26am UTC](https://forum.kirupa.com/t/laoding-into-mc-with-preloader-and-animation/15691 "2003-03-17T05:26:30Z")
**Posts on this page:** 12
**Page:** 1

<div class="post-metadata">

### Author: ![Dave](https://avatars.discourse-cdn.com/v4/letter/d/ee7513/32.png) [@Dave](https://forum.kirupa.com/u/Dave)
#### Post date: [March 17, 2003, 5:26am UTC](https://forum.kirupa.com/t/laoding-into-mc-with-preloader-and-animation/15691/1 "2003-03-17T05:26:30Z")

</div>

Hey guys!

I have a main move with a mc called “content” where all the externals swf’s are loaded into.

On all my external swf’s i have created an animation and have the follwing actions

FIRST FRAME

bytes\_loaded = Math.round(\_root.getBytesLoaded());  
bytes\_total = Math.round(\_root.getBytesTotal());  
getPercent = bytes\_loaded/bytes\_total;  
\_root.loadBar.\_width = getPercent_100;  
\_root.loadText = Math.round(getPercent_100)+"%";  
if (bytes\_loaded == bytes\_total) {  
gotoAndPlay(4);  
}

SECOND FRAME

gotoAndPlay(1);

Now when i uploaded the files onto the web, when the external content came in, it loaded but no bar or preloading animation was shown.

:chinaman: worked it out!!

---

<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: [March 17, 2003, 6:42am UTC](https://forum.kirupa.com/t/laoding-into-mc-with-preloader-and-animation/15691/2 "2003-03-17T06:42:16Z")

</div>

wait, i know the problem, i have it going back to “root” thats why it doesnt show!!

So should i replace root with parent?

What should i place there instead of root?

:beam:

---

<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: [March 17, 2003, 6:43am UTC](https://forum.kirupa.com/t/laoding-into-mc-with-preloader-and-animation/15691/3 "2003-03-17T06:43:39Z")

</div>

Try \_parent =)

---

<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: [March 17, 2003, 6:50am UTC](https://forum.kirupa.com/t/laoding-into-mc-with-preloader-and-animation/15691/4 "2003-03-17T06:50:40Z")

</div>

no … **\_parent** no !!

use [color=red] **this** [/color] =)

---

<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: [March 17, 2003, 6:51am UTC](https://forum.kirupa.com/t/laoding-into-mc-with-preloader-and-animation/15691/5 "2003-03-17T06:51:25Z")

</div>

haha thanks kax. =)

---

<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: [March 17, 2003, 6:52am UTC](https://forum.kirupa.com/t/laoding-into-mc-with-preloader-and-animation/15691/6 "2003-03-17T06:52:17Z")

</div>

dont worry i got it working!! :trout:

---

<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: [March 17, 2003, 6:52am UTC](https://forum.kirupa.com/t/laoding-into-mc-with-preloader-and-animation/15691/7 "2003-03-17T06:52:26Z")

</div>

haha you’re welcome **eg** 😛 =)

---

<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: [March 17, 2003, 6:53am UTC](https://forum.kirupa.com/t/laoding-into-mc-with-preloader-and-animation/15691/8 "2003-03-17T06:53:19Z")

</div>

> dont worry i got it working!! :trout:

glad you worked it out 😉

---

<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: [March 17, 2003, 6:53am UTC](https://forum.kirupa.com/t/laoding-into-mc-with-preloader-and-animation/15691/9 "2003-03-17T06:53:36Z")

</div>

Kax use wat?

there is no link 😛

thanks for help anyway guys, it was my stupid mistake!!

---

<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: [March 17, 2003, 6:54am UTC](https://forum.kirupa.com/t/laoding-into-mc-with-preloader-and-animation/15691/10 "2003-03-17T06:54:55Z")

</div>

i know there’s no link 😛

i told you to replace **\_root** with **this**

---

<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: [March 17, 2003, 6:55am UTC](https://forum.kirupa.com/t/laoding-into-mc-with-preloader-and-animation/15691/11 "2003-03-17T06:55:58Z")

</div>

oohhhhhh! 😛

i must be running really slow today!!

I know for next time 😉

---

<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: [March 17, 2003, 6:57am UTC](https://forum.kirupa.com/t/laoding-into-mc-with-preloader-and-animation/15691/12 "2003-03-17T06:57:41Z")

</div>

> [size=4] **this** [/size]

**Availability**

Flash Player 5.

**Usage**

this

**Description**

Keyword; references an object or movie clip instance. When a script executes, this references the movie clip instance that contains the script. When a method is called, this contains a reference to the object that contains the called method.

Inside an on event handler action attached to a button, this refers to the Timeline that contains the button. Inside an onClipEvent event handler action attached to a movie clip, this refers to the Timeline of the movie clip itself.
