PDA

View Full Version : Constants?


ClawGhoul
07-07-2002, 12:26 PM
Simple Question:

How do I define constants?

In C there is "#define MY_CONSTANT 5", is something like that also possible in flash?
Would make my code more viewable :P

Thanks!

farafiro
07-07-2002, 01:27 PM
Welcome ClawGhoul
I don't know C well, but I don't think It could be done

sumul
07-08-2002, 02:49 AM
You could just say _root.MyConstant = 5;
Then you can count on _root.MyConstant always having the value of 5 in your code.

It's actually a very good habit to get into. Makes adjustments easier, and even enables you to implement some capabilities for your users to customize their experience (eventually).