Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 09-30-2009, 10:54 PM   #1
Registered User
Join Date: Sep 2006
Posts: 27
Default Create movieclip descendants with Actionscript?

Anyone know if movieclips can be created inside of other movieclips using AS2?

I like to keep all of my AS in one place instead of adding some of it to movieclips in the library.

Last edited by mxyntl; 09-30-2009 at 10:59 PM.
mxyntl is offline   Reply With Quote
Old 10-01-2009, 02:55 PM   #2
Registered User
Join Date: Sep 2006
Posts: 27

Well I guess it's not such a smart question.
I think this is it... it works at least.

// with "ball" in library
var MC1_mc:MovieClip;
MC1_mc = this.attachMovie("ball", "ball", getNextHighestDepth());
var MC2_mc:MovieClip;
MC2_mc = this.attachMovie("MC1_mc", "MC1_mc", getNextHighestDepth());
var MC3_mc:MovieClip;
MC3_mc = this.attachMovie("MC2_mc", "MC2_mc", getNextHighestDepth());
mxyntl 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 Off
HTML code is Off

Forum Jump

All times are GMT. The time now is 11:36 PM.

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.