FLASH CC 2015 CANVAS 中 gotoAndStop、gotoAndPlay() 不起作用
2024-10-12 05:15:06
哎 话不多说先看我的代码:
//舞台上 放着sp0、sp1、...sp8,9个mc,每个mc都有几帧,
//帧上有如下代码
var S=this;
S.stop() inIt1();//not working! //setTimeout(inIt1,0);//use setTimeout and it is working ,why? function inIt1()
{
for (var i = 0; i <9; i++)
{
var _frame=Math.floor(Math.random() * S["sp" + i].totalFrames)
console.log(_frame)
S["sp" + i].gotoAndStop(_frame)
}
}
发现 gotoAndStop(xx)无效,即使使用gotoAndStop("标签名") 也无效,奇了怪了
解决办法: 然后我尝试用setTimeout 来执行 居然有效,即使我把延迟时间设置为0也有效。
为什么会这样还不得而知,已经发帖求组adobe 论坛了。期待他们的回复
//-------------------------------------------
今天实际验证后,发现只有 gotoAndStop,gotoAndPlay 无效。
最新文章
- JAVA Map
- 带回调函数的js运动框架
- SAP web 开发 (第二篇 bsp 开发 mvc模式 Part1 )
- EJDB 1.1.18 发布,嵌入式JSON数据库
- C#.Net 上传图片,限制图片大小,检查类型完整版
- find type d 命令批量删除禁用
- good mind
- 使用dispatch_once:创建单列
- Spring AOP切面
- MySQL表结构同步工具 mysql-schema-sync
- final对于访问效率的影响
- webgl鱼眼算法
- 云计算--网络原理与应用--20171120--VLAN与三层交换机配置
- lua 5.3最简单plugin编写
- Python开发——函数【Python内建函数】
- Fedora 19安装mysql
- DB2创建数据库常用参数详解
- 修改Centos7的网卡ens32 改为eth0
- E - A Twisty Movement
- day6 hashlib模块
热门文章
- MySQL start and stop
- centos7.1-64bit安装qtcreator
- svn down代码的时候提示“由于目标计算机积极拒绝,无法连接”
- 26、Oracle(二)
- PyChram使用技巧总结
- HDU 4315:Climbing the Hill(阶梯博弈)
- C++中new和delete来创建和释放动态数组
- MVC模式:实现数据库中数据的增删改查功能
- A Simple Problem with Integers
- Power Strings 分类: POJ 串 2015-07-31 19:05 8人阅读 评论(0) 收藏