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文件 

  • 相关阅读:
    python17 .导模块的细节 包的概念 包中的相对导入语法 包的管理 _init_py文件的使用
    @lazy注解
    @Scope注解
    @ComponentScan 注解
    Spring IOC
    Spring体系
    java守护线程
    java线程优先级
    java线程生命周期
    java线程中start和run的区别
  • 原文地址:https://www.cnblogs.com/RitaLee/p/6339999.html
Copyright © 2011-2022 走看看