How is DoubleClick Studio different from Ad Kit?

The Flash API offered in the DoubleClick Studio is similar to the one used in the Motif Ad Kit, but it has been simplified and improved in a number of ways. The chart below describes the differences between the ActionScript code, including the scoping of the functions.

The three most significant differences between the Ad Kit and DoubleClick Studio are scoping, child movies, and event naming.

Scoping

For scoping, we have moved the functions from the _root.conduit movieclip to the Enabler component. The Enabler component is global, so you can access it without the path. So instead of:

_root.conduit.functionName();

Most functions can now be called:

Enabler.functionName();

Child movies

In the Ad Kit whenever you loaded or referenced a child SWF or other asset you wrapped the asset's path in the getFilename function. To load a movie into myMC your code looked like this:

myMC.loadMovie(_root.conduit.getFilename("child.swf"));

In the DoubleClick Studio this is no longer necessary. You can use the standard Flash method of loading a child like this:

myMC.loadMovie("child.swf");

Note: getFilename is still required when using the syntax loadMovie(mc, child)).

Events

One of the most common tasks when you create rich media creatives is the coding of tracking events. In the Ad Kit, this was a two-step process: First you defined your events (either in the conduitData movieclip or using the Ad Kit panel), and then you used the ID of the event in an ActionScript call like this:

_root.conduit.exit(1); //calls exit 1, as defined in conduitData

In DoubleClick Studio this process is significantly simpler. Instead of defining events separately, you can now simply pass strings into the event ActionScript like this:

Enabler.exit("my click"); //calls exit "my click", name can be changed in web UI

Enabler.counter("my counter");

Complete API comparison

The chart below compares the Ad Kit API with the DoubleClick Studio API. For simplicity the function parameters and returned values are only shown in cases where they have changed.

Motif Ad Kit API
DoubleClick Studio API Notes
Events


_root.conduit.exit(id:Int)
Enabler.exit(name:String, URL:String) Numeric IDs replaced with string. URL parameter is optional.
_root.conduit.exit(id:Int, obj:Object)
N/A
Passing in a movie clip object is no longer supported. Use exit instead.
_root.conduit.exitURL(id:Int, URL:String) N/A

Use exit instead.
_root.conduit.exitQueryString(id:Int, params:String) Enabler.exitQueryString(name:String, params:String)
Numeric IDs replaced with string.
_root.conduit.counter(id:Int, isCumulative:Boolean) Enabler.counter(name:String, isCumulative:Boolean) Numeric IDs replaced with string.
_root.conduit.event(id:Int, isCumulative:Boolean) N/A
Use counter().
_root.conduit.startTimer(id:Int, isCumulative:Boolean) Enabler.startTimer(name:String, isCumulative:Boolean) Numeric IDs replaced with string.
_root.conduit.stopTimer(id:Int) Enabler.stopTimer(name:String) Numeric IDs replaced with string.
_root.conduit.loadMovie(id:Int) N/A
Not supported. To track movie loads use a counter on the first frame of the child movie.
_root.conduit.unLoadMovie(id:Int) N/A
Not supported
_root.conduit.customEvent
N/A
Used exclusively for Flash-in-Flash, not available in DoubleClick Studio beta.
Video ads

myvideo.getNetStream N/A

_root.conduit.getMotifVideoComponents Enabler.getVideoComponentByName

myvideo.getPercentProgressed Same

myvideo.getPercentLoaded Same
myvideo.getSound Same

myvideo.getStreamProgress
Same

myvideo.getVideoLength
Same

myvideo.hide Same

myvideo.isComplete Same
myvideo.isMuted Same

myvideo.isPaused Same

myvideo.isPlaying Same

myvideo.mute(customConduitEvent:Number) myvideo.mute() Custom video events defined in web UI instead of Flash API.
myvideo.unmute(customConduitEvent:Number) myvideo.unmute() Custom video events defined in web UI instead of Flash API.
myvideo.pause(customConduitEvent:Number) myvideo.pause() Custom video events defined in web UI instead of Flash API.
myvideo.play(customConduitEvent:Number) myvideo.play() Custom video events defined in web UI instead of Flash API.
myvideo.restart(customConduitEvent:Number) myvideo.restart() Custom video events defined in web UI instead of Flash API.
myvideo.seek
Same

myvideo.setBandwidth
Same

_root.conduit.shutdown Enabler.stopAllVideos

N/A myvid.getConnectionType

N/A myvid.getName

N/A myvid.getState

N/A myvid.getVolume
N/A
Enabler.muteAllVideos

N/A myvid.setBufferTime

N/A myvid.setConnectionType

N/A myvid.setLoops
N/A myvid.setOnPlayCompleteCallback
N/A myvid.setOnPostBufferPlayOnFrame
N/A myvid.setProgressiveFallbackVideos
N/A myvid.setSmoothing

N/A myvid.setVideos

N/A myvid.setVolume

myvid.show()
Same

myvid.stop(customConduitEvent:Number) myvid.Stop
Custom video events defined in web UI instead of Flash API.
_root.conduit.stopMotifVideoComponents
Enabler.stopAllVideos

Expanding ads

motifExpandingController.addExpandingPanel N/A
See "Note on Expanding Creatives," below.
motifExpandingController.conduitCollapse N/A
See "Note on Expanding Creatives," below.
motifExpandingController. setCollapseOnMouseOut N/A
See "Note on Expanding Creatives," below.
_root.conduit.expand Enabler.expand

_root.conduit.collapse Enabler.collapse

Floating and Overlay ads


_root.conduit.close Enabler.close

_root.conduit.closeSelfPop
N/A
Use close() instead.
_root.conduit.closeSelfFloat N/A Use close() instead.
_root.conduit.closeThisAsset N/A
Use close() instead.
_root.conduit.hideCompanionAsset Enabler.closeCompanion Same functionality, new name.
_root.conduit.showCompanionAsset Enabler.displayCompanion Same functionality, new name.
Data passing


_root.conduit.getDartSiteId
Enabler.getDartSiteId
_root.conduit.getDartAdId
Enabler.getDartAdId
_root.conduit.getDartPageId
Enabler.getDartPageId
_root.conduit.getDartRenderingId
Enabler.getDartRenderingId
_root.conduit.getDartCreativeId
Enabler.getDartCreativeId
_root.conduit.getUserCountry
Enabler.getUserCountry
_root.conduit.getUserState
Enabler.getUserState
_root.conduit.getUserZipCode
Enabler.getUserZipCode
_root.conduit.getUserBandwidth Enabler.getUserBandwidth
_root.conduit.getUserAreaCode Enabler.getUserAreaCode
_root.conduit.getUserDMACode Enabler.getUserDMACode
_root.conduit.getMotifParameter Enabler.getParameter
Fullscreen

_root.conduit.isFullScreenVideoAvailable Enabler.isFlashFullScreenAvailable
Fullscreen functionality now available with or without video.
_root.conduit.launchFullScreenVideo Enabler.launchFullScreen Fullscreen functionality now available with or without video.
Miscellaneous functions

_root.conduit.getExitURL Not supported

_root.conduit.politeMovie() Not supported Instead an event is dispatched as onPageLoaded.
_root.conduit.getFilename() Enabler.getFileName Function no longer needed for child movie loading except when used with loadMovie function.
N/A Enabler.setTraceActions
_root.conduit. getStreamingMediaHostDomain Not supported
_root.conduit.getStreamingPath Not supported
_root.conduit.getProgressivePath Not supported
_root.conduit.forceAnimation Not supported
Function for legacy support of a Flash 6 rendering bug.
_root.conduit.reportManualClose Enabler.reportManualClose

Callback functions



Ad Kit callbacks
DoubleClick Studio callbacks
Notes
mtfContinue
onPageLoaded The mtfContinue is a variable set on pageload, not technically a callback.

onExit


onFullScreen


onFullScreenReturn


onInteractionMouseOver


onStageMouseOver


onStageMouseOut

Video component


onVideoComplete
Same

onVideoMidpoint Same
onVideoPause Same
onVideoMute Same
onVideoUnmute Same
onVideoPlay Same
onVideoStop Same
onVideoBackup onError
In the Motif component there was an option to set an image if the video fails. In the DoubleClick Studio it is up to the developer to handle this case.

onCuePoint

onMetaData onMetaData


onVideoBuffered


onVideoLoopsComplete

motifExpandingController


onExpand
N/A
See "Note on Expanding Creatives," below.
onExpandComplete
N/A
See "Note on Expanding Creatives," below.
onCollapse
N/A
See "Note on Expanding Creatives," below.
onCollapseComplete
N/A
See "Note on Expanding Creatives," below.

Note on Expanding creatives

In the Motif Ad Kit, you could only create expanding ads using a component, the MotifExpandingController. This component included both a UI for setting basic parameters (collapse on mouse out, etc.) and an API for setting up the panels used for expansion.

In contrast, DoubleClick Studio has two distinct ways to develop expanding ads, either by using a component or using an API. Using the new Expanding component, you can access a UI that includes all the panel definitions and callback functions needed to create a complex multi-panel expanding ad. For example, instead of including a callback function on collapse, the new component includes a field in the interface to allow you to define the function to call on collapse.

Using the API from the Enabler, you can create an expanding ad without a component, simply by calling the Enabler.expand(), Enabler.collapse(), or Enabler.onMouseOut functions.