You are here: Re: Remember When Some Of You Retards Were Saying The Eval Function Doesn't Do Anything... « All PHP « IT news, forums, messages
Re: Remember When Some Of You Retards Were Saying The Eval Function Doesn't Do Anything...

Posted by cheesepants on 03/20/06 02:55

It should be:

square._x = this["dates"+i]._x + 566;

Anyone who actually uses Flash on a daily basis stopped using eval() a
long time ago. Why? Cause it don't work no more, and it was a hack in
the first place for what you are trying to do. If you're just trying to
put together a string that contains the value of a variable, use array
notation.

>From the docs:

---------

In Flash 4, eval() was used to simulate arrays; in Flash 5 or later,
you should use the Array class to simulate arrays.

In Flash 4, you can also use eval() to dynamically set and retrieve the
value of a variable or instance name. However, you can also do this
with the array access operator ([]).

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
useeval() 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");

-------------------

Or check out:
http://www.actionscript.org/tutorials/intermediate/advanced_pathing/index.shtml

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация