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);
        },
  • 相关阅读:
    SQL中的max()函数用法
    C#多线程
    C#操作redis
    spring+mybatis 多数据库事务
    实战项目中 :一个业务对多个数据库操作的同步的处理办法(要么都成功,要么都失败)Threadlocal 数据库事务
    redis之数据操作详解
    C# 两个数组取交集/补集 Intersect()
    MySQL创建索引
    MySQL每日执行
    MySQL删除重复数据
  • 原文地址:https://www.cnblogs.com/kanekiken/p/7358815.html
Copyright © 2011-2022 走看看