Home Tutorials Forums Articles Blogs Movies Library Employment Press
Old 12-06-2010, 05:58 PM   #1
blank01
Member
 
Join Date: Oct 2010
Posts: 55
Default if(parent == [object mc1]) {

When I trace parent on the object I want I get "[object mc1]" -- how can I translate that ([object mc1]) into my if statement?
blank01 is offline   Reply With Quote
Old 12-06-2010, 06:03 PM   #2
the binary
Senior Member
 
the binary's Avatar
 
Join Date: May 2003
Location: berlin | germany
Posts: 960
Default

try to use the "name" property instead.. ?

ActionScript Code:
trace( this.parent.name ); //and then if (this.parent.name == "theName")  // do something
__________________
8bm
the binary is offline   Reply With Quote
Old 12-06-2010, 08:05 PM   #3
henke37
Senior Member
 
henke37's Avatar
 
Join Date: Mar 2009
Location: Sweden
Posts: 10,887
Send a message via Skype™ to henke37
Default

Even better, compare the reference with another reference.

I think that you should read my first article.
__________________
Signature: I wrote a pair of articles about the timeline.
henke37 is offline   Reply With Quote
Old 12-06-2010, 08:38 PM   #4
the binary
Senior Member
 
the binary's Avatar
 
Join Date: May 2003
Location: berlin | germany
Posts: 960
Default

Quote:
Originally Posted by henke37 View Post
Even better, compare the reference with another reference.
how should that look like ?
__________________
8bm
the binary is offline   Reply With Quote
Old 12-06-2010, 10:37 PM   #5
henke37
Senior Member
 
henke37's Avatar
 
Join Date: Mar 2009
Location: Sweden
Posts: 10,887
Send a message via Skype™ to henke37
Default

It's a long story, that's why I refered to my article for the details.
__________________
Signature: I wrote a pair of articles about the timeline.
henke37 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 08:34 AM.

///
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.