Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | Re: FLASH: using "loop while" |
| From: | Cheri Harder |
| Date: | Wed, 16 Feb 2000 00:28:59 GMT |
Excellent response, Laura! I started to answer this one three times & gave
up in disgust at my inability to explain it. <grin> Another use I had
thought of was for a timer, where you can set a variable equal to the
GetTimer value and compare it to the new value of GetTimer (over and over in
the loop) until the difference between the first value and the new value is
"x" amount of time.
~~~~Cheri Harder~~~~~
charder
Advantage Web Solution
"Developing your internet storefront"
www.awsolution.com
----- Original Message -----
From: "Laura Mollett" <lmollett
To: <flasher
Sent: Tuesday, February 15, 2000 4:17 PM
Subject: Re: FLASH: using "loop while"
> > Good morning,
> > I wonder if someone could explain a few things about the "loop while"
> > statement. What kinds of conditions require it, what exactly does it
> > do, and how do you choose the number such as loop while n < 1, etc.??
> > I just got Flash 4 magic which gives alot of code, but I still wish I
> > could find something which would tell me why and for which situations
> > I would use certain statements.
> > Thanks in advance,
> > Karin
>
> Hi Karin,
> The "loop while" statement generally loops while a counter is less than a
> number. You might set the counter to 0, have the counter increment by +1
> each time it goes through the loop, and continue until a specified upper
> limit is reached.
>
> In the Flash 4 Magic Matching Game, the first loop makes a name: "smiley"
&
> a number = "smiley1" - "smiley12" for each of the pieces (and when it gets
> to 12 - i.e., all the pieces - it quits). The second loop creates a
location
> and the 3rd loop (nested) assigns a smiley to that location. The first
loop
> is while the counter is less than or equal to 12 because that's all the
> pieces. The 2nd loop makes spots row by row - so it creates row 1, column
1
> to row 1 column 4 so it loops while the counter is less than or equal to 4
> (then the nested loop places those tiles) then starts again for the next
> row. The 3rd nested loop continues as long as it can find a smiley that
> hasn't been placed, then goes back to making locations for the rest. They
> both quit when all the spots on the board are taken up.
>
> There are probably other situations, besides counting something, where you
> might want to use a loop while, but I can't think of one off the top of my
> head.
>
> Hope this helps,
> Laura Mollett
flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
flashforward2000 and The Flash Film Festival
"The World�s Premier Flash Solutions Conference and Expo"
March 27-29, Nob Hill Masonic Center, San Francisco, California
-Register before Feb 25 and save $200!!-- www.flashforward2000.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email help
Replies
Re: FLASH: using "loop while", Laura Mollett
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

