Flasher Archive

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


Subject: RE: [flasher] Variables
From: Paul Willoughby
Date: Wed, 24 Jan 2001 10:14:19 -0000

Hi Phil,

You should be using:

If (/:textStaus = 1)

or

If (/:textStaus eq "1")

If you have "/:textStatus" like this in quotes, then you're comparing actual
string "/:textStatus" value to 1, rather than it's value as a variable,
which is why nothing happens.

You should also set your variable as an expression, not a string:

Set Variable: "/:textstatus" = 1 //no quotes

Flash 4 will normally automatically convert numeric values from strings to
numbers and vice versa if need be, but I wouldn't rely on it. The best idea
is to just keep your code consistent i.e. compare numbers to numbers with
'=', and strings to strings with 'eq'.

hth

paul

-----Original Message-----
From: Phil Matt [pmattateznet [dot] net (mailto:pmattateznet [dot] net)]
Sent: Tuesday, January 23, 2001 9:31 PM
To: flasher from chinwag
Subject: [flasher] Variables


Hello! I'm using Flash 4, and am trying to write a simple menu that
not only loads different MC's when a button is pressed, (works fine)
but also sets variables according to which button has been chosen.
The variables in turn control what actions happen when a different
MC is rolled over elsewhere on the page. This is what I did:

When any menu button is pressed, it sets the variable:

Set Variable: "/:textstatus" = "1"

Elsewhere a MC that is present has this code, trying to get the MC
called Text1 to change it's Alpha to full on:

If ("/:textstatus"=1)
Set Property ("/Text1", Alpha) = "100"
End If

I'm pretty sure I don't quite understand how a variable can be set to
that it can be referred to by different elements on the stage. I have
played with the syntax, but so far, no go.

TIA for your suggestions.


--- Phil Matt

Phil Matt Photography
www.philmatt.com
716-461-5977





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