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

Posted by Onideus Mad Hatter on 03/21/06 16:25

On Tue, 21 Mar 2006 00:11:00 -0600, trippy <trippy@spam.sucks> wrote:

>> >> DUM DUM DUM DUM...
>> >>
>> >> square._x = eval("dates._"+i+"._x") + 566;

>What is this supposed to do?
http://www.sarcastic-caret.net/wedding/

>> >> If you're trying to assign a property of a variable variable to
>> >> another objects property you sure as fuck need it (well in
>> >> Actionscript anyway).

>> >Except that the eval() function in Actionscript is fundamentally
>> >different to the eval() in say JavaScript or PHP

>> Oh really? Are you sure?

>Yes. Eval does different things depending on the language.
<snip>
>All eval does is convert things from a string.

WOW...boy are you an idiot, huh Drippy? Would you care to contradict
yourself again? Try and make it even MORE funny next time.

>> I mean PHP I can see, but with Javascript
>> you can directly access CSS property paths and those properties
>> values.

>Use the DOM for that, not eval.

....uh, no, that would result in more code and would be far messier
(apparently Drippy likes attempting to comprehend code out of context
too).

>> >And the only reason you have to do it this way is because older
>> >versions of Flash didn't have proper arrays, etc.

>> Uh, I'm using SwishMax actually, not Flash and I'm exporting as
>> Flash8, Kiddo. And how would an array change anything...that doesn't
>> even make sense.

>Arrays elimi<snip - begineer bullshit about arrays>

Thanks for the deficient lesson, Drippy...but uh...you didn't actually
respond to what I said. Whether or not the data was in an array
wouldn't have made...ANY difference at all to my point about the eval
function.

The whole point of the situation is that I NEED that variable to BE a
LOCATION to the data about 75% of the time and the other 25% of the
time I need that variables VALUE, it's far easier to just break out
eval for that rather than create two variables or constantly deal with
a bunch of messy looking code, like nyah:

trans_var = "dates._"+i+"._x";

show_usr = "Position of " + trans_var + "is " + eval(trans_var) + 233;

Whether or not the data is in an array or not makes no difference at
all...and in fact, in this situation I'm not even sure if it could BE
an array since we're talking about objects...REAL objects (text
fields, sprites, groups, images, etc) on the outline. I guess you
could try entering something like myVar[0], myVar[1], etc for each
object and in theory you could treat a set of images, text fields or
whatever as an array...never tried it before...never really needed to.

>> The reason for the eval function in Actionscript is
>> if you need to switch from the object properties path (that's what I
>> call it, it might have some other name)

>What's an object properties path?

In SwishMax, when you add a picture, text field or something into the
project you can assign a variable to it. Look here:
http://www.backwater-productions.net/_images/_Scraps/Outline.png

See how it's in an outline? So what I'm talking about is more than
just a variable. Like if you assign a variable of "farfoos" to
local1_txt, then it's "location" as far as the code is concerned is
like:
_root.local_txt.farfoos

And then you can alter attributes of that such as it's x location
with:
_root.local_txt.farfoos._x

Or you could alter it's rotation, width, height, transparency,
visibility, etc, etc, etc.

So you see, you have a kind of address for each object and then you
have properties of that object, addresses of each property, etc, etc.

>> to the object properties
>> value.

>Those are called 'attributes'.

No, they are in fact called object properties in Swishmax.

--

Onideus Mad Hatter
mhm ¹ x ¹
http://www.backwater-productions.net
http://www.backwater-productions.net/hatter-blog


Hatter Quotes
-------------
"I'm not a professional, I'm an artist."

"The more I learn the more I'm killing my idols."

"Is it wrong to incur and then use the hate ridden, vengeful stupidity
of complete strangers in random Usenet froups to further my art?"

"Freedom is only a concept, like race it's merely a social construct
that doesn't really exist outside of your ability to convince others
of its relevancy."

"Next time slow up a lil, then maybe you won't jump the gun and start
creamin yer panties before it's time to pop the champagne proper."

"Reality is directly proportionate to how creative you are."

"People are pretty fucking high on themselves if they think that
they're just born with a soul. *snicker*...yeah, like they're just
givin em out for free."

"Quible, quible said the Hare. Quite a lot of quibling...everywhere.
So the Hare took a long stare and decided at best, to leave the rest,
to their merry little mess."

"There's a difference between 'bad' and 'so earth shatteringly
horrible it makes the angels scream in terror as they violently rip
their heads off, their blood spraying into the faces of a thousand
sweet innocent horrified children, who will forever have the terrible
images burned into their tiny little minds'."

"How sad that you're such a poor judge of style that you can't even
properly gauge the artistic worth of your own efforts."

"Those who record history are those who control history."

"Is my .sig delimiter broken? Really? You're sure? Awww,
gee...that's too bad...for YOU!" `, )

 

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

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