DoubleClick Studio AS3 API Reference

class com.google.ads.studio.dynamiccontent.DynamicContent

Extends com.google.ads.studio:EnabledComponent

The DynamicContent class retrieves dynamic content from a flashvar so that it is available to the designer. The original form of the content is in an escaped JSON string. It also is able to ingest development values to be used in preview.

To get a reference to the DynamicContent instance, please use the getInstance method of DynamicContent. For example:
   var info:String = DynamicContent.getInstance().camera[0].info;
   
The DynamicContent dispatches several events (a full list is available in the events section). You can listen and handle them in the following manner:
   import com.google.ads.studio.dynamiccontent.DynamicContent;
   // All the event types are accessed through StudioEvent.
   import com.google.ads.studio.events.StudioEvent;
    
   // Get a reference to the DynamicContent.
   var dynamicContent:DynamicContent = DynamicContent.getInstance();
    
   var contentAvailableHandler:Function = function(event:StudioEvent):void {
     // This will output the value of StudioEvent.LOAD
     // which is "load".
     trace(event.type);
      
     // Access some information.
     var info:String = dynamicContent.camera[0].info;
   };
   dynamicContent.addEventListener(
       StudioEvent.LOAD,
       contentAvailableHandler);
    
   // DynamicContent is a dynamic class so you can set development values for
   // for testing in a non-live environment. Development values are
   // provided to you by the Dynamic Content web application.
   dynamicContent.camera[0].info = "This is a great camera!";
    
   // Initialize the DynamicContent! This will retrieve the runtime dynamic
   // content when run in a live environment.
   dynamicContent.init();
    
      

Expand Events

Static Methods

DynamicContent.getInstance() : DynamicContent

Returns the singleton instance of the DynamicContent 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.dynamiccontent:DynamicContent

getProfileId() : Number

Returns the profile ID.

init() : void

Initializes the component.

isFeedLoggingEnabled() : Boolean

Returns whether logging is enabled.

Expand
setDebugValues(debugValues:Object) : void

A convenience method to set the debug values from a given object.

Expand
setFeedLoggingEnabled(value:Boolean=true) : void

Enables/Disables output of ad's feed into console. Default value is true.

Expand
setProfileId(profileId:Number) : void

Sets the profile ID.

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