• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 872
  • Last Modified:

Replay Movie in Flash.

Hi, I have flash movie, that plays when page loads.  I've can get it to pause and resume, but is there any actionscript that will let the user click a button and that replays the movie?  I'm fairly new to actionScript so please be gentle.

Thanks in advance,
farkit
0
farkit
Asked:
farkit
  • 3
  • 2
2 Solutions
 
CyanBlueCommented:
Howdy...  :)

I guess it all depends on how your movie is set up, but this is the easiest one you can try...

This script goes to the replay button...

on (press)
{
   _root.gotoAndPlay(1);
}

CyanBlue
0
 
farkitAuthor Commented:
is _root a flash reserved keyword?
0
 
CyanBlueCommented:
Yes...  That means the main timeline...  :)

CyanBlue
0
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
farkitAuthor Commented:
Ok let me describe a little more. The flash file loads and plays automatically with page load.

I have a play button and a media (movie) object which is a flv file.  Everything is in first frame.
                 ___________________
Play Button |*| | | | |.....
Pause bttn  |*| | | | |.....
Media obj   |*| | | | |.....

When user clicks the Pause button, I have script that checks if movie is playing. If so, it will pause the movie.
-------------------
if myfile.playing {
   myfile.pause;
}
-------------------

similarly when user clicks play button the script checks if it is paused.  If so, it will resume playing.

What I need is that if the movie is finished playing and user clicks the play button the movie (flv) will start playing again.
If user clicks play button while the movie is playing, I want to ignore that click.

I understand I may not the very clear. Please ask if you can't understand anything.

0
 
CyanBlueCommented:
If you could create a small sample file, I could take a look...  ;)

CyanBlue
0
 
blue-genieCommented:
u just need to do exactly the same thing as your pause button.

if (!myfile.playing) {
myfile.play();
}
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

  • 3
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now