Design-time Constants

Design-time constants are special "named values" that you can define on the Configurations tab of the Project Settings dialog.

They are similar to variables, but instead of being converted to values at run time, design-time constants get converted at build time. We call them design-time constants because the names you give them only exist at design time. At build time, the name of each design-time constant is replaced by the value that was assigned to it.

Just like variables, you can use design-time constants as placeholders to represent values in your project. Unlike variables, however, design-time constants are replaced by their values before your AutoPlay application is built. (Variable names are only replaced by their values when the application is running.)

Design-time constants differ from variables in another way, too: unlike variables, which never need to be quoted in expressions, design-time constants containing spaces must be surrounded by quotes when they're used in expressions.

Essentially, design-time constants let you substitute one string for another at design time. They give you the ability to "name" a string, and use that name wherever you want the string to appear. For example, you could assign "hello world" to a constant named #GREETING#, and type "#GREETING#" instead of "hello world" throughout your project. Before the AutoPlay application is built, every occurrence of #GREETING# in the project would be replaced by the words "hello world."

NOTE

 

 

 

Each design-time constant is like a big "search and replace" operation that gets performed for you at build time. When you add a design-time constant like #MY_WONDERFUL_CONSTANT# to your project, you're really just telling AutoPlay Media Studio to go through your project at build time and replace every occurrence of "#MY_WONDERFUL_CONSTANT#" with the value you assigned to it earlier.

Next: Expressions