Targeting a framelabel in a .swf

im wondering if any of u guys know how u target a certain framelabel on “loadmovie”. i got these buttons that loads an .swf, and i want to go to different frames on the different buttons…

ex: button 1 loads the .swf and goes to frame1,
button 2 loads the same .swf and goes to frame20
button 3 loads the same .swf and goes to frame30
etc etc


the quotes are important. is this what you meant?

hmm i think so… but i couldnt get it to work…this is what i got now on the button:

on (release) {
&nbsp &nbsp &nbsp &nbsp loadMovieNum (“preloader.swf”, 3);

so were do i put in the:


oh, and you want the loaded movie to go to particular frames under particular cirumstances. ok, here’s a method:

set a variable in the main timeline (probably with the same button action):

frametarg = 20;

and then in the first frame of the movie you’re loading:


in this case it’s important not to put quotes, since your referencing a variable rather than a string.

well i put this on the button:

on (release) {
_ _ _ _ loadMovieNum (“preloader.swf”, 3);
_ _ _ _ frametarg = 30;

and this on the MC´s 1st frame i had:


i couldnt get it to work… i even tried with:

setframetarg = 30;

u think u could explain why i put in:


on the first frame in the loaded MC ? is it becouse it should act like a reference spot of were the: _level0 is ?

it would be really helpful if u or anybody else could type in the exact code of what i should put on the buttons and other places…

i really need to solve this asap and i am grateful for your help!

also if u or someboby else know another way pls post it!

YES!!! i solved it by preloading the MC with the main movie…
i have a stop action on its first frame so u cant see it…
the i just put in:

on (release) {
&nbsp &nbsp &nbsp &nbsp tellTarget ("_level3") {
&nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp &nbsp gotoAndPlay (“news”);
&nbsp &nbsp &nbsp &nbsp }

etc etc on each button… :slight_smile: tnx anyway man !

_level0 refers to the movie in level 0. it’s important to use the compete path to variables or flash can’t find them.

“frametarg” was arbitrarily chosen, you could have called it “howard” and it work just as well.

perhaps in the button put the variable in to _level0 explicitly:

_level0.howard = 20;

if you button was in a movie, that would explain why it’s not working. if you added the path to the movie when you reference it from the loaded clip, it would also solve this problem ie:


don’t do both though! ; )

i think perhaps i don’t quite understand what you’re trying to do. which movie do you want to go to frame “howard”?

we cross posted, congrats!!

you could also write:


hey, how did you get your code to format like you did?

hehe :slight_smile:

waddaya mean with “code to format” ?

every time i indent code, this message board removes all the whitespace and it’s all up against the left margin.

how did you make your indents stick?

thanks in advance!

hey suprabeener,
I too have found that problem, and it is quite annoying. I type the code in NotePad, and then I paste the code into ezboard. Notepad does a great job of adding spaces instead of indent marks so the code is indented properly. Luckily for us, Flash doesn’t really care about the spaces and indents the code accordingly in the Actions window!

i just pasted it in here directly after copying it in flash…
ctrl+c and then i pasted it with ctrl+v