Thanks in advance for the help. I have a quick question:
Instance "MovieClip B" is nested inside "MovieClip_A". In "MovieClip_B", I have the action at key frame 5:
this.removeEventListener(Event.ENTER_FRAME, loop);
to remove the event listener that was added in key frame one of the same movie clip:
this.addEventListener(Event.ENTER_FRAME, loop);
Is there a way for me to remove this event listener in "MovieClip_B" by adding the remove code in its parent keyframe, "MovieClip_A"? I have tried this example in MovieClip_A, but with no luck:
MovieClip_B.removeEventListener(Event.ENTER_FRAME, loop);
Thanks again for the help!
-DJ
Pretty much, MovieClip_A is 2 frames long. Layer 1 contains two actions keyframes and Layer 2 contains MovieClip_B. On the first actions keyframe, there is a "stop();" and on the second keyframe is when I want to remove the event listener that is nested inside MovieClip_B.
In keyframe one in MovieClip_B I have: this.addEventListener(Event.ENTER_FRAME, loop);
In keyframe five I also have: this.removeEventListener(Event.ENTER_FRAME, loop);
I'm looking to do the same action that is in keyframe 5 for MovieClip_B, but do it from its parent movie clip, "MovieClip_A" in keyframe 2. I keep on getting the "Access of unidentified property" error message.
MovieClip_B.removeEventListener(Event.ENTER_FRAME, MovieClip(parent).loop);
try
function activeB():void{
this.addEventListener(Event.ENTER_FRAME, loop);
}
function desactiveB():void{
this.removeEventListener(Event.ENTER_FRAME, loop);
}
from MovieClip_A
MovieClip_B.activeB()
or
MovieClip_B.desactiveB()
North America
Europe, Middle East and Africa
Asia Pacific