# \[MX\]bytesLoaded MC Problem

**URL:** https://forum.kirupa.com/t/mx-bytesloaded-mc-problem/105584
**Category:** Uncategorized
**Created:** [March 27, 2004, 6:36pm UTC](https://forum.kirupa.com/t/mx-bytesloaded-mc-problem/105584 "2004-03-27T18:36:03Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![foochuck](https://avatars.discourse-cdn.com/v4/letter/f/dfb087/32.png) [@foochuck](https://forum.kirupa.com/u/foochuck)
#### Post date: [March 27, 2004, 6:36pm UTC](https://forum.kirupa.com/t/mx-bytesloaded-mc-problem/105584/1 "2004-03-27T18:36:03Z")

</div>

I have 2 MCs on my timeline. One is called section\_mc and the other is trans\_mc . section\_mc holds movies that I load into it and trans\_mc is a transition that plays on top of section\_mc after the content is loaded into section\_mc .

From a frame script on my main timeline I have this code:

[AS]  
\_global.homeTimeline = this;  
var section = “home.swf”;  
var secHolder = section\_mc;  
var movieStart = true;

section\_mc.onEnterFrame = function() {  
if (this.getBytesLoaded() == this.getBytesTotal()) {  
if (movieStart) {  
homeTimeline.trans\_mc.gotoAndPlay(“start”);  
}  
}  
}  
[/AS]

On the first frame of my trans\_mc I have this code:

[AS]  
stop();

loadMovie(homeTimeline.section, homeTimeline.secHolder);  
[/AS]

Now this works, but the problem is that sometimes it will work and sometimes it doesn’t - it’s random. Sometimes when I test the site trans\_mc will play and it works fine but other times when I test the site trans\_mc won’t play, so something isn’t working correctly with my onEnterFrame function listed above.

Can anyone help me out with this?

Thanks

Foo
