/**
* 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);
},

一些API的更多相关文章

  1. 干货来袭-整套完整安全的API接口解决方案

    在各种手机APP泛滥的现在,背后都有同样泛滥的API接口在支撑,其中鱼龙混杂,直接裸奔的WEB API大量存在,安全性令人堪优 在以前WEB API概念没有很普及的时候,都采用自已定义的接口和结构,对 ...

  2. 12306官方火车票Api接口

    2017,现在已进入春运期间,真的是一票难求,深有体会.各种购票抢票软件应运而生,也有购买加速包提高抢票几率,可以理解为变相的黄牛.对于技术人员,虽然写一个抢票软件还是比较难的,但是还是简单看看123 ...

  3. 几个有趣的WEB设备API(二)

    浏览器和设备之间还有很多有趣的接口, 1.屏幕朝向接口 浏览器有两种方法来监听屏幕朝向,看是横屏还是竖屏. (1)使用css媒体查询的方法 /* 竖屏 */ @media screen and (or ...

  4. html5 canvas常用api总结(三)--图像变换API

    canvas的图像变换api,可以帮助我们更加方便的绘画出一些酷炫的效果,也可以用来制作动画.接下来将总结一下canvas的变换方法,文末有一个例子来更加深刻的了解和利用这几个api. 1.画布旋转a ...

  5. JavaScript 对数据处理的5个API

    JavaScript对数据处理包括向上取整.向下取整.四舍五入.固定精度和固定长度5种方式,分别对应ceil,floor,round,toFixed,toPrecision等5个API,本文将对这5个 ...

  6. ES5对Array增强的9个API

    为了更方便的对Array进行操作,ES5规范在Array的原型上新增了9个方法,分别是forEach.filter.map.reduce.reduceRight.some.every.indexOf ...

  7. javascript的api设计原则

    前言 本篇博文来自一次公司内部的前端分享,从多个方面讨论了在设计接口时遵循的原则,总共包含了七个大块.系卤煮自己总结的一些经验和教训.本篇博文同时也参考了其他一些文章,相关地址会在后面贴出来.很难做到 ...

  8. 一百元的智能家居——Asp.Net Mvc Api+讯飞语音+Android+Arduino

    大半夜的,先说些废话提提神 如今智能家居已经不再停留在概念阶段,高大上的科技公司都已经推出了自己的部分或全套的智能家居解决方案,不过就目前的现状而言,大多还停留在展厅阶段,还没有广泛的推广起来,有人说 ...

  9. 在一个空ASP.NET Web项目上创建一个ASP.NET Web API 2.0应用

    由于ASP.NET Web API具有与ASP.NET MVC类似的编程方式,再加上目前市面上专门介绍ASP.NET Web API 的书籍少之又少(我们看到的相关内容往往是某本介绍ASP.NET M ...

  10. bootstrap + requireJS+ director+ knockout + web API = 一个时髦的单页程序

    也许单页程序(Single Page Application)并不是什么时髦的玩意,像Gmail在很早之前就已经在使用这种模式.通常的说法是它通过避免页面刷新大大提高了网站的响应性,像操作桌面应用程序 ...

随机推荐

  1. eclipse 卡死设置

    都说eclipse比myeclipse小巧,但是 殊不知 用起来这么这么的卡,最后查资料,才知道是 配置给他的内存太 太小了,怪不得 他一直想着罢工呢. 在eclipse.ini文件中原来的配置如下: ...

  2. nyoj 86 --位标记

    nyoj 86 --位标记 点击打开题目链接 :                        找球号(一)  这道题目很多解法,其他解法请参考 http://www.cnblogs.com/play ...

  3. Linux中进程控制块PCB-------task_struct结构体结构

    Linux中task_struct用来控制管理进程,结构如下: struct task_struct { //说明了该进程是否可以执行,还是可中断等信息 volatile long state; // ...

  4. OTL之Oracle开发总结《转》

    OTL之Oracle开发总结---转   关 于OTL,网上介绍的也不少,但看来看去也只是官方的那些文档.OTL很好用,结合官方提供的一些例子,多多尝试才能领悟.经过一个月左右的项目开发,对 OTL也 ...

  5. float和Float的区别

    float是基本数据类型,Float是包装类(封装类).封装类可将接本数据类型封装后当作对象进行操作,并为各种基本数据类型提供各种转换功能.例如Float f = new Float(3.4f);,即 ...

  6. 深度技术Win7系统利用diskpart命令实现硬盘分区的技巧

    转自:http://www.xitongcheng.com/jiaocheng/win7_article_2491.html 1. 深度技术Win7系统利用diskpart命令实现硬盘分区的技巧分享给 ...

  7. hibernate Criteria中or和and的用法

    /s筛选去除无效数据 /*      detachedCriteria.add( Restrictions.or( Restrictions.like("chanpin", &qu ...

  8. spring使用过程中遇到的问题

    1.出现这样的错误:The type org.springframework.core.NestedRuntimeException cannot be resolved. It is indirec ...

  9. 20个Flutter实例视频教程-第06节: 酷炫的路由动画-2

    博客地址: https://jspang.com/post/flutterDemo.html#toc-94f 视频地址: https://jspang.com/post/flutterDemo.htm ...

  10. XSL简单实例

    利用xsl可以做到将数据和格式完全分离,下面比较一个xml+css和xml+xsl的区别. XML + css resume.xml文件内容如下: <?xml version="1.0 ...