# Preloader returns infinity

**URL:** <https://forum.kirupa.com/t/preloader-returns-infinity/183433>\
**Category:** flash\
**Created:** [March 27, 2006, 2:01am UTC](https://forum.kirupa.com/t/preloader-returns-infinity/183433 "2006-03-27T02:01:34Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![yujai](https://avatars.discourse-cdn.com/v4/letter/y/ee7513/32.png) [@yujai](https://forum.kirupa.com/u/yujai)\
**Post date:** [March 27, 2006, 2:01am UTC](https://forum.kirupa.com/t/preloader-returns-infinity/183433/1 "2006-03-27T02:01:34Z")

</div>

It’s very weird. The code works fine when test in Flash, but doesnt work when upload to web hosting.

var imageListener:Object = new Object();

imageListener.onLoadProgress = function(target\_mc:MovieClip, loadedBytes:Number, totalBytes:Number){  
target\_mc.loading\_mc.loading\_txt.\_visible = true;  
target\_mc.loading\_mc.loading\_txt.text = this+" : "+Math.floor((loadedBytes/totalBytes)\*100);  
};

imageListener.onLoadInit = function(target\_mc:MovieClip){  
target\_mc.\_parent.\_parent.loading\_mc.loading\_txt.text = “”;  
};

imageListener.onLoadComplete = function(target\_mc:MovieClip){  
target\_mc.\_parent.\_parent.loading\_mc.loading\_txt.text = “”;

var rMoveX = new Tween(target\_mc, “\_x”, Regular.easeInOut, target\_mc , (enl\_xl-target\_mc.\_width), 2, true);

};  
var myLoader:MovieClipLoader = new MovieClipLoader();

# =========================== [http://www.yujai.com/index64.html](http://www.yujai.com/index64.html) Please click “painting” and then click on the thumbnail

Please help!  
Thanks in advancE!
