AS3.0重播整部影片(* SWF文件)整部、影片、文件、SWF

2023-09-08 13:00:10 作者:是否习惯这样

我在ActionScript 3.0和Flash做了一个小游戏。

I made a small game in Actionscript 3.0 and flash.

当玩家赢得游戏或者是游戏结束的玩家应该有一个选项,以重播比赛。

When the player wins the game or is 'game over' the player should have a option to replay the game.

所以我的问题是:有没有办法来回放整个电影用的Actionscript?我知道,我可以重新设置时间表回0,并重新实例化的所有类,影片剪辑,VAR的等...但我不知道是否有人知道一个简单的解决方案。

So my question is: Is there a way to replay the whole movie with Actionscript? I know, i could reset the timeline back to 0, and re-instantiate all the classes, movieclips, var's ect... but i was wondering if anyone knows a easier solution.

推荐答案

您可以删除SwfObject的,然后重新添加。看看这里。这是SWFObject的参考。

You can remove the swfObject and add it again. Look here. This is the swfObject reference.