staypuffinpc
staypuffinpc

Reputation: 337

"access of possibly undefined" actionscript

I've created a SittingDuck.as class that extends the MovieClip class. When I instantiate SittingDuck in my .fla file, I try and access both the properties I created in the SittingDuck.as file, as well as its inherited properties. I'm able to refer to and change x and y properties, but when I attempt to access the instanceName property, I get the message,

"Access of possibly undefined property instanceName through a reference with static type com.examples.SittingDuck.

Problem is, prior to writing the SittingDuck.as file, I was able to get the instanceName property with no problem. Any ideas why my instance of SittingDuck hasn't inherited this property from MovieClip?

Upvotes: 0

Views: 224

Answers (1)

Chris Gutierrez
Chris Gutierrez

Reputation: 4755

Do you mean the name property? as in like MovieClip.name? I don't believe there is an instance variable called instanceName

Upvotes: 2

Related Questions