Be a Supporter!

AS: While

  • 4,606 Views
  • 64 Replies
New Topic Respond to this Topic
Denvish
Denvish
  • Member since: Apr. 25, 2003
  • Offline.
Forum Stats
Member
Level 46
Blank Slate
Response to AS: While 2005-07-22 16:22:55 Reply

At 7/22/05 04:17 PM, -KhAo- wrote: but to stay in topic, basically, while is only a loop of "if" right?
would do the same to make
for(...){
if(...){
...
}
}
?

Yes, but that's a for more than an if. But that's the way I do it, I rarely have a need for while loops. There are rare occasions where they're necessary, but generally I'll go out of my way to avoid them.


- - Flash - Music - Images - -

BBS Signature
Glaiel-Gamer
Glaiel-Gamer
  • Member since: Dec. 28, 2004
  • Offline.
Forum Stats
Member
Level 28
Game Developer
Response to AS: While 2005-07-22 16:29:55 Reply

heh, I save constantly too, but while loops never crash me.

ShotInTheHead
ShotInTheHead
  • Member since: Dec. 20, 2002
  • Offline.
Forum Stats
Member
Level 31
Blank Slate
Response to AS: While 2005-07-22 16:34:01 Reply

if you want to use while scripts safely put a "or cap" on it.
something like this
wcount=0
while ("put condition here" or wcount>100) {
wcount>=100 ? trace("its laggeh") : wcount++
//put your scripts here.
}

STILL SAVE BEFORE RUNNING IT!!! just incase you typed something wrong or something goes horribly horribly wrong. it just helps a LOT for testing and you can probably remove it or make the wcount higher when youre done. and even with no while testing still save before testing anything at all. and regularly make backup FLA files incase something gets corrupted (ive lost lots because of file corruption)

Glaiel-Gamer
Glaiel-Gamer
  • Member since: Dec. 28, 2004
  • Offline.
Forum Stats
Member
Level 28
Game Developer
Response to AS: While 2005-07-22 16:39:00 Reply

or get a mac.

liam
liam
  • Member since: Dec. 11, 2004
  • Offline.
Forum Stats
Member
Level 22
Blank Slate
Response to AS: While 2005-07-22 16:43:35 Reply

At 7/22/05 04:39 PM, Glaiel_Gamer wrote: or get a mac.

We don't allow antichrists on this board.

Grr.

<3

Sup, bitches :)

BBS Signature
Rammer
Rammer
  • Member since: Jun. 8, 2003
  • Offline.
Forum Stats
Member
Level 33
Programmer
Response to AS: While 2005-07-22 17:08:57 Reply

i hate when flash cant recognize infinite loops right off the bat...i always make the same stupid mistake when i make a for loop..

for(i=0; 1<20; i++) {

i hate that -_-


snyggys

Denvish
Denvish
  • Member since: Apr. 25, 2003
  • Offline.
Forum Stats
Member
Level 46
Blank Slate
Response to AS: While 2005-07-22 17:53:08 Reply

At 7/22/05 04:39 PM, Glaiel_Gamer wrote: or get a mac.

HAHAHAHAHAHAHAHAHAHAAAAAAAA
HAHAHHAAAAAA
HAHAHAHAAAhAHAHAHhahahaha
hahahah
hahaha
haaaaaaaaaa
HAHAHAHAHAHAHAHAAAAAAA
ha
haha
ha

no.


- - Flash - Music - Images - -

BBS Signature
Glaiel-Gamer
Glaiel-Gamer
  • Member since: Dec. 28, 2004
  • Offline.
Forum Stats
Member
Level 28
Game Developer
Response to AS: While 2005-07-22 18:15:08 Reply

At 7/22/05 05:53 PM, Denvish wrote:
At 7/22/05 04:39 PM, Glaiel_Gamer wrote: or get a mac.
HAHAHAHAHAHAHAHAHAHAAAAAAAA
HAHAHHAAAAAA
HAHAHAHAAAhAHAHAHhahahaha
hahahah
hahaha
haaaaaaaaaa
HAHAHAHAHAHAHAHAAAAAAA
ha
haha
ha

no.

WHY NOT! WHy is everyone so afraid of getting a good computer? Are they afraid of the computer not crashing every 2 seconds? Did they spend to much on virus protection to just through it away cause they don't need it? WHY DO PEOPLE HATE MACS!?!???????

Khao
Khao
  • Member since: Sep. 20, 2003
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to AS: While 2005-07-22 18:17:39 Reply

At 7/22/05 06:15 PM, Glaiel_Gamer wrote:
WHY NOT! WHy is everyone so afraid of getting a good computer? Are they afraid of the computer not crashing every 2 seconds? Did they spend to much on virus protection to just through it away cause they don't need it? WHY DO PEOPLE HATE MACS!?!???????

coz they eat donkey balls... and they have a 1-button-no-right-click-no-scroll mouse

Glaiel-Gamer
Glaiel-Gamer
  • Member since: Dec. 28, 2004
  • Offline.
Forum Stats
Member
Level 28
Game Developer
Response to AS: While 2005-07-22 18:20:03 Reply

At 7/22/05 06:17 PM, -KhAo- wrote:
At 7/22/05 06:15 PM, Glaiel_Gamer wrote:
WHY NOT! WHy is everyone so afraid of getting a good computer? Are they afraid of the computer not crashing every 2 seconds? Did they spend to much on virus protection to just through it away cause they don't need it? WHY DO PEOPLE HATE MACS!?!???????
coz they eat donkey balls... and they have a 1-button-no-right-click-no-scroll mouse

but if you plug a right click mouse into it it WOULD WORK! Control-click is the SAME as right-click

Denvish
Denvish
  • Member since: Apr. 25, 2003
  • Offline.
Forum Stats
Member
Level 46
Blank Slate
Response to AS: While 2005-07-22 19:03:47 Reply

This is going waaaaaaaaaay off-topic, but it's a compatibility issue for me; pretty much EVERY program (apart from maybe 2) is compatible with Windows; whereas the number of programs that will work with a MAC is limited. I have to admit, I've never actually tried one, but I've heard plenty of complaints about (lack of) application compatibility, and that's enough to put me off.

As for virus protection and crashing, my PC has crashed twice (not irrepairably) in the three years since I got XP, and I have enough know-how to never get virii on my machine. The kind of PC users who let Windows get to the stage where it dies through infection or bad organisation would probably kill a MAC in about 3 hours.


- - Flash - Music - Images - -

BBS Signature
Glaiel-Gamer
Glaiel-Gamer
  • Member since: Dec. 28, 2004
  • Offline.
Forum Stats
Member
Level 28
Game Developer
Response to AS: While 2005-07-22 19:10:52 Reply

At 7/22/05 07:03 PM, Denvish wrote: This is going waaaaaaaaaay off-topic, but it's a compatibility issue for me; pretty much EVERY program (apart from maybe 2) is compatible with Windows; whereas the number of programs that will work with a MAC is limited. I have to admit, I've never actually tried one, but I've heard plenty of complaints about (lack of) application compatibility, and that's enough to put me off.

As for virus protection and crashing, my PC has crashed twice (not irrepairably) in the three years since I got XP, and I have enough know-how to never get virii on my machine. The kind of PC users who let Windows get to the stage where it dies through infection or bad organisation would probably kill a MAC in about 3 hours.

Even so, there's a $100 program to make all the PC programs run on mac.

Also, you have to enter a password to install ANYTHING, so viruses aren't a problem.

13000 for PC
63 for Mac

Khao
Khao
  • Member since: Sep. 20, 2003
  • Offline.
Forum Stats
Member
Level 20
Blank Slate
Response to AS: While 2005-07-22 19:35:23 Reply

At 7/22/05 07:10 PM, Glaiel_Gamer wrote:
13000 for PC
63 for Mac

thats the score? well you know why we choose PC!!

Glaiel-Gamer
Glaiel-Gamer
  • Member since: Dec. 28, 2004
  • Offline.
Forum Stats
Member
Level 28
Game Developer
Response to AS: While 2005-07-22 19:42:27 Reply

At 7/22/05 07:35 PM, -KhAo- wrote:
At 7/22/05 07:10 PM, Glaiel_Gamer wrote:
13000 for PC
63 for Mac
thats the score? well you know why we choose PC!!

that's the number of viruses

Afro-Ninja
Afro-Ninja
  • Member since: Mar. 2, 2002
  • Offline.
Forum Stats
Moderator
Level 44
Game Developer
Response to AS: While 2005-07-23 01:18:45 Reply

At 7/22/05 07:42 PM, Glaiel_Gamer wrote:
At 7/22/05 07:35 PM, -KhAo- wrote:
At 7/22/05 07:10 PM, Glaiel_Gamer wrote:
13000 for PC
63 for Mac
thats the score? well you know why we choose PC!!
that's the number of viruses

The off topic is killing me, but I can't resist jumping in

PC has more viruses because guess what, a ton more people use PC's. If PC's and Macs had the same user base they'd have the same viruses too.

I really have nothing against macs at all, it's just that I've used PC's all my life and have had no problems, I don't see the need to jump over to MAC and work with something unfamiliar.


BBS Signature
Inglor
Inglor
  • Member since: Jan. 26, 2003
  • Offline.
Forum Stats
Member
Level 17
Blank Slate
Response to AS: While 2005-07-23 02:21:50 Reply

IF you are going to make an endless loop! at least make a pretty one

function iAmAN00b(){
trace("OMGWTF1337!!!!!");
iAmAN00b();
}

Begoner
Begoner
  • Member since: Oct. 10, 2004
  • Offline.
Forum Stats
Member
Level 10
Blank Slate
Response to AS: While 2005-07-23 13:12:00 Reply

It's for things like this that I hate AS:

while (69 or YOUR_MOM)
{
trace("WTF!?");
}

That is a functional endless loop, although it should give you hundreds of errors.

liam0
liam0
  • Member since: Jul. 23, 2005
  • Offline.
Forum Stats
Member
Level 03
Blank Slate
Response to AS: While 2005-07-23 13:37:21 Reply

At 7/23/05 01:18 AM, Afro_Ninja wrote: I really have nothing against macs at all, it's just that I've used PC's all my life and have had no problems, I don't see the need to jump over to MAC and work with something unfamiliar.

Same here, and viruses aren't really a problem because there are enough free programs out there to protect a PC from anything, at all. If you download all the free virus detection and ad-ware stoppers, spyware detectors, etc. then you are covered.

Firefox helps too.

piefi
piefi
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 07
Blank Slate
Response to AS: While 2005-09-06 10:46:03 Reply

At 7/23/05 01:37 PM, Lialtm wrote:
At 7/23/05 01:18 AM, Afro_Ninja wrote: I really have nothing against macs at all, it's just that I've used PC's all my life and have had no problems, I don't see the need to jump over to MAC and work with something unfamiliar.
Same here, and viruses aren't really a problem because there are enough free programs out there to protect a PC from anything, at all. If you download all the free virus detection and ad-ware stoppers, spyware detectors, etc. then you are covered.

yes but the whole point is that you shouldn't have to bother doing that.withh a mac you don't.As for the one-buttoned mouse i use a mighty mouse by apple which has two and a scroll ball,but any pc mouse will work.All the software i need is on mac: MS office, flash , photoshop, itunes and windows media player and a lot of apps are mac only like garageband.

Rustygames
Rustygames
  • Member since: May. 7, 2005
  • Offline.
Forum Stats
Member
Level 19
Programmer
Response to AS: While 2005-09-06 10:46:58 Reply

At 9/6/05 10:46 AM, -memartyo- wrote: Some stuff

Are you reading all my AS threads?


- Matt, Rustyarcade.com

T-H
T-H
  • Member since: Jan. 7, 2004
  • Offline.
Forum Stats
Member
Level 40
Blank Slate
Response to AS: While 2005-09-06 11:15:55 Reply

At 9/6/05 10:46 AM, -memartyo- wrote: crap

Lol, I'm surprised you can get microsoft programs on a mac.

Paranoia
Paranoia
  • Member since: Apr. 22, 2005
  • Offline.
Forum Stats
Member
Level 35
Game Developer
Response to AS: While 2005-09-10 13:08:41 Reply

At 7/22/05 03:41 PM, Inglor wrote: nonono

onEnterFrame triggers ONCE every 1/fps seconds

while triggers continusly untill the condition is reached

So... it's basicly running as fast as your cpu will allow? Or is it occupying every possible point at the same time... :S


BBS Signature
T-H
T-H
  • Member since: Jan. 7, 2004
  • Offline.
Forum Stats
Member
Level 40
Blank Slate
Response to AS: While 2005-09-10 13:10:47 Reply

At 9/10/05 01:08 PM, EggKnight wrote: So... it's basicly running as fast as your cpu will allow?

Yup.

Paranoia
Paranoia
  • Member since: Apr. 22, 2005
  • Offline.
Forum Stats
Member
Level 35
Game Developer
Response to AS: While 2005-09-10 13:10:58 Reply

Ah shit I shouldve checked the date on that last post. Bugger.


BBS Signature
natu15
natu15
  • Member since: Feb. 25, 2006
  • Offline.
Forum Stats
Member
Level 02
Blank Slate
Response to AS: While 2006-03-27 14:05:01 Reply

how do u make ur ani stop at the end of it instead of it keep repeating

SEXY-FETUS
SEXY-FETUS
  • Member since: May. 2, 2005
  • Offline.
Forum Stats
Member
Level 05
Blank Slate
Response to AS: While 2006-03-27 15:03:06 Reply

Do you mean
while (a==true){
_X+=10;
}


Our growing dependence on laws only shows how uncivilized we are.

TrueDarkness
TrueDarkness
  • Member since: Aug. 31, 2004
  • Offline.
Forum Stats
Member
Level 27
Blank Slate
Response to AS: While 2006-03-27 16:34:59 Reply

At 3/27/06 02:05 PM, natu15 wrote: how do u make ur ani stop at the end of it instead of it keep repeating

Correct me if I'm wrong but I think you can use the break command for that...

while(condition){ //starts the while loop
if(condition){ //if something happens...
break // then the while loops stops
}
statement //otherwise do this for the while loop
} //end while

I don't use the break command often but I am pretty sure that is how it's done...

GeoKureli
GeoKureli
  • Member since: Apr. 1, 2003
  • Offline.
Forum Stats
Supporter
Level 19
Game Developer
Response to AS: While 2006-03-27 17:38:12 Reply

At 7/22/05 04:17 PM, Khao wrote:
At 7/22/05 04:14 PM, Afro_Ninja wrote: I save constantly. And I mean CONSTANTLY.

new symbol? save
modified one line of code? save
moved something? save

ctrl +s is almost broken on my keyboard
lolll I save a lot too, even sometimes I havent changed anything I save cause I think I changed something XD

but to stay in topic, basically, while is only a loop of "if" right?
would do the same to make
for(...){
if(...){
...
}
}
?

not really, its more like for(null ; condition ; null){}
it may not seem different but think of it like

i=0
while(i%2&&i<100){
i++
}
would not be the same as

for(i=0;i<100;i++){
if(1%2){
...
}
}

GeoKureli
GeoKureli
  • Member since: Apr. 1, 2003
  • Offline.
Forum Stats
Supporter
Level 19
Game Developer
Response to AS: While 2006-03-27 17:39:52 Reply

At 7/22/05 04:39 PM, Satan cursed the boards by saying:

or get a mac.

windows stops it too. he just has a slow computer so it takes a long time for the error to pop up.

ShotInTheHead
ShotInTheHead
  • Member since: Dec. 20, 2002
  • Offline.
Forum Stats
Member
Level 31
Blank Slate
Response to AS: While 2006-03-27 17:50:40 Reply

keep in mind that by making this, you will make alot of people crash when they mess up with an endless loop. what youre doing is giving purified uranium to infants, and while the stuff can be powerful, it can blow then straight to hell.

nice AS: thread btw.

wow im bored.