You know, I’ve always wondered how to make constants in ActionScripts. For instance, in some languages when you write
const CUBE_SIDES = 6;
then whenever you would use CUBE_SIDES in the code, it would interpret it as 6. The trick is that you can’t change a constant, so you couldn’t do it by accident.
How to do that with ActionScript? The only way I know is that you store your constants as variables in the _global object.
_global.CUBE_SIDES = 6;
But then you could change CUBE_SIDES if you wanted to.
Catch my drift?