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);
        },
  • 相关阅读:
    arp攻击 (可查看同一局域网他人手机照片)
    SQL注入(转载)
    常见文件文件头文件尾格式总结及各类文件头
    CTF
    Base64,Base32,Base16进制的区别
    Maven学习总结(二):安装
    Maven学习总结(一):基本概念
    Myeclipse下集成SVN插件
    Windows下多个JDK版本之间的切换
    java线程的常用方法
  • 原文地址:https://www.cnblogs.com/kanekiken/p/7358815.html
Copyright © 2011-2022 走看看