# Need urgent Help with a script!

**URL:** <https://forum.kirupa.com/t/need-urgent-help-with-a-script/148690>\
**Category:** flash\
**Created:** [May 22, 2005, 5:26pm UTC](https://forum.kirupa.com/t/need-urgent-help-with-a-script/148690 "2005-05-22T17:26:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Appa](https://avatars.discourse-cdn.com/v4/letter/a/b9bd4f/32.png) [@Appa](https://forum.kirupa.com/u/Appa)\
**Post date:** [May 22, 2005, 5:26pm UTC](https://forum.kirupa.com/t/need-urgent-help-with-a-script/148690/1 "2005-05-22T17:26:40Z")

</div>

The following code works well on Internet explorer on windows xp, but not in Firefox (xp) and not in safari. Well, occasionally it works, but sometimes it dont:

function loadMovies(target\_mc:MovieClip, movieName:String) {  
target\_mc.loadMovie(movieName);  
this.onEnterFrame = function() {  
size = target\_mc.getBytesTotal();  
loaded = target\_mc.getBytesLoaded();  
percent = (loaded/size);  
bar\_mc.\_width = percent\*70.0;  
if ((size == loaded) && loaded != undefined) {  
target\_mc.gotoAndPlay(2);  
delete this.onEnterFrame;  
}  
};  
}

It loads a swf file, and when it is finished, it sends that loaded swf to frame 2. But why i am having problems?

Any help would be very lovely! 🙂
