zoukankan      html  css  js  c++  java
  • mediamind SyncAds

    1.可以用在两个层次上:campaign level  and the ad level

    2

    Ad 1 - The ad that sends the message

    Ad 2 - The ad that receives the message

    //import the SyncAds class

    import eyeblaster.utilities.syncAds.SyncAds;

    //create an instance of the SyncAds class

    var syncAd_mc:SyncAds = new SyncAds();

    //set the synchronization level.

    //Possible values:"ad", "campaign"

    //Note: This function is optional, but if used,

    //should be the first function called.

    syncAd_mc.level = "campaign";

    //look for a connection name called "sidePanel" for

    //5 seconds

    syncAd_mc.findConnection("sidePanel",5);

    //an event that will be called when the

    //connection that was being looked for was found.

    syncAd_mc.onConnectionFound = doSyncAction;

    //an event that will be called in case the

    //connection that was being looked for was not

    //found after the 5 seconds of searching.

    syncAd_mc.onConnectionNotFound = doConnectionNotFound;

    //the function that was designated to fire after the //onConnectionFound event is triggered.This

    //function will usually contain the calls that start

    //the synchronization between the ads or assets.

    function doSyncAction(connectionName:String)

    {

    //this function is used to send the event //to a specific resource.

    syncAd_mc.callConnection(connectionName, "doSidePanelAction");

    movingClip.play();

    }

    //the function that was designated to fire after the //onConnectionNotFound event is triggered.

    function doConnectionNotFound(connectionName:String)

    {

    trace("connectionName: " + connectionName + " was not found");

    }

     

    //import the SyncAds class

    import eyeblaster.utilities.syncAds.SyncAds;

    //create an instance of the SyncAds class

    var syncAd_mc:SyncAds = new SyncAds();

    //set the synchronization level.

    //Possible values:"ad", "campaign"

    //Note: This function is optional, but if used, should be the //first function called.

    syncAd_mc.level= "campaign";

    //open a connection named “side”panel”

    syncAd_mc.openConnection("sidePanel");

    //Event function ("doSidePanelAction") that is

    //called by the other Ad. In this example it is called by the //syncAd_mc.callConnection("sidePanel",

    //"doSidePanelAction"); function in the other asset

    function doSidePanelAction()

    {

    // plays animation in panel.

    movingPanelClip.play();

    }

     

     

     

  • 相关阅读:
    WEB手机端界面绝对定位分辨率扩大导致错乱问题和块级元素旋转角度CSS
    8.1 设置滑动效果和多媒体
    2.4 链接文字属性和标记元素
    2.3元信息标记 meta
    记录这几天工作内容发现的兼容性问题
    WEB前端开发工程师成长之路(计划)
    IE兼容CSS3圆角border-radius的方法
    Quirks模式是什么?
    让所有浏览器包括IE6即支持最大宽度又支持最小宽度。
    ie6下png背景显示问题?
  • 原文地址:https://www.cnblogs.com/1000pen/p/2751655.html
Copyright © 2011-2022 走看看