moshem
asked on
Detecting type of control on stage
Hi,
I am trying to build an AS2 logic that first detects the type of control and then checks it according to it's type
if I test an input text control :
trace (tyepof (aa_txt));
I get "Input" which is great
if I do the same for a checkbox or combobox I get "movieclip" which is not unique and does not help me identify the type of control I am dealing with..
how can I tell which type is it in runtime ?
thanks
I am trying to build an AS2 logic that first detects the type of control and then checks it according to it's type
if I test an input text control :
trace (tyepof (aa_txt));
I get "Input" which is great
if I do the same for a checkbox or combobox I get "movieclip" which is not unique and does not help me identify the type of control I am dealing with..
how can I tell which type is it in runtime ?
thanks
I don't know if AS2 can. Have you thought of using actionscript 3?
ASKER
I dont think this can work in AS2
I can't work with AS3 in this project..
thanks
I can't work with AS3 in this project..
thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
The code below uses getQualifiedClassName to find out if a class is an "Enum" (A class generated by the flex builder to represent a Java Enum in Flex ... I know It's not a real Enum)
Open in new window