gotoAndplay in main from external .swf file?

Can it be done?

Can you have a/s in the external swf that runs a ‘gotoAndplay’ in the main movie?
I want the swf to be halfway through when the picture on my main swf changes.

:love: ~ Seretha

(I can’t load the picture in with the external swf because they have to be unloaded at different times and the picture HAS to load on a level under the external swf.)

Sure, after the movie is loaded, just target the _root :slight_smile:

Since when you load a movie, the _root timeline of the loaded movie now becomes the _root timeline of the main movie, all you have to do is use _root to get to the _root timeline of the main movie :stuck_out_tongue:

!?!!?!

Are you saying I can (in the external file) say something similar to _root.gotoAndPlay(5)

and will work?

Wow…i hope that’s what you’re saying [runs off to check it out]

:love:

Yeah, thats what I am saying :slight_smile:

so i’ve added the script…
In last frame of external swf…


_root.gotoAndStop(10)

and when i load my main movie it runs the full external movie and then skips to frame 10 of it and stops, why did it not take the _root of the main movie like it should be?

Works fine for me.

Are you using loadMovie or loadMovieNum?

if loadMovieNum then you need to use _level0 instead of _root, because with loadMovieNum you are loading to levels instead of clips.

Whoo-hoooo!!

I love you Lostinbeta! I changed it to be a loadMovieNum instead with the matching level0 and it works!

You are truly amazing. :love:

I’m glad you’re here at the forums to help us out.

:love: ~ Seretha

LOL, all I helped with was changing _root to _level0… nothing really amazing about that :-\

But thanks =)

sometimes it’s the little things, like a missing . or ; for example that can completely screw up your code. Have a good night, thanks again.

Rev


yup, i have a life

I have a few questionf of myself about this subject. So wat you’re saying LIB is that you have a loadMovie in your file, from that loaded movie you can tell level1 to go to and play a certain frame of the level1 movie? If this is true, I would like to know how to assign a level number to a movie(target)… is it possible?:sigh:

newbieMX:

the levels are already there, you just need to loadmovie into _level10 or whatever and it is there…

There are a bunch of tutorials on this site that show how to use levels…

Rev

ok, well true, i kinda knew that, but i was wondering if you could assign levels to movie clips etc…?

Yes, you can assign movie clips to levels by using swapDepths(), only one movie clip can reside on each level though, so beware.

You have to assign clips to levels when using code like createEmptyMovieClip, attachMovie, duplicateMovieClip, etc. You can’t dynamically put an object on the stage itself, so instead you dynamically add it to a level, so it displays as though it were on the stage… but above everything else (if you start at 1… considering the objects on the stage are actually at level -gazillion [not a real number, but its low]).

And 28, I have no life either…

haha Lost, yours is cooler than mine tho
btw, did you get my pm?

Mine just represents my current mood is all.

And umm… lemme check if I got it.

ya gotta go with the purple anyways…

lol
look what i did to this poor defenseless thread