If the expression is javascript compliant you can send it out to the browser
using the ExternalInterface Class and call javascript's eval method.  That
wasn't going to work for me so I found that writing my own interpreter isn't
bad if you've written an interpreter before.  Otherwise I'm not sure I'd
recommend it.  Good luck.

- Dan Freiman

On 11 Mar 2007 12:31:11 -0700, Ralf Bokelberg <[EMAIL PROTECTED]>
wrote:

  A really old one in ActionScript 1 can be found at
http://www.bokelberg.de/actionscript/experiments/eval.html
Cheers
Ralf

On 11 Mar 2007 12:23:17 -0700, thirtyfivemph <[EMAIL PROTECTED]>
wrote:
>
>   I'd like to add the ability for a user to enter an expression, e.g.
> "3+4*x+y*(z/3+4)" and be able to evaluate it. I've found plenty of
> examples in JavaScript, Java, C, C++, and about every other language
> out there... now, before I go start porting JEval (or similar) to
> ActionScript, is there something like this already out there?
>
> Thanks,
>
> Troy.
>
>


--
Ralf Bokelberg <[EMAIL PROTECTED]>
Flex & Flash Consultant based in Cologne/Germany
Phone +49 (0) 221 530 15 35

Reply via email to