When i refresh my page it sticks on the preloader image, and have to play the movie

stop();
//for the rest of the script see "HOME-actions label,PORTFOLIO,CONTACT" embedded movie clips!
//preloader!
loaderInfo.addEventListener(ProgressEvent.PROGRESS, updatePreloader);
function updatePreloader(evtObj:ProgressEvent):void
var percent:Number = Math.floor((evtObj.bytesLoaded*100)/evtObj.bytesTotal);
preloader_txt.text = percent+"%";
if (percent==100) {
  play();
is this due to my script?

captaincainer wrote:
stop();
//for the rest of the script see "HOME-actions label,PORTFOLIO,CONTACT" embedded movie clips!
//preloader!
loaderInfo.addEventListener(ProgressEvent.PROGRESS, updatePreloader);
function updatePreloader(evtObj:ProgressEvent):void
var percent:Number = Math.floor((evtObj.bytesLoaded*100)/evtObj.bytesTotal);
preloader_txt.text = percent+"%";
if (percent==100) {
  play();
is this due to my script?
change last bit to:
if (percent>=100) {
  play();
when refreshing, typically more than 100% is loaded. Sounds silly, but true. In which case, play doesn't happen because percent>100...
That should fix it,
-Ted

Similar Messages

Maybe you are looking for