Originariamente inviato da poser
Ciao a tutti,
ho un problema con un'Eval che non riesco a capire.
la stringa è questa:

var eval(pages._xmouse < 0 ? (-pw / 2) : (pw / 2))=gdir*pw/2;

flash continua a darmi errori di sintassi...
qualcuno sa dirmi qual è l'errore? son tre ore che controllo

Grazie
l'errore sta nel fatto che non puoi associare una variabile così

tratto dal livedocs di mx2004
In Flash 5 or later, you cannot use eval() to dynamically set and retrieve the value of a variable or instance name, because you cannot use eval() on the left side of an equation. For example, replace the code

eval ("var" + i) = "first";

with this:

this["var"+i] = "first"

or this:

set ("var" + i, "first");