I’m really sorry if this ends up a no brainer. I’m new to both AS3 and OOP and have spent the last 4 hours getting nowhere.
the code is being used as a document class in an fla (nothing else in the fla yet).
the boiled down code is:
package
{
import flash.display.Sprite;
public class SimpleMenu extends Sprite
{
public var btnData:Array;
public function SimpleMenu():void;
{
btnData:Array=new Array("Home","About us","Projects","Clients","Press","Brochure");
trace (btnData);
}
}
}
the output says:
ReferenceError: Error #1074: Illegal write to read-only property Array on global.
at SimpleMenu$cinit()
at global$init()
I’ve tried every way round that I can think off including the stupid ones.
I’ve googled it but the errors reported there seem much more complex.