Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 03-31-2010, 05:26 PM   #1
Ken Rogers
Senior Member
 
Join Date: Jan 2007
Posts: 164
Default addChild general question

If you instantiate a class but don't addChild, does the object even exist at all?

I've tried instantiating classes without addChild (because I don't need to see it right away as it is off-screen) I get the error:

TypeError: Error #2007: Parameter child must be non-null.
Ken Rogers is offline   Reply With Quote
Old 04-03-2010, 02:02 PM   #2
nanook
Member
 
Join Date: Feb 2010
Posts: 72
Default

An object exists as soon as you create an instance of it. addChild just adds it to the display list. Object children that have been added to the display list get displayed on the stage.

You should post your code so that we can see where the error is coming from.
nanook 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


All times are GMT. The time now is 10:29 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.