Flasher Archive

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


Subject: Re: FLASH: syntax problems
From: John Croteau
Date: Thu, 9 Dec 1999 15:25:48 GMT

Hi May,

> i would like to make a loop while n<=5 and test if a variable in each target
> called M"n":varM"n" = true
> but i dont know the syntax to tell /M1:varM1, /M2:varM2.
> to be clear i want to replace 1 2 3 4 and 5 by n
> the syntax M&n:varM&n is not understood and shall i put n in a variable
> before to launch my loop?

? Why are you using the different variable names for the diff Movie
Clips?
/M1:varM1, /M2:varM1 etc. would be easier (just slightly).
``````````````````````````````````````````````````````````
The following counts the number of trues from /M1:varM1 to /M5:varM5:

Set Variable: "n" = "1"
Loop While (n <= 5)
If (Eval ("/M" & n & ":M" & n) = true)
Set Variable: "Count" = Count + 1
End If
Set Variable: "n" = n + 1
End Loop

You use Eval like above when you want to get the value of a string that
results from concatenation (combining the string elements).

If n= 3 then
("/M" & n & ":M" & n) becomes /M3:M3

but Eval("/M" & n & ":M" & n) gets the value of /M3:M3
which in this case will be either true or false.

--
Coming Soon Flash 4 Web Animation F/X and Design
http://www.amazon.com/exec/obidos/ASIN/1576105555/flashcentral
----------- -----------------------
John Croteau croteauaterols [dot] com (mailto:croteauaterols [dot] com)
------------- -------------------------
FlashTek (Advanced Websites with Flash) http://www.FlashTek.com/
Flash Bible (Fast track to good Flash) http://www.FlashBible.com/
Flash Central(The Universe Starts Here) http://www.FlashCentral.com/
The Flash Tech Resource (Tech Notes) http://www.FlashCentral.com/tech/
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


flasher is generously supported by...
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Streaming Media WEST '99 Conference & Exhibition
"The Worlds largest Internet Audio & Video Event"
December 7 - 9, San Jose Convention Center, California

Reserve your space today at http://www.streamingmedia.com
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: syntax problems, may.e

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