I’ve been using ‘const’ for years, but I just found out that it is executed like a normal variable at runtime. Typically constants are supposed to be ‘inlined’…
… so when you write this:
const SPEED:int = 5;
o.x += SPEED;
…you should get this in the SWF:
o.x += 5;
…but when I decompile my SWF I get this:
const SPEED:int = 5;
o.x += SPEED;
Is there a way to force the Flex compiler to **inline constants **in AS3?