Hi all,
First off, I’m glad to be here (first post!) I’ve been putzing around reading forums and tutorials here for a little while, and I’m hoping someone can help me out here.
I’ve been tasked to create a training tool for our company website. It will be a Flash file consisting of 4 frames; each frame will play a movieclip (or several), display the steps required to use our product (the steps will change every frame) and have a button to move to the next frame.
My problem is this. We want the previous clips to play in each frame every time; so frame 1 will play step 1, frame 2 will play step 1 and then step 2, etc. This means I need to load a clip, have it play, unload it when it finishes, load a new one in the same place on the stage, and play it. Also, the end of the last clip to play in each frame should cause text to appear on the stage.
Now I have a basic understanding of programming and I’m generally good at figuring out a script in front of me, but I’m really unfamiliar with AS3 and this has gone beyond me. I can get around it by simply creating four .flvs, one for each frame, that have all the video content for that frame contained within a single clip (so the first would be 15 seconds, the next 30, the next 45, etc), but I’m afraid that will bloat the file to an unusable degree. I’d really rather do it with load/unload functionality.
As near as I can figure, the structure should look like this:
create an array to store the names of the movieclips
create a variable to store the currentFrame number
create a variable to store the arraypos for the frame
Enter a frame
for (x = 0; x <= arraypos; x++)
load clip in arraypos x;
play that clip;
unload that clip;
Make text appear
Then I would put this code in the first frame of my actions layer and it should run appropriately. Is this right? And what functions/event handlers do I need to call to execute the code in the for loop?
Did I mention this has to be done by Monday? (Gotta love small companies).