USERNAME:
PASSWORD:
Save Info!
Logging in…
This topic is 1 page long.
[ Profile | Posts | Contact ]
Posted at: 7/31/08 05:33 PM
Sign-Up: 03/29/06
Posts: 1,674
Can someone remind me what the difference between these two are, and when to use which.
Posted at: 7/31/08 05:35 PM
Sign-Up: 08/08/06
Posts: 4,549
At 7/31/08 05:33 PM, Damian wrote: Can someone remind me what the difference between these two are, and when to use which.
The "=" assigns a value to something. Ex: var poop = 1; The "==" checks if 2 values are the same. Ex: if (poo==1) { trace("Poo is 1"); }
School Sux ! || As :Main || As3: Main || Animation: Main || Flash Tutorials ||
Posted at: 7/31/08 05:41 PM
Sign-Up: 05/23/08
Posts: 2,429
Zrb is correct one again :]
You use = for assignment, like in his example. You use == during conditions. Here's a tutorial on loops + conditions.
dr. seuss "unless someone like you cares a whole awful lot, nothing is going to get better. it's not."
At 7/31/08 05:41 PM, K-Guare wrote: Here's a tutorial on loops + conditions.
This is the second time you link to that tutorial ;)
Posted at: 7/31/08 05:42 PM
Thanks.
Posted at: 7/31/08 05:44 PM
At 7/31/08 05:41 PM, zrb wrote: This is the second time you link to that tutorial ;)
zrbCorrect += 1; kguareCorrect -= 1000; trace(zrbCorrect);
Output: 9001 :]
Yes, the number is over 9000.
Posted at: 7/31/08 05:56 PM
At 7/31/08 05:44 PM, K-Guare wrote: zrbCorrect += 1;
zrbCorrect++; //reduces lag :P
kguareCorrect -= 1000; trace(zrbCorrect); Output: 9001 :] Yes, the number is over 9000.
What over 9000 ?!?!?
Posted at: 7/31/08 06:04 PM
At 7/31/08 05:56 PM, zrb wrote: zrbCorrect++; //reduces lag :P
Zrb, that's probably the first time i've ever seen you use
The code tags.
My little boy's growing up :]
And fine, use your cute little operator abbreviations, Real men don't use them.
Posted at: 7/31/08 06:11 PM
Sign-Up: 07/27/07
Posts: 2,715
Does it really reduce the lag? I didn't know that...
Elite Guard Barracks
Posted at: 7/31/08 06:12 PM
At 7/31/08 06:11 PM, Ismael92 wrote: Does it really reduce the lag? I didn't know that...
I've heard that it does :p
Posted at: 7/31/08 06:14 PM
At 7/31/08 06:12 PM, zrb wrote: I've heard that it does :p
If it does, i learned something today. But even if that were true, i'm sure it wouldn't increase the lag by THAT much.
Posted at: 7/31/08 06:16 PM
At 7/31/08 06:14 PM, K-Guare wrote: it wouldn't increase the lag by THAT much.
Doi :P
Posted at: 7/31/08 06:22 PM
Sign-Up: 03/18/05
Posts: 5,033
At 7/31/08 06:14 PM, K-Guare wrote: If it does, i learned something today.
It does, but the difference is so minoscule that its barely noticable unless you're doing around 100,000+ interation. We're talking, for a 100,000 loop of i++, 288 miliseconds to process, for i+=1 300 miliseconds to process
========|| WWWWWWWW>[-[Blog] - [Audio] - [Userpage] - [Flash] - [Last.fm]-]<WWWWWWWW ||========
Posted at: 7/31/08 06:25 PM
At 7/31/08 06:22 PM, Vengeance wrote: It does, but the difference is so minoscule that its barely noticable unless you're doing around 100,000+ interation. We're talking, for a 100,000 loop of i++, 288 miliseconds to process, for i+=1 300 miliseconds to process
Dear god...
BIG difference. :]
All times are Eastern Standard Time (GMT -5) | Current Time: 11:27 AM
<< Back