View Full Version : gotoAndPlay will not work in browser
iamvoyager
01-17-2009, 12:45 AM
I am going friggen nuts ...
I am using Flash Professional 8 on an MX 2004 .fla file.
On the 2nd frame, I have inserted the following code:
_root.gotoAndPlay("skipaheadimages");
Frame 162 is labeled "skipaheadimages"
There is no other actionscript ANYWHERE.
It works when I Control->Test Movie. It does NOT work if I load the file into any browser. I have tried renaming the file before uploading, etc. to be sure that this isn't a caching issue.
I've tried _root.gotoAndPlay(162); too, same deal. gotoAndStop() won't work either.
What the heck am I doing wrong?
atomic
01-17-2009, 01:11 AM
Attach your .fla to this forum...
This is my 13000th post... But my unofficial post count is now at 25,139 posts.
iamvoyager
01-17-2009, 02:04 AM
Won't let me attach more than 500kb ...
http://pacamping.com/flash/gotoAndStopDrivingMeCrazy.zip
atomic
01-17-2009, 04:12 AM
Well, it works fine for me on my PC, with IE, FF and Safari for Windows...
iamvoyager
01-17-2009, 04:16 AM
You're sure it is starting at the right spot? It should show a fox, two old folks, and lilly pads from left to right on the initial screen ...?
So weird. I've tested on Linux and Windows....
atomic
01-17-2009, 05:14 AM
No, my bad, you're right!
Tested locally through browsers, and that worked but it obviously doesn't online...
The reason is most likely that this 1.17MBs is streaming in while it loads, and all actionscript will be ignored until the movie is fully loaded...
You would need to stop the movie from playing and add some preloading code, and only have the movie play when it's fully loaded, where if it then encounters some actionscript, the actions will be executed...
But, since you would be adding some preloading code, might as well have the gotoAndPlay action within the preloading code, when the preloading process is done...
iamvoyager
01-17-2009, 05:18 AM
hmm. Well, I thought it might be an issue with the downloading, except that it *should* be cached if I revisit the page, but still doesn't work, AND I actually tried opening in Firefox locally but it didn't work. I don't know. I guess you're right though, I'll try something like that. Thanks :)
atomic
01-17-2009, 05:55 AM
This works for me...
http://oldnewbie.110mb.com/public/iamvoyager/header_jan2009.html
Cleared all layers for the first 2 frames, and added this script on frame 2...
//stop();
this.onEnterFrame = function(){
this.stop();
if(this.getBytesLoaded() >= this.getBytesTotal() && this.getBytesLoaded() > 0){
_root.gotoAndPlay("skipaheadimages");
delete this.onEnterFrame;
}
};
And I re-activated your last frame's script...
_root.gotoAndPlay("reloop");
iamvoyager
01-17-2009, 06:01 AM
Sweet. Thanks so much -- I really appreciate your help and effort :)
Nate
atomic
01-17-2009, 06:20 AM
Grrrrrrrrrrreat! ;)
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.