.Swf skips to 3rd frame
I have a 6 frame .swf that is for some reason jumping to the 3rd frame upon loading. This problem occurs in every browser except IE. I'm using AS2. This is the actionscript for the first frame:
stop();
var SKUName = _root.SKUName;
var ProductImage = _root.ProductImage;
var Produc开发者_StackOverflow中文版tPrice = _root.ProductPrice;
var tbValue:String = String(iSize.text);
if(SKUName != undefined) {
gotoAndPlay(6);
} else {
}
The 6th frame just contains a stop();
action.
Any idea of why this is happening?
Thanks for any help. Philip
Maybe you need an preloader - Flash will start to play even before it's fully loaded and this can cause problems.
It looks like your project is AS3 so try to add something like this on your second frame (move everything else behind the second frame):
if (stage.loaderInfo.bytesLoaded < stage.loaderInfo.bytesTotal) {
this.gotoAndPlay(1);
} else {
}
or this will work as well:
this.loaderInfo.addEventListener(Event.COMPLETE, selfComplete);
Try use
gotoAndStop(6);
if u play a frame which include stop(); twice, flash will just compile stop(); or any other script for once
精彩评论