Home Tutorials Forums Articles Blogs Movies Library Employment Press

Go Back   ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0

Reply
 
Thread Tools Rate Thread Display Modes
Old 11-10-2008, 03:49 PM   #1
Robert.Alvarez
Registered User
 
Join Date: Nov 2008
Posts: 1
Question Control a Nested MovieClip from a button component inside a seperate MovieClip.



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!!!!!!!!!
Robert.Alvarez is offline   Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
MovieClip inside a Button thenuker Other Flash General Questions 2 03-12-2008 09:08 PM
How a button works inside a movieclip that can be Drag and Drop? vadar10 ActionScript 2.0 25 11-10-2007 03:06 AM
Triggering a button INSIDE a movieclip ??? vic76 Components 2 08-18-2006 07:03 PM
button inside movieclip doesnot work esti ActionScript 1.0 (and below) 2 04-16-2006 02:49 AM
Checkbox component inside movieclip...how to click the checkbox? mrand01 ActionScript 2.0 3 04-08-2004 07:52 PM


All times are GMT. The time now is 10:32 AM.

///
Follow actionscriptorg on Twitter

 


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
Ad Management plugin by RedTyger
Copyright 2000-2013 ActionScript.org. All Rights Reserved.
Your use of this site is subject to our Privacy Policy and Terms of Use.