Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

do constants exist in actionscript??

Status
Not open for further replies.

lastingforhours

Programmer
Dec 29, 2004
49
US
i know you can declare a static var in an actionscript class but what if i want to just plain declare a constant in my document?

in other languages, its usually like
const MYCONSTANT

and i noticed that if i type "constant" in my actionscript panel, it gets recognized as a reserved word but i cant find any documentation on it.

anyone know whats up with this?
 
'In Flash there is no way to create your own constant values except when you create your own custom classes with private member variables. You cannot create a "read-only" variable within Flash.' - from the manual.

The word "constant" is reserved not for a constant variable, but probably for Data binding "EndPoint.constant" property.

Kenneth Kawamoto
 
ah, well that sucks. thank ya sir.

--
Matt Milburn, Wave Motion Studios
matt@wavemotionstudios.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top