I am a beginner in using Flash and Action Scripting.
This is the Scenerio:
I want to control a movieclip that is inside of another movie clip.
I control it from a button component that is inside of a seperate movie clip.
test = button component instance name
test1 = function
test2 = Movieclip instance name
test3 = Movieclip instance name
testbutton = movieclip name where button component is located
I am able to control a movieclip on the main timeline with the following AS 3.0:
test.addEventListener (MouseEvent.CLICK, test1);
function test1(event:MouseEvent):void
{
event.target.root.test2.gotoAndPlay(2);
}
I want to control a movieclip inside MovieClip1.
I tried this:
test.addEventListener (MouseEvent.CLICK, test1);
function test1(event:MouseEvent):void
{
event.target.root.test2.test3.gotoAndPlay(2);
}
The movie loaded fine when I tested but got this error when I pressed the button:
TypeError: Error #1010: A term is undefined and has no properties.
at Untitled_fla::testbutton_26/test1().
Please help!!!!!!!!!