-
[MX04] Manipulating loaded .swfs from host .swf?
Hey all.
I have a host .swf which loads 4 smaller .swf files at startup. These files play and loop indefinitely. They're each loaded into different movie clip instances, so that I can add masks/modify colors/toy with their transparency. What I'm trying to do is have a loaded .swf file start over from the first frame when it is clicked, but I'm running into trouble directing them to do so from the host .swf.
I've been able to restart the loaded .swfs by reloading them via loadMovie(), but this causes the .swf to disappear for a few seconds as it loads again, which is unacceptable.
Does anyone have any ideas? Thanks much in advance.
-
FK'n_dog
use the instance name of the clip that loads the external movie -
if you have -
holder1.loadMovie("ext1.swf");
to control ext1.swf, use -
holder1.gotoAndPlay(1);
hth
-
Thank you! That works. Though admittedly I'm still having problems; the loaded .swfs consist entirely of scripted tweens of externally loaded images. I'm realizing that it's not adequate to have a blank, unscripted frame to gotoAndPlay() to, since that has the loaded .swf become blank momentarily, and also seems to cause occasional errors with the Tweens. So, I suppose what I need to ask now is: is there a simple way to reset all the tweens in a frame? And if so, can I do it from a host .swf?
Thanks again. I apologize for my extraordinarily sluggish response.
-
FK'n_dog
you could place all of the scripted tweens in a global function -
_global.init = function(){
// your code
}
as the function is global it is open to all scopes of the player session,
so you can activate the function from any timeline with -
init();
hth ??
-
Thank you very much! This appears to be exactly the code I need. Though admittedly I still have to struggle through the tangled mess of tweens and dynamic loading I've assembled. I'll see if I can get it to work.
Thanks again!
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|