/**
* 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. plsql导入cvs 时提示missing right parenthesis

    删除自动生成的时间格式值,如:SQL function框里自动生成的值

  2. 【CQ18高一暑假前挑战赛4】标程

    [二分或者STL] 二分: #include<bits/stdc++.h> using namespace std; ; int a[maxn]; int main() { ,pos; s ...

  3. MTK DDR调试

    1. 获取 flash id: 硬件信息:通过这个节点可以知道当前flash的id,上层根据id找到对应的flash名字. cat /sys/block/mmcblk0/device/cid \ker ...

  4. 数论 N是完全平方数 充分必要条件 N有奇数个约数

    N是完全平方数 <----> N有奇数个约数 设:N = n*n 充分性: 1.N=1时,N的约数为1,为奇数 2.N>1时,1.....n......N,其中 1, n, N为N的 ...

  5. 使用 SourceTree 管理ios项目

    SourceTree 是一个非常优秀的版本控制软件,他是一个客户端,方便我们去接入 GitHub .BitBucke 上面托管的代码. 声明(1——4是来自简书的非个人作品,仅仅保存资料学习使用) 一 ...

  6. Python深入浅出property特性属性

    导语 在Java中,通常在类中定义的成员变量为私有变量,在类的实例中不能直接通过对象.属性直接操作,而是要通过getter和setter来操作私有变量. 而在Python中,因为有property这个 ...

  7. Flask_restful 插件实战笔记——基本概念与使用

       最近在Resetful接口设计上想法还是挺多的,也实现了一些需求!想着整理下Flask_restful插件的基本知识,方便日后的复习!   官方地址:https://flask-restful. ...

  8. Identity Server 4 原理和实战(完结)_Implicit Flow 实例

    oidc-client.js貌似是IdentityServer4的团队开发的 服务端的设置 在服务端新增一个Client 之后需要在angular客户端页建两个页面,对应这两个url才行 登出之后要跳 ...

  9. 获取DataGridView上选中的一行并转换为一个DataRow类型

    ataGridViewRow gridrow = dataGridView1.SelectedRows[0]; DataRowView row_view = (DataRowView)gridrow. ...

  10. django使用QQ企业邮箱发送邮件

    一.首先申请QQ企业邮箱 免费QQ企业邮箱地址如下:https://exmail.qq.com/signupfree?refer=intro#signup/free 二.配置自己的域名 在域名解析中添 ...