Skip to main content
July 12, 2010
Answered

1119: Access of possibly undefined property currentFrameLabel through a reference with static type f

  • July 12, 2010
  • 2 replies
  • 2081 views

1119: Access of possibly undefined property currentFrameLabel through a reference with static type flash.display:DisplayObject.

line with error: if (holder.getChildAt(i).currentFrameLabel.search("false") != -1) {

any help?

This topic has been closed for replies.
Correct answer Andrei1-bKoviI

i am able to emit the line of code with the error and insert

trace(holder.getChildAt(i).name);

and in that case.  i get the name of the child movieclips


Try:

if (MovieClip(holder.getChildAt(i)).currentFrameLabel.search("false") != -1)

2 replies

Inspiring
July 12, 2010

Never mind. There is no such a thing as currentLabelName. There is curretnLabel in MovieClip

July 12, 2010

MovieClip.currentFrameLabel does exist lol.  it returns a the current frames label.

var holder:Object = t1.t2.t3;

Inspiring
July 12, 2010

Right, if you compile for Flash 10 - no such thing for Flash 9. In any case, currentLabel or currentFrameLabel - these are properties that only MovieClip contains. So, are the children of holder MovieClips? If so, are their frames labeled?

Inspiring
July 12, 2010

What is holder? And what are holder's children?