| Home | Register | FAQ | Members List | Search | Today's Posts | Mark Forums Read |
|
|
#1 (permalink) |
|
Junior Graphic Designer
|
Evaluating a String: AS 2.0
I have this problem. I got an array. In these array are stored some functions like : Code:
then i have the variables BC, BH, AC: Code:
Now, how can i evaluate ar[0] with the correct values? I tried with value(), eval() and some other functions, but it doesn't work. (returns "undefined") I used to do that with eval() or do() in Lingo (Macromedia Director), but now i have to do that in flash and I can't solve this problem. Anybody can help? Thanks. Emanuele. |
|
|
|
|
|
#2 (permalink) |
|
Trailer Trash™
Join Date: Sep 2006
Posts: 851
|
eval in actionscript doesn't work that way store your functions… as functions: Code:
if you require something different - allowing a user to type in a function for example - you'll need to parse the input, which may not be trivial meh.
Last edited by proc355 : 10-01-2008 at 03:59. |
|
![]() |