View Full Version : How to make timeline actions of a loaded swf execute
casiopt1
08-22-2009, 10:49 PM
Hi, I've got a little movie player class that loads and plays swfs given a url string.
However, in some of my swf's for example there are Actions on certain frames to stop() certain movieclips. But they aren't getting executed when loaded with my class therefore some of those child clips will keep looping until the movie is over. Is there a way to instruct Flash to execute the timeline actions of a loaded swf?
Can post code if needed...
casiopt1
08-23-2009, 06:02 AM
I really need the answer to this ... wonder why no one has responded? Was my question hard to understand?
The Little Guy
08-23-2009, 07:59 AM
try:
stage.gotoAndStop(stage.currentFrame);
casiopt1
08-23-2009, 04:06 PM
Huh? Thanks but where would that code go? And isn't it just the same as stop()?
I have to add... it's other code, not just stop() that isn't getting executed. There's a bit to set up masking too, like this for example.
m.cacheAsBitmap = true;
colors.cacheAsBitmap = true;
colors.mask = m;
m and colors being named movieclips on the stage in the swf I'm loading.
henke37
08-23-2009, 05:24 PM
Stage does not and have never had any movieclip properties or methods, stop trying to help if you are more confused than the OP.
Loading sub swf files should not affect the execution of them at all, assuming that they are not messing with the stage in the wrong way or there is a same origin policy in the way.
casiopt1
08-23-2009, 06:36 PM
Figured it out, solution is to give the loaded swf's Document Classes.
henke37
08-24-2009, 06:44 AM
Ah, now I get what the real issue was. You had no set class for both of the movies, meaning that Flash generated the document class for you using the default class name. But the name was the same for both movies, meaning that the first definition was applied to both movies. This affected the framescripts becasuse internaly they are part of the timeline classes.
To avoid this issue more generaly, use ApplicationDomain to control how definition conflics are resolved.
|
vBulletin® v3.8.5, Copyright ©2000-2012, Jelsoft Enterprises Ltd.