How to use variables with Adobe Flash ActionScript
Uploader Comments (robgraham)
Top Comments
-
thanks man, this really was a big help to me, wanna make games end stuff so vars are kinda important to me,
but as soon as I put a if statement after the variable, the variable goes to zero automaticly and afterwards attacking will cause you to go bellow zero
if (EHP = 0) { gotoAndStop("you win", "");}
EHP is my variable being short for enemy hitpoints
All Comments (37)
-
Your voice makes this so nice to watch.
-
Your voice made me shit my pants.
-
OMG your voice is like heaven.
-
2:30 the tutorial actually starts if you know what a variable is.
-
there is no field where I can put in a Name for the var to my Dynamic Text Field. The only thing I can type in is the Instance Name. I am Using Actionscript 3 in CS5. So is there any other way?
-
Awesome tutorial! Very pedagogical, good explanation and awesome voice ^^
-
@iWolfrost aight thx
hope it'll work, I'll find out as soon as my computer with flash works again
-
@Tinopa2 using: if (EHP = 0){ will simply make EHP 0, like a declaration you should use: if (EHP == 0){ and this will work as an If statement, with the statements within it acting as True. You can also close the if statement and add: else{ and anything in the else code will act as a False statement if (EHP == 0) { doSomething(); } else { doSomethingElse(); }
-
variables for dummies
-
variable for dummies
You are a legend. And your voice is wicked + plus I love how u talk on the video. U shud be a radio presenter
eakinlade 3 years ago 12
aw...garsh (blushes)
robgraham 3 years ago