A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Need help about addeventlistener in conditional

  1. #1
    Member
    Join Date
    Nov 2007
    Posts
    83

    Need help about addeventlistener in conditional

    Code:
    while (num<24) {
    	MovieClip("key" + num + "_mc").addEventListener(MouseEvent.CLICK, keyboardUp);
    	num++;
    }
    so simple but I get this error:

    Code:
    TypeError: Error #1034: Tür Dayatması başarısız oldu: "key1_mc", flash.display.MovieClip öğesine dönüştürülemiyor.
    	at Untitled_fla::MainTimeline/frame1()

  2. #2
    ___________________
    Join Date
    May 2004
    Posts
    3,174
    PHP Code:
    while (num<24) {
        
    this.getChildByName("key" num "_mc").addEventListener(MouseEvent.CLICKkeyboardUp);
        
    num++;


  3. #3
    Member
    Join Date
    Nov 2007
    Posts
    83

    Thumbs up

    Thanks for the reply. That works fine now.

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