PDA

View Full Version : 1120: Access of undefined property


baritone87
10-05-2007, 10:58 PM
This should be simple:

Flex builder 2 points to this line:
for(var i:uint=0; i<20; i++){
and says:

"1120: Access of undefined property i"

What could be the problem here? I don't need to import "uint" do I? If so what's the path? mx.what?

Edit: It is probably significant that this is in an MXML component that I created that extends mx.containers.Panel.

baritone87
10-06-2007, 05:07 AM
Okay. I figured it out. Or rather, I found another thread that discussed it. The poster of This Thread (http://actionscript.org/forums/showthread.php3?t=139712) was having the same problem.

I was putting that loop directly in a <mx:Script>. It needed to happen in a function so I stuck it in a creationComplete Handler.