Dear Kman -
If you have the swf movies, and want as little work as possible, then
the (maybe) best way is to create a separate swf-file and (with
rewind, play and forward controls) load each and every of your
swf-files into that movie.
I have written the code with Flash4 compliancy for the greatest
possible audience (98% of all web surfers have Flash 4 installed).
This you only have to do once:
1)
Open flash.
2)
Draw a little square, place it where you want your movie to load,
press F8 and make it into a movie clip. Name that movie clip
"placeholder" (also give it the "instance name" placeholder).
3)
Create a new layer for scripting. In the first frame, paste this code:
// first we tell the control movie to load your
// movie into the placeholder we created
loadMovie ( "YourMovie.swf", "placeholder" );
// Here you can change f.i. do_play to false if you
// do not want your movie to start playing at once
do_play = true;
do_rewind = false;
do_forward = false;
// change the numbers if you want the rewinding
// to be faster (5 is faster than 4 ...)
rewind_step = 3;
forward_step = 2;
4)
Make a new keypoint on frame 2, and paste this code into that frame:
// This is the code that tells YourMovie to go forward, backward
// stop or play regularily:
if (do_rewind)
{
pos = placeholder._currentframe;
pos -= rewind_step;
if (pos < 1) pos = 1;
placeholder.pos = pos;
tellTarget ("placeholder")
{
gotoAndStop (pos)
}
}
else if (do_forward)
{
len = placeholder._totalframes;
pos = placeholder._currentframe;
pos += forward_step;
if (pos > len) pos = len;
placeholder.pos = pos;
tellTarget ("placeholder")
{
gotoAndStop (pos)
}
}
else if (do_play)
{
tellTarget ("placeholder")
{
play ();
}
}
else
{
tellTarget ("placeholder")
{
stop ();
}
}
5)
Then you need to make another keyframe at frame 3and paste in this
code:
gotoAndPlay (_currentframe - 1);
This code merely instructs the controller movie to step back and
repeat the code at point 4 again.
6)
Then you need 3 buttons: One for rewinding, one for play/stop and one
for forward:
6a) The rewind button needs this code:
on (press)
{
do_rewind = true;
}
on (release, releaseOutside)
{
do_rewind = false;
}
6b)
The play/stop button needs this code:
on (release)
{
do_play = !do_play;
}
6c)
The forward button needs this code:
on (press)
{
do_forward = true;
}
on (release, releaseOutside)
{
do_forward = false;
}
* * *
And that is all the scripting you need to control an imported movie. I
realize that this may be daunting if you have little experience with
ActionScripting. So I have zipped up all the files and placed them on
the net for you to look at (The one you want to look at is name
ScrubViewer.fla):
http://www.orgdot.com/ScrubViewer/ScrubViewer.zip
You can watch the result at
http://www.orgdot.com/ScrubViewer/
(You must of course disregard the ugly buttons and ugly design - you
propably are capable of making much better buttons than the ones I
have thrown together.)
Good luck! |