-
addChild?
Hi,
Im trying to addChild to stage inside a container but nothing appears on the stage, what do I need to do, and what do I need to do to the artwork MCs so the AS picks them up?:
var container1:MovieClip = new MovieClip();
container1.addChild(artwork1);
container1.addChild(artwork2);
container1.addChild(artwork3);
-
trace("AKA: Biro Barna");
First of all, where are the artowork MCs situated at ? If your MCs are in the library then you'll need to do this:
PHP Code:
// assuming artwork1 , 2, 3... are the linkage names of your MCs var art1:MovieClip = new artwork1() var container1:MovieClip = new MovieClip(); addChild(container1); container1.addChild(art1);
// OR
var container1:MovieClip = new MovieClip(); addChild(container1); container1.addChild(new artwork1());
By the way, if it wasn't throwing any errors then the source of the problem was container1. You were never adding container1 to the display list with addChild(container1);
| Windows MSN: birobarna [at] hotmail [dot] com | Skype: barna.biro | WebLog: http://blog.wisebisoft.com/ |
| Software Developer / Flash & Flex Developer | Student ( Computer Science ) | Interested in: Sharing Knowledge |
| Romanian Adobe Flash, Flex, AIR Forum: http://www.flashforum.ro/ | By perseverance the snail reached the ark. |
-
Everything is added to container1 but you never add container1 to the stage... addChild(container1)
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|