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
LVL 3
farkitAsked:
Who is Participating?
 
blue-genieConnect With a Mentor Commented:
u just need to do exactly the same thing as your pause button.

if (!myfile.playing) {
myfile.play();
}
0
 
CyanBlueConnect With a Mentor Commented:
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
Cloud Class® Course: CompTIA Healthcare IT Tech

This course will help prep you to earn the CompTIA Healthcare IT Technician certification showing that you have the knowledge and skills needed to succeed in installing, managing, and troubleshooting IT systems in medical and clinical settings.

 
CyanBlueCommented:
Yes...  That means the main timeline...  :)

CyanBlue
0
 
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.