[FMX] Really easy question, Don't know the answer!

The buttons i am using are inside of a movie clip.

Is your “clip” movie clip inside the same movie clip? If so then try getting rid of _root and replacing it with _parent or just getting rid of it altogether.

_root targets the main timeline

_parent targets the timeline before the one the current movie clip is in

Here is what happens, the first time i hit the button, it does ok, and goes to frame 5, but then the second time i hit it, and want it to open a swf, it goes all the way back to frame 1( desired effect is for the frame to stay at 5 and for the button to open swf’s)

I tried the _parent thing, nothing. But thanks for trying…

Target your variable as _parent.nFlag or _root.nFlag instead of just nFlag.

Do you see my previous AS? look at the first _root.play, what is negating that action? Is that what keeps telling the frame to go up one?

It worked!!! it works perfectly! :bounce: :beam: Thanks for all the help! Calling the variable (nFlag) from _root. is what made everything connect and work. I never would have seen that. Good Stuff! Keep it up!

Yeah, that is it because everytime you release it says to play the _root timeline.

Assuming you have the nFlag variable on Frame 1 of the same timeline your button is in (and also the “clip” is in the same timeline too)… try this…

on (release) {
	if (_parent.nFlag == true) {
		_parent.play();
		_parent.nFlag = false;
	} else {
		_parent.clip.loadMovie("inout.swf");
	}
}

Oh ok… you fixed it.

Congrats :slight_smile:

I am using a menu system, how can i make it so that one menu does not stick around while another is open? Can you explain it?

Depends on how your menu system works.

It is 3 animated buttons in an MC with the first clip empty. It runs on a button which is on the main timeline, that button, when rolled over, has a _root.play to activate the animated menu. when two or more are put together, they overlap, or don’t go together too well, how can i fix this?

Have an on(rollOut) on the button and target it to play an out animation.

what do you mean by out animation?

Sorry, I am very tired, it is 2:30am here.

You say you have it play() on(rollOver) right? And this activates your menu.

Well if when you rollOver another menu it overlaps, then perhaps adding an on(rollOut) to your button can activate an out animation.

So like you have it play() the in animation until it hits a stop action. Then after that stop action comes the out animation to and you target that on rollOut.

So

rollOver - play in
rollOut - play out

Now that I am thinking about it, I am not sure this makes sense.

I really have to get to bed now :frowning:

get some rest man, that makes no sense, try again tommorrow :crazy:

Goodnight :hangover:

Alright, back to my question…:bounce:

anyone have a solution?

Ok, time to see if I am understanding correctly.

Please check the .fla file :slight_smile:

on (rollOver) {
_root.closedmenu.menuA.play();
}
//button on main timeline

The MC menu it activates ends at frame 13