This class defines the events dispatched by the video classes. In versions 2.1.1 and prior, this class was named VideoEvent. It has been renamed for versions 2.1.2 and higher.
Constants
Name | Value | Description | ||||
---|---|---|---|---|---|---|
BACKWARDS_SEEK | backwardsSeek |
The StudioVideoEvent.BACKWARDS_SEEK property defines the value of
the | ||||
BUFFERED | buffered |
The StudioVideoEvent.BUFFERED property defines the value of
the | ||||
COMPLETE | complete |
The StudioVideoEvent.COMPLETE property defines the value of
the | ||||
CONNECTION_ERROR | connectionError |
The StudioVideoEvent.CONNECTION_ERROR property defines the value of
the | ||||
DURATION | duration |
The StudioVideoEvent.DURATION property defines the value of
the | ||||
FIRST_QUARTILE | firstQuartile |
The StudioVideoEvent.FIRST_QUARTILE property defines the value of
the | ||||
MID_POINT | midPoint |
The StudioVideoEvent.MID_POINT property defines the value of
the | ||||
MUTE | mute |
The StudioVideoEvent.MUTE property defines the value of
the | ||||
NETSTREAM_BUFFER_EMPTY | NetStream.Buffer.Empty |
The StudioVideoEvent.NETSTREAM_BUFFER_EMPTY property defines the value of
the | ||||
NETSTREAM_BUFFER_FULL | NetStream.Buffer.Full |
The StudioVideoEvent.NETSTREAM_BUFFER_FULL property defines the value of
the | ||||
NETSTREAM_PLAY_START | NetStream.Play.Start |
The StudioVideoEvent.NETSTREAM_PLAY_START property defines the value of
the | ||||
NETSTREAM_PLAY_STREAMNOTFOUND | NetStream.Play.StreamNotFound |
The StudioVideoEvent.NETSTREAM_PLAY_STREAMNOTFOUND property defines the
value of the | ||||
NETSTREAM_SEEK_INVALID_TIME | NetStream.Seek.InvalidTime |
The StudioVideoEvent.NETSTREAM_SEEK_INVALID_TIME property defines the
value of the | ||||
NETSTREAM_SEEK_NOTIFY | NetStream.Seek.Notify |
The StudioVideoEvent.NETSTREAM_SEEK_NOTIFY property defines the value of
the | ||||
NET_CONNECTION_AVAILABLE | netConnectionAvailable |
The StudioVideoEvent.NET_CONNECTION_AVAILABLE property defines the value
of the | ||||
NET_CONNECTION_PREINITIALIZE | netConnectionPreInitialize |
The StudioVideoEvent.NET_CONNECTION_PREINITIALIZE property defines the
value of the | ||||
NET_CONNECTION_STATUS | netConnectionStatus |
The StudioVideoEvent.NET_CONNECTION_STATUS property defines the value of
the The properties of the event object have the following values:
| ||||
NET_STREAM_AVAILABLE | netStreamAvailable |
The StudioVideoEvent.NET_STREAM_AVAILABLE property defines the value of
the | ||||
NET_STREAM_CUE_POINT | netStreamCuePoint |
The StudioVideoEvent.NET_STREAM_CUE_POINT property defines the value of
the The properties of the event object have the following values:
| ||||
NET_STREAM_META_DATA | netStreamMetaData |
The StudioVideoEvent.NET_STREAM_META_DATA property defines the value of
the The properties of the event object have the following values:
| ||||
NET_STREAM_PREINITIALIZE | netStreamPreInitialize |
The StudioVideoEvent.NET_STREAM_PREINITIALIZE property defines the value
of the | ||||
NET_STREAM_STATUS | netStreamStatus |
The StudioVideoEvent.NET_STREAM_STATUS property defines the value of
the The properties of the event object have the following values:
| ||||
PAUSE | pause |
The StudioVideoEvent.PAUSE property defines the value of
the | ||||
PLAY | play |
The StudioVideoEvent.PLAY property defines the value of
the | ||||
PLAYHEAD_MOVE | playheadMove |
The StudioVideoEvent.PLAYHEAD_MOVE property defines the value of
the | ||||
REPLAY | replay |
The StudioVideoEvent.REPLAY property defines the value of
the | ||||
RESUME | resume |
The StudioVideoEvent.RESUME property defines the value of
the | ||||
STATE_CHANGE | stateChange |
The StudioVideoEvent.STATE_CHANGE property defines the value of the
| ||||
STOP | stop |
The StudioVideoEvent.STOP property defines the value of
the | ||||
THIRD_QUARTILE | thirdQuartile |
The StudioVideoEvent.THIRD_QUARTILE property defines the value of
the | ||||
UN_MUTE | unMute |
The StudioVideoEvent.UN_MUTE property defines the value of
the | ||||
VOLUME_CHANGE | volumeChange |
The StudioVideoEvent.VOLUME_CHANGE property defines the value of
the |
Inherited Fields
Constants
Name | Value | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
AFTER_REMOVED_FROM_STAGE | afterRemovedFromStage | Dispatched after the display object has been removed from the stage. import com.google.ads.studio.events.StudioEvent; import com.google.ads.studio.configurable.Configurable; var removedFromStageHandler:Function = function(event:StudioEvent):void { trace(stage); // "null" is output }; enabler.addEventListener( StudioEvent.AFTER_REMOVED_FROM_STAGE, removedFromStageHandler); | ||||||||
BEGIN_COLLAPSING | beginCollapsing |
The StudioEvent.BEGIN_COLLAPSING property defines the value of the
import com.google.ads.studio.events.StudioEvent; var enablerBeginCollapsingHandler:Function = function(event:StudioEvent):void { // Begin the collapse animations here. If there are no animations, // just set the ad to its collapsed state. trace("Ad began collapsing."); }; enabler.addEventListener(StudioEvent.BEGIN_COLLAPSING, enablerBeginCollapsingHandler); | ||||||||
BEGIN_EXPANDING | beginExpanding |
The StudioEvent.BEGIN_EXPANDING property defines the value of the
import com.google.ads.studio.events.StudioEvent; var enablerBeginExpandingHandler:Function = function(event:StudioEvent):void { // Begin the expand animations here. If there are no animations, // just set the ad to its expanded state. trace("Ad began expanding."); }; enabler.addEventListener(StudioEvent.BEGIN_EXPANDING, enablerBeginExpandingHandler); | ||||||||
CHANGE_INPUT_VARIABLE | changeInputVariable |
The StudioEvent.CHANGE_INPUT_VARIABLE property defines the value of the
| ||||||||
COLLAPSE_BEGIN | collapseBegin |
The StudioEvent.COLLAPSE_BEGIN property defines the value of the
import com.google.ads.studio.events.StudioEvent; var collapseBeginHandler:Function = function(event:StudioEvent):void { trace("Collapse begins."); }; expanding.addEventListener( StudioEvent.COLLAPSE_BEGIN, collapseBeginHandler); | ||||||||
COLLAPSE_COMPLETE | collapseComplete |
The StudioEvent.COLLAPSE_COMPLETE property defines the value of the
import com.google.ads.studio.events.StudioEvent; var collapseCompleteHandler:Function = function( event:StudioEvent):void { trace("Collapse completed."); }; expanding.addEventListener( StudioEvent.COLLAPSE_COMPLETE, collapseCompleteHandler); | ||||||||
CONNECT | connect |
The StudioEvent.CONNECT property defines the value of the
import com.google.ads.studio.events.StudioEvent; var connectHandler:Function = function(event:StudioEvent):void { trace("Connection succeeded."); }; lcComponentInstance.addEventListener( StudioEvent.CONNECT, connectHandler); | ||||||||
CONTEXT_FAIL | contextFail | Dispatched when retrieval of contextual data fails for any reason. import com.google.ads.studio.ContextualDiscovery; import com.google.ads.studio.events.StudioEvent; var failHandler:Function = function(event:StudioEvent):void { trace("Component failed to intialize."); }; ContextualDiscovery.getInstance().addEventListener( StudioEvent.CONTEXT_FAIL, failHandler); | ||||||||
CONTEXT_LOAD | contextLoad | Dispatched when the contextual data is available. The properties of the event object have the following values:
import com.google.ads.studio.ContextualDiscovery; import com.google.ads.studio.events.StudioEvent; var terms:Array; var latitude:Number; var longitude:Number; var dataHandler:Function = function(dataEvent:StudioEvent):void { terms = dataEvent.terms; latitude = dataEvent.latitude as Number; longitude = dataEvent.longitude as Number; }; ContextualDiscovery.getInstance().addEventListener( CONTEXT_LOAD, dataHandler); ContextualDiscovery.getInstance().discoverContext(); | ||||||||
DATA_RECEIVED | dataReceived |
The StudioEvent.DATA_RECEIVED property defines the value of the
import com.google.ads.studio.events.StudioEvent; var dataReceivedHandler:Function = function(event:StudioEvent):void { trace("Data sent."); trace("Sender is " + event.sender + "."); trace("Message is " + event.data + "."); }; lcComponentInstance.addEventListener( StudioEvent.DATA_RECEIVED, dataReceivedHandler); | ||||||||
EXIT | exit |
The StudioEvent.EXIT property defines the value of the
import com.google.ads.studio.events.StudioEvent; var exitHandler:Function = function(event:StudioEvent):void { trace("Exit clicked."); }; enabler.addEventListener(StudioEvent.EXIT, exitHandler); | ||||||||
EXPAND | expand |
The StudioEvent.EXPAND property defines the value of the
import com.google.ads.studio.events.StudioEvent; var expandHandler:Function = function(event:StudioEvent):void { trace("Ad expanded."); }; expanding.addEventListener(StudioEvent.EXPAND, expandHandler); | ||||||||
F2F_CUSTOM_EVENT | f2fCustomEvent |
The StudioEvent.F2F_CUSTOM_EVENT property defines the value of the
| ||||||||
FAIL | fail |
The StudioEvent.FAIL property defines the value of the
import com.google.ads.studio.events.StudioEvent; var failHandler:Function = function(event:StudioEvent):void { trace("Component failed to intialize."); }; component.addEventListener(StudioEvent.FAIL, failHandler); | ||||||||
FULL_SCREEN | fullScreen |
The StudioEvent.FULL_SCREEN property defines the value of the
import com.google.ads.studio.events.StudioEvent; var fsOpenHandler:Function = function(event:StudioEvent):void { trace("Fullscreen opened."); }; enabler.addEventListener(StudioEvent.FULL_SCREEN, fsOpenHandler); | ||||||||
FULL_SCREEN_EXIT | fullScreenExit |
The StudioEvent.FULL_SCREEN_EXIT property defines the value of the
import com.google.ads.studio.events.StudioEvent; var fsCloseHandler:Function = function(event:StudioEvent):void { trace("Fullscreen closed."); }; enabler.addEventListener(StudioEvent.FULL_SCREEN_EXIT, fsCloseHandler); | ||||||||
INIT | init |
The StudioEvent.INIT property defines the value of the
import com.google.ads.studio.events.StudioEvent; var enablerInitHandler:Function = function(event:StudioEvent):void { trace("Enabler initialized."); }; enabler.addEventListener(StudioEvent.INIT, enablerInitHandler); | ||||||||
INTERACTION | interaction |
The StudioEvent.INTERACTION property defines the value of the
import com.google.ads.studio.events.StudioEvent; var enablerInteractionHandler:Function = function( event:StudioEvent):void { trace("User interacted."); }; enabler.addEventListener( StudioEvent.INTERACTION, enablerInteractionHandler); | ||||||||
LAYOUT_CHANGED | layoutChanged |
The StudioEvent.LAYOUT_CHANGED property defines the value of the
import com.google.ads.studio.events.StudioEvent; var layoutChangedHandler:Function = function(event:StudioEvent):void { // Update any components that use layouts.placeholder and aren't // already using binding! }; enabler.addEventListener(StudioEvent.LAYOUT_CHANGED, layoutChangedHandler); | ||||||||
LOAD | load |
The StudioEvent.LOAD property defines the value of the
import com.google.ads.studio.events.StudioEvent; var loadHandler:Function = function(event:StudioEvent):void { trace("Loaded."); }; loaderInstance.addEventListener(StudioEvent.LOAD, loadHandler); | ||||||||
LOAD_INIT | loadInit |
The StudioEvent.LOAD_INIT property defines the value of the
| ||||||||
MAP_FAIL | mapFail | Dispatched when the map has failed to load. import com.google.ads.studio.events.StudioEvent; var mapFailedHandler:Function = function(event:StudioEvent):void { trace("Map failed. Showing alternative content."); }; studioMapInstance.addEventListener( StudioEvent.MAP_FAIL, mapFailedHandler); | ||||||||
MAP_LOAD | mapLoad | Dispatched when users location is loaded. The properties of the event object have the following values:
import com.google.ads.studio.events.StudioEvent; import com.google.maps.LatLng; var locationHandler:Function = function(event:StudioEvent = null):void { trace("Location loaded:" + studioMapInstance.getLocation().toString()); }; if (studioMapInstance.getLocation()) { locationHandler(); } else { studioMapInstance.addEventListener( StudioEvent.MAP_LOAD, locationHandler); } | ||||||||
MAP_PREINIT | mapPreInit | Dispatched when the map is ready to have its init options set. import com.google.ads.studio.events.StudioEvent; import com.google.maps.MapOptions; import com.google.maps.MapType; var mapPreInitializeHandler:Function = function(event:StudioEvent):void { var mapOptions:MapOptions = new MapOptions(); mapOptions.mapType = MapType.NORMAL_MAP_TYPE; studioMapInstance.setInitOptions(mapOptions); }; studioMapInstance.addEventListener(StudioEvent.MAP_PREINIT, mapPreInitializeHandler); | ||||||||
PAGE_LOADED | pageLoaded |
The StudioEvent.PAGE_LOADED property defines the value of the
import com.google.ads.studio.events.StudioEvent; var pageLoadedHandler:Function = function(event:StudioEvent):void { trace("Page loaded."); }; enabler.addEventListener(StudioEvent.PAGE_LOADED, pageLoadedHandler); | ||||||||
PAUSE | pause |
The StudioEvent.PAUSE property defines the value of the
import com.google.ads.studio.events.StudioEvent; var enablerPauseHandler:Function = function(event:StudioEvent):void { // Pause all animations here. trace("Ad paused."); }; enabler.addEventListener(StudioEvent.PAUSE, enablerPauseHandler); | ||||||||
REPORT_EVENT | reportEvent |
The StudioEvent.REPORT_EVENT property defines the value of the
| ||||||||
REPORT_FLUSH_EVENT | reportFlushEvent |
The StudioEvent.REPORT_FLUSH_EVENT property defines the value of the
| ||||||||
RESUME | resume |
The StudioEvent.RESUME property defines the value of the
import com.google.ads.studio.events.StudioEvent; var enablerResumeHandler:Function = function(event:StudioEvent):void { // Resume animations here. trace("Ad resumed."); }; enabler.addEventListener(StudioEvent.RESUME, enablerResumeHandler); | ||||||||
SCENE_ACTIVE | sceneActive | Dispatched just before the Layouts component activates a scene. The properties of the event object have the following values:
import com.google.ads.studio.events.StudioEvent; import com.google.ads.studio.layouts.Layouts; var sceneChangeHandler:Function = function(event:StudioEvent):void { if (event.isDynamic) { // Make sure the scene's parent object is on display. var sceneParentObject:DisplayObject = event.parent; clearStage(); addChild(sceneParentObject); trace("A dynamic scene is now active:" + event.sceneName); } else { trace("A scene is now active:" + event.sceneName); } }; Layouts.getInstance().addEventListener( StudioEvent.SCENE_ACTIVE, sceneChangeHandler); | ||||||||
STAGE_MOUSE_OUT | stageMouseOut |
The StudioEvent.STAGE_MOUSE_OUT property defines the value of the
import com.google.ads.studio.events.StudioEvent; var stageMouseOutHandler:Function = function(event:StudioEvent):void { trace("Mouse out."); }; enabler.addEventListener( StudioEvent.STAGE_MOUSE_OUT, stageMouseOutHandler); | ||||||||
STAGE_MOUSE_OVER | stageMouseOver |
The StudioEvent.STAGE_MOUSE_OVER property defines the value of the
import com.google.ads.studio.events.StudioEvent; var stageMouseOverHandler:Function = function(event:StudioEvent):void { trace("Mouse over."); }; enabler.addEventListener( StudioEvent.STAGE_MOUSE_OVER, stageMouseOverHandler); | ||||||||
START | start |
The StudioEvent.START property defines the value of the
import com.google.ads.studio.events.StudioEvent; var enablerStartHandler:Function = function(event:StudioEvent):void { trace("Ad started."); // Start animation now. }; enabler.addEventListener(StudioEvent.START, enablerStartHandler); | ||||||||
STATE_ACTIVE | stateActive | Dispatched just before the Layouts component activates a state (scene). The properties of the event object have the following values:
import com.google.ads.studio.events.StudioEvent; import com.google.ads.studio.configurable.Configurable; var stageChangeHandler:Function = function(event:StudioEvent):void { if (event.isDynamic) { // Make sure the stage's parent object is on display. var stageParentObject:DisplayObject = event.parent; clearStage(); addChild(stageParentObject); trace("A dynamic stage is now active:" + event.stageName); } else { trace("A stage is now active:" + event.stageName); } }; Configurable.getInstance().addEventListener( StudioEvent.STATE_ACTIVE, stageChangeHandler); | ||||||||
STOP | stop |
The StudioEvent.STOP property defines the value of the
import com.google.ads.studio.events.StudioEvent; var enablerStopHandler:Function = function(event:StudioEvent):void { trace("Ad stopped."); // Stop animations, videos, and audio, and clean up. }; enabler.addEventListener(StudioEvent.STOP, enablerStopHandler); | ||||||||
TIMEOUT | timeout |
The StudioEvent.TIMEOUT property defines the value of the
import com.google.ads.studio.events.StudioEvent; var timeoutHandler:Function = function(event:StudioEvent):void { trace("Connection failed."); }; lcComponentInstance.addEventListener( StudioEvent.TIMEOUT, timeoutHandler); | ||||||||
UPDATE | update |
The Event.UPDATE property defines the value of the
import com.google.ads.studio.video.EnhancedVideoController; import com.google.ads.studio.video.Playlist; import com.google.ads.studio.events.StudioEvent; var videoController:EnhancedVideoController = videoComponentInstance.getCurrentVideoController(); var playlist:Playlist = videoComponentInstance.getPlaylist(); var videoControllerChangeHandler:Function = function( event:StudioEvent):void { videoController = videoComponentInstance.getCurrentVideoController(); trace("Video controller has changed."); }; playlist.addEventListener( StudioEvent.UPDATE, videoControllerChangeHandler); | ||||||||
VOLUME_CHANGE | volumeChange |
The StudioEvent.VOLUME_CHANGE property defines the value of the
import com.google.ads.studio.events.StudioEvent; var enablerVolumeChangeHandler:Function = function(event:StudioEvent):void { // set video.volume to event.volume trace("Volume changed."); }; enabler.addEventListener(StudioEvent.VOLUME_CHANGE, enablerVolumeChangeHandler); |
Constructors
StudioVideoEvent(type:String)
Static Methods
StudioVideoEvent.getAllEvents()
:
Array
Returns an array of strings of all the video events.
StudioVideoEvent.getAllNetStreamInfoEvents()
:
Array
Returns an array of all the NetStream status events events that are currently used.
StudioVideoEvent.getAllPlaybackEvents()
:
Array
Returns an array of all the events that relate to video playback.
StudioVideoEvent.getAllPlayerAndPlaybackEvents()
:
Array
Returns an array of all the events that relate to the video player and video playback.
StudioVideoEvent.getAllPlayerEvents()
:
Array
Returns an array of all the events that relate to the video player.
Instance Methods
Defined in: com.google.ads.studio.events:StudioEvent
addProperty(key:String, value:Object)
:
StudioEvent
Adds a key value property to the event object.
getLogLevel()
:
int
Gets the logging level associated with the StudioEvent.
Defined in com.google.ads.studio.events:StudioVideoEvent
clone()
:
Event