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 10-16-2009, 04:04 AM   #1
OmerHassan
Senior Member
 
Join Date: Mar 2009
Location: Islamabad, Pakistan
Posts: 207
Send a message via Skype™ to OmerHassan
Default Event.ADDED and Event.ADDED_TO_STAGE

What is the difference between these two events?
OmerHassan is offline   Reply With Quote
Old 10-16-2009, 12:44 PM   #2
senocular
six eyes
 
senocular's Avatar
 
Join Date: Jan 2003
Location: San Francisco, CA (USA)
Posts: 7,875
Send a message via ICQ to senocular Send a message via AIM to senocular Send a message via MSN to senocular Send a message via Yahoo to senocular
Default

http://livedocs.adobe.com/flex/3/lan...ml#event:added
http://livedocs.adobe.com/flex/3/lan...t:addedToStage

Basically added is for an object or any of its children being added to any display list, and added to stage is for an object (not including its children) being added to the active display list giving it access to stage.
__________________
(6)
senocular is offline   Reply With Quote
Old 05-05-2010, 07:33 PM   #3
smohadjer
Registered User
 
Join Date: Aug 2009
Posts: 5
Default

But if that's so, shouldn't addedToStage event be dispatched whenever added event is dispatched? In my externally loaded swf I can listen for ADDED_TO_STAGE event, but when I listen for ADDED event, my listener function is never called.
smohadjer is offline   Reply With Quote
Old 05-05-2010, 09:32 PM   #4
maskedMan
Obfuscated Coder
 
maskedMan's Avatar
 
Join Date: Apr 2008
Posts: 1,571
Default

No, because an object doesn't actually have to be *on the stage* for you to be able to call .addChild();

If clip foo is *not* currently onstage, but you add bar as a child of foo, have you added bar to the stage?
__________________
http://www.scriptocalypse.com - It's not the end of the world. It's just Actionscript!

man.mask = mask_mc;
maskedMan 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 04:15 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.