RE: Flash Q&A Thread 4 (Full Version)

All Forums >> [Gaming Community] >> [Legends and Lore] >> Artists of Legend >> Art Academy



Message


EragonZZZZ -> RE: Flash Q&A Thread 4 (10/28/2007 21:01:46)

But in that minute that you used to find the spare minute you'll realized you wasted a free minute looking for a free minute :P




SirSchmoopy -> RE: Flash Q&A Thread 4 (10/29/2007 18:11:09)

Eragon: can u tell me how to add a number to a variable???




The Illusive Man -> RE: Flash Q&A Thread 4 (10/30/2007 3:54:04)

Do you mean maths, or declare a variable as a number?




EragonZZZZ -> RE: Flash Q&A Thread 4 (10/30/2007 16:03:16)

Uh...okay

variablename += 10

or whatever number you need.




SirSchmoopy -> RE: Flash Q&A Thread 4 (10/30/2007 16:59:15)

eragon: whenever i try that i turns out as 010, because i set the variable as 0....




EragonZZZZ -> RE: Flash Q&A Thread 4 (10/31/2007 15:05:47)

Well lets see
Try declaring the variable like

var variable:Number = 0;




SirSchmoopy -> RE: Flash Q&A Thread 4 (10/31/2007 16:29:51)

eragon: i alredy declared it, but now i want to add 10 to it




flsg -> RE: Flash Q&A Thread 4 (10/31/2007 18:31:04)

exactly -.-
var hp:Number=0
hp+=10

here, it shouldn't be 010 now, because, like Jergal said, the default of the "+" operator is to add things together as string, not number




SirSchmoopy -> RE: Flash Q&A Thread 4 (11/1/2007 16:31:49)

I don't know why, but it duzn't work like that in flash 8 >.<




flsg -> RE: Flash Q&A Thread 4 (11/1/2007 19:02:22)

k try:
var hp:Number=0
hp+=Numer(10)




SirSchmoopy -> RE: Flash Q&A Thread 4 (11/1/2007 21:16:45)

ty!




EragonZZZZ -> RE: Flash Q&A Thread 4 (11/1/2007 22:58:42)

quote:

ORIGINAL: SirSchmoopy

I don't know why, but it duzn't work like that in flash 8 >.<


I seriously beg to differ here. It always ALWAYS always works for me that way.
But as long as the way you use works for you, there's no problem :D




SirSchmoopy -> RE: Flash Q&A Thread 4 (11/2/2007 15:29:09)

omfg!!! it duzn't work still!!!




EragonZZZZ -> RE: Flash Q&A Thread 4 (11/2/2007 15:40:33)

Are you kidding?

Okay. Copy and paste this code EXACTLY.

var test:Number = 1;
test += 4;
trace(test);

and tell me what that little window comes up with.




SirSchmoopy -> RE: Flash Q&A Thread 4 (11/2/2007 15:57:48)

5, but when i declare the variable in a different frame t duzn't work, so how'm i supposed to add a lil' everytime the person beats an enemy? btw, sorry if i got u rlly rlly rlly rlly rly pised, but i'm stil a noob, i haven't been here a year yet.




flsg -> RE: Flash Q&A Thread 4 (11/2/2007 17:55:22)

well why are you trying to make a game then? lol XD
k I'm a little bit pissed lol, gimme your source code, I'll fix the problem for you

edit: oh yeah I just remembered, you want to make games so that your friend would pay you right?




SirSchmoopy -> RE: Flash Q&A Thread 4 (11/3/2007 7:36:16)

the code aint the prob, but i need to add to a variable that i declared in a diff frame.




flsg -> RE: Flash Q&A Thread 4 (11/3/2007 10:05:58)

check your variable scope
or just simply send me the source >_<




SirSchmoopy -> RE: Flash Q&A Thread 4 (11/3/2007 14:11:54)

what do u mean 'variable scope'?




EragonZZZZ -> RE: Flash Q&A Thread 4 (11/3/2007 16:06:12)

argh, i question once again if you truly have the knowledge to create a game with the complexity of what you are trying to do.
Nothing against YOU...maybe you just need more practice or to read some things.
Variables are rather basic :P




SirSchmoopy -> RE: Flash Q&A Thread 4 (11/3/2007 18:11:23)

NO offence, not tryin to piss u off, but if they r so basic, why can't u just tell me how to do whut im asking?




EragonZZZZ -> RE: Flash Q&A Thread 4 (11/3/2007 18:24:14)

We're telling you exactly how to do it in the simplest, most clear terms possible.

Any more would be like trying to describe a circle without using the word 'round'




SirSchmoopy -> RE: Flash Q&A Thread 4 (11/4/2007 7:13:26)

actually, u never told me how to add to a varible without declaring it in the same frame!




flsg -> RE: Flash Q&A Thread 4 (11/4/2007 18:15:40)

oh just send the source >_<
it's not like I'll copie your ideas




somebody621 -> RE: Flash Q&A Thread 4 (11/4/2007 20:41:37)

Aren't variables declared with var deleted after the frame? Also, it can't be stressed enough that the main game code should be on ONE frame (unless you need to spread work over multiple frames or you know what you are doing).

Done some work recently, but haven't gotten to uploading yet because photobucket... yea...




Page: <<   < prev  13 14 [15] 16 17   next >   >>

Valid CSS!




Forum Software © ASPPlayground.NET Advanced Edition
9.423828E-02