Skip to main content
May 12, 2011
Question

navigating from mc, back out and back into a different movieclip.

  • May 12, 2011
  • 3 replies
  • 549 views

This must be pretty simple, but im having trouble.

I have a movieClip on the main timeline called mcFlyouts. inside is a flyout button called btnAV which when pressed needs to navigate back out of mcFlyouts and into another movieClip on the main timeline called mc_HomeLayout ---> to frame labeled "audio_fm".

i tried using the following code, but its not doing anything, or even giving me an output error.

this code is inside of mcFlyouts.

btn_AV.addEventListener(MouseEvent.CLICK, btnAV1);
function btnAV1(event:MouseEvent):void
{
MovieClip(parent).mc_HomeLayout.gotoAndStop("audio_fm");
}

any suggestions?

This topic has been closed for replies.

3 replies

Ned Murphy
Legend
May 12, 2011

Just though of something... based on the term you chose... "flyout"...  it sounds like it might be a case where your listeners aren't assigned to the instances that you end up clicking.

kglad
Community Expert
Community Expert
May 12, 2011

use the trace() function to make sure btnAV1 is being called.  if it is, and there are no error messages, the goto target must exist.  it may not be the object you think it is but that's an issue that can't be solved via a forum.

Ned Murphy
Legend
May 12, 2011

If you assign the event listeners and event handler functions to the buttons in the main timeline you shouldn't have any problem targeting it.

Beyond that, what you described for the code you show would seem to be correct.  Maybe you should try tracing some things to make sure they are what you think they are, including just tracing the function to make sure it is executing.