Converting AS2 to AS3
,
In my project I have an array that refers to a set of movieClips and textFields.
I want to cycle trough the array and find out wether the string represents an movieClip or array.
PHP Code:
var changeFocusItems:Array = new Array();
changeFocusItems.push("myMovieClip");
changeFocusItems.push("myTextFieldOnStage");
for each (var myItem:String in changeFocusItems) {
if (myItem is TextField) {
// do change textField property..
} else if (myItem is MovieClip) {
// change movieClip property
}
}
How do I recognise myItem string as a textField / movieClip?