I have a class - call it MyClass - and an instance of that class with instance name myObject.
In MyClass I declare:
public var myVariable:Number;
In the main timeline I try to set it using myObject.myVariable = 3;
In the main timeline, if I do a trace (myObject.myVariable) it will return 3. Within the class, if I do a trace of (this.myVariable) it returns null.
However, if I add a line of code in my class and add this.myVariable = 3, it traces 3.
What am I doing wrong? Why can’t I get myObject to correctly change its own parameters?
I’m new to AS3 so I’m sorry if I’m just getting something overly simple wrong.