DoubleClick Studio AS3 API Reference

class com.google.ads.studio.configurable.Configurable

Extends com.google.ads.studio:EnabledComponent

Configurable allows designers to define a layout which can be customized by Studio users.

Register a configurable instance of a class:
   import com.google.ads.studio.configurable.Configurable;
    
   var image:Image = new Image();
   var tooltip:ToolTip = new ToolTip();
   image.addChild(tooltip);
      // Register image at the "root" level of the layout.
   Configurable.getInstance().register("top image", image);
      // Register tooltip nested inside of image.
   Configurable.getInstance().register("tooltip", tooltip, image);
   

Constants

NameValueDescription
FILLER_CONTEXT_CREATIVECREATIVE

Creative filler context.

FILLER_CONTEXT_MANAGEMENTMANAGEMENT

Management filler context.

FILLER_CONTEXT_NONENONE

Not in filler context.

Expand Events

Static Methods

Configurable.getInstance() : Configurable

Returns the singleton instance of the Configurable class.

Instance Methods

Defined in: com.google.ads.studio:EnabledComponent

getEnabler() : Object
isInitialized() : Boolean

Returns whether the component has initialized.

Defined in com.google.ads.studio.configurable:Configurable

Expand
changeFillerValue(registrationId:String, value:Object) : void

Change the value of a configurable object in the filler. Sets the value on the registered object if found, but does not call any ConfigurableUpdate.

Change the value of the properties on configurable object video in the filler.
     import com.google.ads.studio.configurable.Configurable;
      
     // Register the object with configurable.
     var config:Configurable = Configurable.getInstance();
     config.register("video", video);
     // ...
     config.changeFillerValue(config.getRegistrationId(video),
         {videoUrl: "www.google.com"});
     

Expand
counter(registeredObject:Object, eventId:String, isCumulative:Boolean=false) : void

Tracks a counter event for a registered object in the layout. Use this function if you want to allow tracking different counters for multiple instances of the same type.

     var expandClickHandler:Function = function(event:MouseEvent):void {
       configurablecounter(event.target, "Expand Counter");
       images[i].expand();
     };
     for each (var button:Sprite in expandButtons) {
       button.addEventListener(MouseEvent.CLICK, expandClickHandler);
     }
     

Expand
exit(registeredObject:Object, exitId:String) : void

Tracks an exit event for a registered object in the layout.

     var linkClickHandler:Function = function(event:MouseEvent):void {
       configurable.exit(event.target, "Click Exit");
     };
     for each (var link:Sprite in links) {
       link.addEventListener(MouseEvent.CLICK, linkClickHandler);
     }
     

getDynamicProfileId() : Number

Returns the dynamic profile ID.

getFillerContext() : String

Indicates the filler context that the layout asset is running in.

Expand
getRegisteredObject(name:String) : Object

Returns the registered object based on its registration ID.

Expand
getRegisteredParent(object:Object) : Object

Returns the registered object's parent configurable object.

Expand
getRegistrationId(objectOrId:, parentObjectOrId:String=null, propertyName:=null) : String

Get the registration id for an object or property.

getRuntimeMode() : RuntimeMode

Indicates the runtime mode the layout asset is running in. Use this property to determine whether certain behaviors of the ad should be enabled or not, according to the runtime mode.

Expand
getValue(objectOrPropertyName:, parent:Object=null) : Object

Returns the value object container for the given object or its property name with its parent reference.

Expand
hasValue(registerId:String, parent:Object=null) : Boolean

Checks whether a value has been set for an object. Use this function for optional objects, to determine whether they should be created and registered to the parent or not.

Expand
hideFiller(registrationId:String) : void

Hide a configurable object or a property on a configurable object in the filler.

Hide property "videoUrl" on configurable object video in the filler.
     import com.google.ads.studio.configurable.Configurable;
      
     // Register the object with configurable.
     var config:Configurable = Configurable.getInstance();
     config.register("video", video);
     // ...
     config.hideFiller(config.getRegistrationId(video, null, "videoUrl");
     

Expand
isRegistered(object:Object) : Boolean

Returns whether or not an object is currently registered.

Expand
refreshAll(object:Object=null) : void

Refreshes registered objects and their children.

Expand
register(name:String, object:Object, parent:Object=null) : void

Register a configurable object.

Register a configurable object:
     import com.google.ads.studio.configurable.Configurable;
      
     var image:Image = new Image();
     var tooltip:ToolTip = new ToolTip();
     image.addChild(tooltip);
          // Register image at the "root" level of the layout.
     Configurable.getInstance().register("top image", image);
          // Register tooltip nested inside of image.
     Configurable.getInstance().register("tooltip", tooltip, image);
     

Expand
registerDynamicState(name:String, activateFunction:Function, parent:Object) : void

Register a dynamic state. Use for each array item.

Register a dynamic state:
     import com.google.ads.studio.configurable.Configurable;
      
     [ConfigurableArrayAdd(id="Tabs", type="com.display.Tab")]
     [DynamicStates]
     public function addTab(id:String):void {
       // Some code that creates and registers the new tab.
       var tab:Tab = new Tab();
       Configurable.getInstance().register(id, tab, this);
       addChild(tab);
            // Register a state for the new tab.
       var selectTab:Function = function() {selectTab(tab);};
       Configurable.getInstance().registerDynamicState(id, selectTab, this);
     }
     

Expand
registerState(name:String, activateFunction:Function) : void

Register a state.

Register a state:
     import com.google.ads.studio.configurable.Configurable;
      
     var startVideo:Function = function() {
         clearStage();
         addChild(video);
         video.play(0);
     };
          // Register the intro video as a state, specifying startVideo as the
     // activate state function.
     Configurable.getInstance().registerState("Intro Video", startVideo);
     

Expand
setActiveState(name:String, parent:Object=null) : void

Notify Configurable that a state has become active.

Notify Configurable that a state had become active:
     import com.google.ads.studio.configurable.Configurable;
      
     // Register the start video function.
     var startVideo:Function = function() {
         clearStage();
         addChild(video);
         video.play(0);
         Configurable.getInstance().stateActive("Intro Video");
     };
     Configurable.getInstance().registerState("Intro Video", startVideo);
     

Expand
setDynamicProfileId(dynamicProfileId:Number) : void

Sets the dynamic profile ID.

Expand
setTestValue(value:Object, path:String=null) : void

Updates the test value tree for configurable. The new value passed to this method will be merged into existing value tree. For example

     Configurable.getInstance().setTestValue({
       background: {
         url: "",
         title: "background image"
       }
     });
     
will setup a background object at the root level, then you can use
     Configurable.getInstance().setTestValue({
       url: "http://"
     }, "background");
     
to change the value of "background.url" from "" to "http://".

Expand
showFiller(registrationId:String) : void

Show a configurable object or a property on a configurable object in the filler.

Show property "videoUrl" on configurable object video in the filler.
     import com.google.ads.studio.configurable.Configurable;
      
     // Register the object with configurable.
     var config:Configurable = Configurable.getInstance();
     config.register("video", video);
     // ...
     config.showFiller(config.getRegistrationId(video, null, "videoUrl");
     

Expand
showMessage(message:String) : void

Shows a message in the filler UI. Can be used to inform the user of any filler changes.

Show a message in the filler UI.
     import com.google.ads.studio.configurable.Configurable;
      
     var config:Configurable = Configurable.getInstance();
     config.showMessage("hello world");
     

Expand
startTimer(registeredObject:Object, timerId:String) : void

Starts an event timer associated with a registered object. Use this function for events that could be fired by multiple instances of the same type, in the case you need to differentiate the events fired by each instance.

     var imageMouseoverHandler:Function = function(event:MouseEvent):void {
       configurable.startTimer(event.target, "Hover Timer");
     };
     for each (var image:Sprite in images) {
       image.addEventListener(MouseEvent.MOUSE_OVER, imageMouseoverHandler);
     }
     

Expand
stopTimer(registeredObject:Object, timerId:String) : void

Stops an event timer associated with a registered object. Use this function for events that could be fired by multiple instances of the same type, in the case you need to differentiate the events fired by each instance.

     var imageMouseoverHandler:Function = function(event:MouseEvent):void {
       configurablestopTimer(event.target, "Hover Timer");
     };
     for each (var image:Sprite in images) {
       image.addEventListener(MouseEvent.MOUSE_OVER, imageMouseoverHandler);
     }
     

Expand
unregister(object:Object) : Boolean

Unregisters an object from the value tree. It will remove the binding from the associated data model, so any changes won't trigger the view object to update. The data model will continue to receive updates so when the object is registered again, it will receive the most up-to-date data.

Back to top

  1. com.google.ads.studio
    1. AssetLoader
    2. ContextualDiscovery
    3. F2fEnabler
    4. FullScreenButton
    5. HtmlEnabler
    6. ProxyEnabler
    7. VpaidEnabler
  1. com.google.ads.studio.configurable
    1. Configurable
  1. com.google.ads.studio.display
    1. StudioLoader
  1. com.google.ads.studio.events
    1. StudioEvent
    2. StudioVideoEvent
  1. com.google.ads.studio.expanding
    1. Expanding
  1. com.google.ads.studio.localconnect
    1. LocalConnectWrapper
  1. com.google.ads.studio.video
    1. ConfigurableVideoPlayer
    2. EnhancedVideoController
    3. PlayPauseButton
    4. Playlist
    5. Scrubber
    6. SoundToggleButton
    7. VideoController
    8. VideoEntry
    9. VideoPlayer
    10. VideoPlayerAdvanced
  1. com.google.ads.studio.vpaid
    1. VpaidTimer