I want to know if a Class is the main stage, in other words...
if it is "ThisName" then...
My code is:
MainStage = this.parent as MovieClip;
trace("scroll Stage: " + MainStage); // output: scroll Stage: [object Main_Activate]
but how would I write it this way?
if(MainStage == [object Main_Activate])
then run my code.
In this last example [object Main_Activate] is getting errors.
您可以使用is
运算符 :
if (this.parent is Main_Activate)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.