Dynamize Picture

Once created driven by our AdServer, images change based on established parameters ( Geolocation, weather, date/time, cookies, retargeting …).

It is possible to dynamize an image in your banner without the image being distorted and while keeping its full visibility.

To dynamize an image:

  1. you have to name your object : Select your object, then go to the properties panel and give it a name
  2. select frame1 on your timeline
  3. press f9 on your keyboard (or go to the Action Panel)
  4. after your data initialisation you can use the following methods

addAndAdaptImage

The setText function allows you to insert a text in an element.

ADventori.Display.addAndAdaptImage(element, data, urlDefault, objectWidth, objectHeight);

This function needs five parameters:

  • element: The target Object where the image will be inserted
  • data: The data that will be sent in this element
  • urlDefault: the default URL in case the first URL inside data doesn’t exist.
  • objectWidth: the width of your object (you’ll find it in the object’s properties panel)
  • objectHeight: the height of your object (you’ll find it in the object’s properties panel)

Example

Download the example