Flasher Archive

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


Subject: Re: FLASH: I can't get my if statement to work!
From: Mike S
Date: Fri, 4 Aug 2000 18:19:27 +0100

>I've got a problem and i've tried about everyway i can think of to try to
>fix it. I'm trying to do an If statement that checks two different
>variables to see if they are equal...(click and NumberOfClients). Here's
>how i have the code right now....


There's a little weirdness surrounding eval statements and weakly typed
variables in flash4. We once ran into a problem where a control character
was being added to the tail end of a number causing eval inside an If
statement to perform and invalid comparison of the two numbers. The
solution was to wrap an Int() around the value before comparing. Try this
and see if your problem goes away. You might want to trace the values as
well to make sure your comparing what you think you're comparing ;)

>On (Press)
> Set Variable: "click" = click+1
> Set Variable: "client" = Eval ("client"&click)
> If (click = NumberOfClients)

---> If( Int(click) = Int(NumberOfClients) )

> Set Property ("next", Visibility) = false
> Else
> End If
>End On


------------------
Michael S.
Sr. Software Engineer
Excite@Home

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Full flasher archive now available online at:
http://www.chinwag.com/flasher/archive.shtml
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
To unsubscribe or change your list settings go to
http://www.chinwag.com/flasher or email helpatchinwag [dot] com


Replies
  FLASH: I can't get my if statement to wo, Bill Numerick

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