Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 04-27-2012, 11:14 PM   #1
Join Date: Apr 2012
Posts: 3
Default Using a MovieClip to affect the timeline.

Hello, I've been attempting to use a MovieClip as a button and make it use the gotoAndStop method on the timeline. But I'm unsure how to do that.

The code I use for this was like this:
function startGame(evt:MouseEvent):void {
	Parent.gotoAndStop(48); //Here is where I'm unsure
	(MouseEvent.MOUSE_DOWN, startGame);
What I'm having trouble with is where I need to define that I want to change the frame on the Main Timeline, rather than the MovieClip's timeline. (The code is on a frame in the MovieClip's timeline.)
TheBirdBag is offline   Reply With Quote
Old 04-27-2012, 11:46 PM   #2
Senior Member
Join Date: Feb 2006
Location: Washington, DC
Posts: 2,812
Send a message via AIM to abeall

To access the main timeline, use this:
ActionScript Code:

parent would also work if your MovieClip is not nested in another MovieClip:
ActionScript Code:
Aaron Beall | Flash portfolio | Fireworks extensions | Twitter
abeall is offline   Reply With Quote
Old 04-27-2012, 11:51 PM   #3
Join Date: Apr 2012
Posts: 3

Thanks, it helped a lot. That will make things a quite a bit easier.
TheBirdBag is offline   Reply With Quote

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

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

Follow actionscriptorg on Twitter


Powered by vBulletin® Version 3.8.5
Copyright ©2000 - 2015, 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.