If you have ever attempted the following:
private var _moduleID:uint
[Bindable]
public function get moduleID():uint{
trace("What the hell are you doing here?")
return _moduleID;
}
public function set moduleID(n:uint):void{
_moduleID = n;
trace("That's better")
}
You will know that some strange happens when you try to set the variable. The setter code does not fire, the getter does.
The fix:
[Bindable(event="moduleChanged")]
public function get moduleID():uint{
return _moduleID;
};
public function set moduleID(n:uint):void{
_moduleID = n;
currentModule = toc.acModules[n];
slideID = 0;
dispatchEvent(new Event("moduleChanged"))
}
Though, don’t ask me why. Is this a bug I should be reporting, or am I missing some valid reason for this behavior?