zoukankan      html  css  js  c++  java
  • flash as3转换的注意事项

    http://bbs.egret.com/thread-17443-1-1.html

     

    还有一些:

    1,getClass('abc');

         转换为 ['abc']

    2,flash.SwfMovie  转换为egret.MovieClip ;

    3 , 当flash.As3is  后面的是字符串类型时 如a.“boolean” 可以转换为   == "boolean" 

    4 , this.addChild() ; 可以转换成 this["addChild"]

    5,if (flash.As3is(panel, null, "view.BasePopup == false"))  转换为 if (panel instanceof view.BasePopup == false) {

    6,

    if (flash.As3is(this.m_list["getChildAt"](0), view.AllianceDailyPublishCell)) {
    (flash.As3As(this.m_list["getChildAt"](0), view.AllianceDailyPublishCell)).reset();
    }  转换为
    if (this.m_list["getChildAt"](0) instanceof view.AllianceDailyPublishCell) {
    (this.m_list["getChildAt"](0) as view.AllianceDailyPublishCell).reset();
    }

     7, var t1 : com.greensock.TimeLineLite = <any>new TimeLineLite();

    t1["to"](this.method , 0.5 {alpha :1})

    可以改成:

    var t1 = egret.Tween.get(this.method);

    t1.to({alpha : 1 } , 500);

    8,//TweenLite.to(text, 0.5, { alpha: 1, onComplete: stopIt1 }); 可以改成

    var tw = egret.Tween.get(text);
    tw.to({ alpha: 1 }, 500).call(stopIt1);

     9,

    //TweenMax.killTweensOf(this._MC);
    egret.Tween.removeTweens(this._MC);

    // this.tl["to"](this.m_scrollView, 0.5, { x: 70, ease: Quad.easeOut, onComplete: this.aniEnd,onCompleteParams: [1] });
    this.tl = egret.Tween.get(this.m_scrollView);
    this.tl["to"]({ x: 70}, 500, egret.Ease.sineOut).call(this.aniEnd, [1]);

    15,

    //this._listeners.setItem(_arg1, []);
    this._listeners[_arg1] = [];

    16,

    //this.funcToTimerDic.delItem(onTimerFunc);
    delete this.funcToTimerDic["onTimerFunc"];

     17,就是egret.setTimeout的第二个参数是this

    而 setTimeout里的第二个参数是延迟时间间隔 第三个参数才是作用域
    18,

    //TweenLite.delayedCall((30 * dt), this.sendAtkCmd, [dic]);
    egret.setTimeout(this.sendAtkCmd, this, (30 * dt),dic);

    17,flash中的后缀为 .swf 的文件相当于 白鹭中 eui库的 .exml文件 

  • 相关阅读:
    nginx限流方案的实现(三种方式)
    Pthreads并行编程之spin lock与mutex性能对比分析(转)
    C/C++中float和double的存储结构(转)
    list_entry(ptr, type, member)——知道结构体内某一成员变量地址,求结构体地址
    stderr和stdout详细解说(转)
    结构体内存分配理解
    C中的C文件与h文件辨析(转)
    访问vector元素方法的效率比较(转)
    linux c中select使用技巧——计时器(转)
    thread::id
  • 原文地址:https://www.cnblogs.com/RitaLee/p/6339999.html
Copyright © 2011-2022 走看看