Button actions on a loadmovie

so i have a flash movie where i have loaded a different movie wich has buttons inside it, so what kind of gotoandplay actions should i put on the buttons so it uses the command on the flash movie where i have loaded the buttons movie to… ?

did anyone understand what i mean? :smiley:

nope :slight_smile:

I understood:),
you have to use relative targetting, i’ll try to draw you an example:

“main_mc” |
-------------L “loaded_mc” |
------------------------------L “button1”
------------------------------L “button2”

to make something happen on the main_mc by clicking button 2 you’d have to refer to it relatively like this:

button2.onRelease = function(){
   this._parent._parent.gotoAndPlay("someframe")
}

that would tell main_mc to play “someframe”:slight_smile:

I understood too but it would be nice to have it clarified to be able to target (no pun intended) the problem. :wink:

why doesnt it work… i might be so noob that im doing it wrong :x
i have to put the script in the “main_mc” first frame and give the button in the loadable mc a instance name of button2 ?

can you please describe in detail what you want to do and how your file is set up?

or post your code or your fla

okay. so i have a movie called sivu.fla and a nother movie called main.fla
so in the firt keyframe of the sivu.fla i have the following code: loadMovie(“main.swf”, “lataus”); and it loads the movie “main” into the movie “sivu” and the movie “main” have tree buttons inside it, and id like to get it work so that when you press on “button2” so it would jump in the movie “sivu” to frame 2.

lol i suck doing things clean.
you understand now? next time ill post the .fla´s :stuck_out_tongue:

If main is getting loaded into sivu then sivu becomes _root. So all you have to do to get to frame 2 of sivu is

on(release){ _root.gotoAndPlay(2);}

omg. it works now, i tryed that earlier and it didnt work so i posted this topic here…like i sayd “lol i suck doing things clean.” thats true, i had a different main.swf in the same folder as the sivu were in and the one “real” “main” were in a different folder and hohoho i am such an idiot.
well thank you guys a lot for the trouble^^

try to do i relativly though as the _root can casue you issues if you open it by it’self