variables = items u make up. hahaha.
Strings (words, sentences, absolutely anything giberish).. haha (my definition).
Numbers (ah.. its only numbers).
Flash knows numbers but flash dont know strings. for example.
a = 1;
b = word;
c = "word";
d = "1";
lets trace all of these.
trace (a); RESULT is 1
trace (b); RESULT is undefined
trace (c); RESULT is word
trace (d); RESULT is 1
ok.
Variables dont need quotes. they are defined and flash will read the script to find that variable and what it equals.
Numbers dont need quotes. flash loves numbers so it doesnt need anything to figure them out.
Strings need quotes. Think of strings as absolute... junk. "1" does not equal the number 1. it equals the symbol 1. it doesnt have a value. 1 = 1.
now with that said. lets go over the Results.
a's results is 1 because its a defined number
b is undefined because because its not a variable in the script. it equals nothing.
c's result is the word WORD... because it was in quotes. it means nothing to flash.
d's result is 1... but not the value, the symbol.
with that said. im out.
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment