【问题标题】:Adobe Animate canvas play() not workAdobe Animate 画布播放()不起作用
【发布时间】:2016-12-17 04:31:58
【问题描述】:

我在画布 (html5) 上使用 Adob​​e Animate CC 制作横幅。我遇到了一个问题。

为什么movieclip 代码中的简单this.stop() 可以正常工作(就像好的旧ActionScript 一样),但是this.play() 会出错:不是函数。怎么回事?!

如何让我的时间线停止并在需要时播放动画?

完整代码如下:

this.stop()
window.setTimeout(go, 2000);


function go()
{
    this.play();
}

【问题讨论】:

    标签: javascript html actionscript jquery-animate adobe


    【解决方案1】:

    问题是“这个”。函数内部的 this 不再指代主舞台影片剪辑 - 它指的是函数。在你的函数前添加一行:

    var that=this;

    并将函数内的行更改为:

    那个.play();

    :)

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2016-10-21
      • 2020-08-21
      • 2016-05-17
      • 2018-05-13
      • 2021-06-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多