Flasher Archive

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


Subject: RE: [flasher] Flash 4 AS troubles
From: Ralf Ehe
Date: Wed, 28 Mar 2001 09:47:26 -0000

Hi Jules,
I think the key to your problem could be the following:
If you're constructing your variable like "..."&"...",
you've got to use the "eval"-command like

Set Variable: "ran" = random (28)
If (eval("/:"&ran) <> 1)
Begin Tell Target (eval("/squareFall"&ran))
Go to and Play (2)
End Tell Target
End If
Set Variable: "/:"&ran = "1"

I'm not sure, but I think you need the eval-command
when you're trying to get the value of the variable.

Just try...
Good luck
Ralf Ehe

> -----Original Message-----
> From: Jules [julesatelektonika [dot] co [dot] uk (mailto:julesatelektonika [dot] co [dot] uk)]
> Sent: Tuesday, March 27, 2001 6:08 PM
> To: flasher from chinwag
> Subject: [flasher] Flash 4 AS troubles
>
>
> Hi all. I've got a problem that I've come across before in
> Flash 4 AS, I was
> wondering if anyone has any suggestions / fix / workaround for it
>
> the code I'm using is
>
> Set Variable: "ran" = random (28)
> If ("/:"&ran <> 1)
> Begin Tell Target ("/squareFall"&ran)
> Go to and Play (2)
> End Tell Target
> End If
> Set Variable: "/:"&ran = "1"
>
> This code is called when an object is clicked (a bubble).
>
> There are 27 squareFall movie clips at the root level,
> each subsequentialy
> numbered (squareFall0, squareFall1 etc). The Set varible
> command at the end
> of the code generates a varible at the root called whatever
> ran is (if ran
> =26, then the varible will be called 26). The if command is
> supposed to
> check whether this varible (/:26 for example) equals 1, if
> so that movie
> clip will not be triggered again. Eventually this whole
> shebang will be put
> into a loop, so it keeps going until it finds a number that
> hasn't been
> used.
>
> The problem seems to lie in the if command :If ("/:"&ran <> 1), the
> concatinated varible just isn't behaving as I am expecting
> it too, any
> suggestions?

--
Ehe & Janneck GbR
Agentur fuer moderne Kommunikation
Schweffelstra�e 8, 24118 Kiel
Tel 0431-56 01 888 Fax -890
http://www.eheundjanneck.de




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