Follow

This feature entails additional fees. Please contact your Client Services Manager for more information.

A variable is used when you have instructions in the code and you want the ad to behave accordingly. For example, you can create a variable that will be called by the JavaScript when you want to define the location of a panel when it opens, and after how much time. Here you would define a variable for X (location) and a variable for Y (amount of time). JavaScript variables are defined in Ad Builder for Flash and are fully accessible by the custom JS. Once you create variables, you define properties using Sizmek Flash APIs.

Variable Rules and Limitations

  • Variables are limited to 255 characters.
  • Variables are also used in Smart Versioning and allow you to retrieve a Sizmek value that is used by Flash. For example when you want to define the price of a product in different locations in the ad. For more information about Smart Versioning variables, see Variable Smart Items.

To add a variable to an ad:

  1. Go to Settings > Advanced Features.
  2. Expand the Variables section.
  3. To add a variable, click Add Variable.
  4. Enter a unique name for your variable.
  5. From the Type drop-down list, select the type. For example if your variable has a True False value, select Boolean.
  6. Enter a value. For example, True.
  7. Click Save.

You can use ActionScript APIs to set and get JavaScript variables from within your Flash file as well:

  1. Use EBBase.GetVar() to get the value of a JavaScript variable.
  2. Use EBBase.SetVar() to set the value of a JavaScript variable.
  3. Use EBBase.GetAllVars() to get the values of all the JavaScript variables.

    For more information, see Sizmek Flash API Help AS3/AS2.

Was this article helpful?
0 out of 0 found this helpful
Have more questions? Submit a request

Comments