[Page 1] [Page 2] [Page 3] [Page 4] [Page 5] |
37. Repeat steps 33-36 for the rest of the sections. |
38. Go back to the main movie and double click frame 15 on the "Section 1" layer. The actions window
appears again. Find "loadMovie" under the "Basic Actions" and drag it to the right. URL:Section 1.swf Location:Target /Load Vriables:Don't Send Close the dialog box. |
![]() |
39. Repeat this step on the last frame of the other sections (for example frame 22). |
40. Save your work and then press F12 to publish. Play around with it a bit. You'll notice a problem... if you click on Button 1 when you're already in that section it repeats the animation or if you press on Button 2 in the middle of the animation on the Button 1 sequence then it cuts it in the middle. Well Solving that problem is next. |
41. We solve this using two variables: "CurrentSection" and "Proc". CurrentSection tell us which section we're in and "Proc" tells us whether an animation is taking place right now. |
42. Create a new layer and name it "Action" Create a keyframe at the beginning and end of every section. That means at 9 and 15 and 16 and 22 (and so on). Also Create one at the first frame. |
43. Double Click on the first frame in order to open the actions window. Drag "setVariable" under
Actions to the right and Under "Variable" write "CurrentSection" and under "Value" write "Main"
and both the "Expression" boxes unchecked. Drag "setVariable" again and Under "Variable" write "Proc" and under "Value" write "False" this time the second "Expression" box should be checked. |
44. Now Click on frame 9 (same layer) drag "setVariable" and Variable:Proc Value:True Unchecked,
Checked.
Click on frame 15 drag "setVariable", Variable:Proc Value:False Unchecked,Checked. Drag "setVariable" again and Variable:CurrentSection Value:Section 1 Unchecked,Unchecked. Click on frame 16 drag "setVariable", Variable:Proc Value:True Unchecked,Checked. Click on frame 22 drag "setVariable", Variable:Proc Value:False Unchecked,Checked. Drag "setVariable" Variable:CurrentSection Value:Section 2 Unchecked,Unchecked. |
45. Right Click on the first button and choose Actions. Drag "if" under "Actions" to the right. "Condition:Proc eq False". Drag "if" again. "Condition:CurrentSection != "Section 1" ". And arrange it like in the image. |
![]() |
46. Do the same on the other buttons just change the CurrentSection condition to "Section X" (X being the section number). |
47. Publish by pressing Only F12 this time and test! |
That's it. Now a bit of clearing up. We built this flash site in this particular way for the following
reasons: a. The site is divided to multiple swfs thus preventing the user from waiting a long time before the site is completely loaded. b. you my have noticed we used the "loadMovie" action but not the "unLoadMovie" Action. This of course is on purpose. the UnloadMovie command deletes the swf from the cache. My way doesn't. My way loads a new movie each time on top of the old movie. All are cached and that is very good for business. c.By the way you might have noticed that I havn't added a preloader. Just create a new scene before every one of your movies and in it insert your preloader. Hope you enjoyed the Article/Tutorial I suggest you use the .fla files attached to follow, they are almost like the tutorial, I added some small effects that are not explained. If you have any questions just e-mail me at idanarbel@yahoo.com |
[Page 1] [Page 2] [Page 3] [Page 4] [Page 5] |