zoukankan      html  css  js  c++  java
  • 一些API

    /**
    * Goto the specified frame index, and pause at this index.
    * @param startIndex The animation will pause at this index.
    */
    gotoFrameAndPause: function(startIndex){
    this._startFrame = this._currentFrame = startIndex;
    this._time = this._currentFrame * this._frameInternal;

    this.pause();
    this._gotoFrame(this._currentFrame);
    },
    action.gotoFrameAndPause(0)
        _gotoFrame: function(frameIndex){
            var size = this._timelineList.length;
            for(var i = 0; i < size; i++)
            {
                this._timelineList[i]._gotoFrame(frameIndex);
            }
        },
     /**
         * Goto the specified frame index, and start playing from this index.
         * @param startIndex The animation will play from this index.
         * @param [endIndex=] The animation will end at this index.
         * @param [currentFrameIndex=] set current frame index.
         * @param [loop=] Whether or not the animation need loop.
         */
        gotoFrameAndPlay: function(startIndex, endIndex, currentFrameIndex, loop){
            //Consolidation parameters
            var i = 0,
                argLen = arguments.length;
            var num = [],
                bool;
            for(i; i<argLen; i++){
                if(typeof arguments[i] === "boolean"){
                    bool = arguments[i];
                }else{
                    num.push(arguments[i]);
                }
            }
            startIndex = num[0];
            endIndex = num[1] || this._duration;
            currentFrameIndex = num[2] || startIndex;
            loop = bool!=null ? bool : true;
    
            this._startFrame = startIndex;
            this._endFrame = endIndex;
            this._currentFrame = currentFrameIndex;
            this._loop = loop;
            this._time = this._currentFrame * this._frameInternal;
    
            this.resume();
            this._gotoFrame(this._currentFrame);
        },
  • 相关阅读:
    使用SWFUpload无刷新上传图片
    WP多语言
    C#将DataTable转化为List<T>
    Android 多语言
    Android开发 Failed to install *.apk on device 'emulator-5554': EOF
    ASP.NET MVC中将数据从Controller传递到视图
    安装和卸载程序时总是出现2502,2503错误代码的解决方法
    position固定菜单栏
    [position]返回顶部
    [css]后台管理系统布局
  • 原文地址:https://www.cnblogs.com/kanekiken/p/7358815.html
Copyright © 2011-2022 走看看