-
Load swf in to another swf problem... pls help.
Hi there!
I am having a problem about loading a swf in to another swf where this last swf must be loaded in a specific frame.
So far, I can load y.swf into x.swf. But I am trying, without success, to load y.swf into x.swf where y.swf MUST appear in frame, lets say, “end”.
How could I do that?
Thanks.
Leo.
-
FK'n_dog
load y.swf and hide it offstage.
when you reach your target frame, show the swf -
// frame#1 - main timeline
loadMovieNum("y.swf", 1); // loading to a level in this example
this.onEnterFrame = function(){ // loop until the first frame has loaded into _level 1
if(_level1){ // an empty level returns false
_level1._y = 1000; // hide offstage
_level1.stop(); // stop y.swf
this.onEnterFrame = null; // end the loop
}
};
// on frame labelled - end
_level1._y = 0; // show on stage
_level1.play(); // start y.swf
Last edited by a_modified_dog; 02-10-2008 at 01:03 PM.
-
Hi there!
Thanks for ur reply!
Didnt understand much, and i think is because i didnt explain the problem very well either.
Let me try again.. :-)
Have two swfs. One called x.swf (where there is a button and a area where i pretend to load and display the other swf) and y.swf.
So, when the button is pressed in x.swf, in the chosen area i will try to load y.swf but in a certain frame. Since y.swf has lots of frames. I am trying to load y.swf in the frame called "end".
Any idea?
Thanks again.
Cheers.
Leo.
-
FK'n_dog
ahh.. i think i understand what you mean
use the MovieClipLoader class -
PHP Code:
var mc:MovieClip = createEmptyMovieClip("mc", 1);
var mcLoader:MovieClipLoader = new MovieClipLoader();
var mcListener:Object = new Object();
mcLoader.addListener(mcListener);
mcLoader.loadClip("trailer.swf", mc);
mcListener.onLoadInit = function(mc:MovieClip){
mc.gotoAndPlay("end");
};
-
Yeap!
Is something like that!
Gonna try it and will let u know!
THANKS a lot!!
Cheers!
Leo.
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
|