Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
Subject: | FLASH: Multiple conditions on a do while statement - logic problem |
From: | Paul Steven |
Date: | Sat, 23 Sep 2000 19:08:33 +0100 |
Hi all
I am having real problems sorting out the logic on a do while statement
Basically I have an array that stores 3 directions
i.e List_Of_Directions=["Right","Left","Down"]
Now I want to set up a loop to call a function using each of these
directions. The function will return either true or false indicating whether
a move in that direction is allowed.
This is what I have tried
////////////////////////////////////////////////////////////////////////////
//////////////////
var Valid_Direction=False
var Index=0;
do {
Requested_Direction=Possible_Directions[Index];
Valid_Direction=_root.Is_Move_Allowed (Current_Row, Current_Column,
Requested_Direction);
Index++;
} while ((Index<3) or (Valid_Direction==True));
////////////////////////////////////////////////////////////////////////////
/////////////////
Now it seems to be only using the first condition to test whether to leave
the loop. Can anyone point out what I am doing wrong?
Thanks
Paul
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NudeGuru.com is proud to sponsor the Flasher list
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
IT'S THE ART OF MONEY, HONEY!
Tips and Advice from some of the most popular Flash
artists + industry power-brokers on how to hold onto
your rights, negotiate contracts and get full value
for your work.http://www.nudeguru.com from Franke James
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpchinwag [dot] com
Replies
Re: FLASH: Multiple conditions on a do w, Andrew Le Sage
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]