Ole Media
Ole Media

Reputation: 1642

AS3 - how to start all over again a flash movie

This may be very simple, but I have no idea how to do this.

I created a photo gallery in AS3, everything is on one keyframe. In this photo gallery I have a link to home. My goal is, when someone clicks the "home" link I want everything to start over. Any ideas on how to do this in AS3?

Appreaciate it.

L.

Upvotes: 2

Views: 5156

Answers (2)

Shvilam
Shvilam

Reputation: 336

call flash player container
usually the HTML page and use JavaScript to reload the flash player

flash.external.ExternalInterface.call(jsFuncRestart);

jsFuncRestart is a JavaScript function in the HTML file

and now in the js function just create a new object and replace the current flash object
with the new one

Upvotes: 2

user56725
user56725

Reputation:

You probably animate everything with as3, right? Then just make a reset function that puts all the images back to their original place and start the animation all over.

Upvotes: 0

Related Questions