A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: [RESOLVED] Array string is textField or movieClip?

Threaded View

  1. #1
    Senior Member somlemeg's Avatar
    Join Date
    Aug 2000
    Posts
    171

    resolved [RESOLVED] Array string is textField or movieClip?

    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?
    Last edited by somlemeg; 12-31-2009 at 07:24 AM.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center