Flasher Archive

[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]


Subject: Re: FLASH: Scripting
From: iNtRePiD
Date: Tue, 13 Jul 1999 21:09:40 +0100

At 02:25 PM 7/13/99 -0400, you wrote:
>I am making a preloader scene. The movie that will play while the rest of
>the stuff loads looks something like this:
>
>|||||||||||||||||||||||||
>
>where each bar would represent 4% of the total frames in the entire movie.
>I want to have an animation called "bars" in the preloader that would "light
>up" each bar when it's corresponding percentage value is reached. (Geez, I
>hope you can understand what I'm trying to say..) For example, if 12% of the
>entire movie is loaded, then only three bars in the animation would be
>"lighted up" and the rest would remain "off." Does anyone know how to write
>a script that would check how many frames are loaded, convert that into an
>integer value, and then call the appropriate frame from the "bars" movie.
>
>Thanks for any input on this, or if you know of any sites with tutorials on
>scripting please send them my way.
>
>Thanks,
>
>Arthur G.
>

Unfortunately, I don't usually get enough time to post full messages on
mailing lists regularly, but here you go.

Let's say your actual movie is 1000 frames long, and you have 10 bars in
that preloader to be lit one by one as your movie is loaded through its
frames 1-1000. Here's a simple technique for that:

Make a preloader movie clip and light each of the bars up one by one in
frames. Say your preloader spans 100 frames, so you might want to light
each bar at every tenth frame. All the "unlit" bars lie on the stage
already in frame 1 of the preloader. Also, each successive bar will be lit
up as every 10% of your movie is loaded. This is all for the setup.

Now, all you do is pick up a frame before frame 10 of the preloader and put
an "If frame is loaded" action statement in that frame. The frame will
check if frame number 100 of the actual movie is loaded (200 of the overall
movie as it contains first 100 frames of the preloader as well), and if the
frame is loaded, it will go and play frame 10 of the preloader, which
lights up the first bar. Similarly, between frame 10 and frame 20 of the
preloader, choose a frame that checks if frame 200 of the actual movie (300
overall) is loaded, and if it's loaded, goes and plays frame 20 of the
preloader (that lights up the second bar). And so on.

As you can see, this is a very basic technique and, thus, has a lot of room
for fine tuning and customization. Now that you can drag movie clips around
in Flash and drop them off with custom actions, you can do a whole lot of
other stuff with it, like letting the user "rewind" or "fast forward" the
movie, etc.


iNtRePiD
---------------------------------------------
Rush? Life's speedier than that!
---------------------------------------------

------------------------------------------------------------------------
To UNSUBSCRIBE send: unsubscribe flasher in the body of an
email to list-manageratshocker [dot] com. Problems to: owneratshocker [dot] com
N.B. Email address must be the same as the one you used to subscribe.
For info on digest mode send: info flasher to list-manageratshocker [dot] com


Replies
  FLASH: Scripting, Arthur Gralec

[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]