Flasher Archive
[Previous] [Next] - [Index] [Thread Index] - [Previous in Thread] [Next in Thread]
| Subject: | RE: [flasher] Variables |
| From: | Paul Willoughby |
| Date: | Thu, 25 Jan 2001 17:08:31 -0000 |
Phil Matt wrote January 25, 2001:
> However, even though I can get the variables to work properly if I
> assign strings to them, I STILL cannot get variables to work
> if I try to
> use numeric values. I have checked and double-checked my
> expressions, but it seems that Flash somehow doesn't recognize a
> statement such as
>
> Set variable /:whatever = 1
>
> If I do a List Variables under Test Movie, and Output window shows:
>
> Layer #0:
> Variable _level0:whatever = "1"
>
> I cannot get the 1 without the quotes around it regardless of how I
> write the expression.
That's just a quirk of the testing environment. Try using a trace statement
to check the value of the variable. You'll find that whether you set it as a
numeric or a string it will always come out without quotes. If you do list
variables it will always come out in quotes. No great shakes - the main
thing is that if you are testing a string value you use 'eq' not'=' (Flash 4
only).
But you're right, in most cases Flash will convert a string to a number if
it sees '=' and it can evaluate the second part of the string to a number.
paul
[Previous] [Next] - [Index] [Thread Index] - [Next in Thread] [Previous in Thread]

