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?
I have a question. I used the variables to subtract ten from the variable every time I press a button, but how do I make it stop once the number reaches "0"?
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
@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(); }
I'm using CS3, but using as2.0. I need to create a script, which would get the current month, get season according to the month and display greeting in a dynamic text box according to the season. This is how I started: on a blank layer first keyframe: myDate = new Date(); month = myDate.getMonth(); if (month<2) { season = winter; } Then for a button: on (release) { greeting = season(); } Why would it not work? Oh and the var in the dynamic text properties is set to greeting
Thanks, this really helped me out! One thing though, I was disigning a game, and I want to make it so you have 5 lives. I got that part down, you click the wrong answer and it subtracts 1. I want it so when it gets to 0 it will go to the "you lose" frame. Instead it just keeps on going on the negative numbers. Can you or someone please help me out?
Thank you so much for these thorough instructions. Maybe I didn't pay enough attention here and I am new to Flash, but I'm just wondering wether you used ActionScript 2.0 or 3.0 on most of your tutorial?
Do i need to make the variables global? because i can't get anything to appear in that text box! (I can if I set the variables on the main timeline )
The dynamic text box doesn't seem to be able to 'reach into' the ball & pull out data? i even tried using a trace command and it's all working fine otherwise? what am i doing wrong. Im on CS3. I'm literally copying your video step by step. Maybe i just need a good nights sleep & a PC restart :) Thanks
Your voice makes this so nice to watch.
FlashTwister 2 months ago
Your voice made me shit my pants.
ICutYouInTheEyes 6 months ago
OMG your voice is like heaven.
FlashTwister 6 months ago
2:30 the tutorial actually starts if you know what a variable is.
pcmaster160 7 months ago
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?
TheBehinderter1 8 months ago
Awesome tutorial! Very pedagogical, good explanation and awesome voice ^^
Damptarmac 10 months ago
variables for dummies
blaizethefootylegend 1 year ago
variable for dummies
blaizethefootylegend 1 year ago
Fantastic. Clear, simple, easy for newbies to understand. I was stuck on usage and definition of variables for a week until I saw this. Thank you!
Mfaraka 1 year ago
THANK YOU SOOOOO MUCH SIR! :D:D:D
Werdna3791 1 year ago
I have a question. I used the variables to subtract ten from the variable every time I press a button, but how do I make it stop once the number reaches "0"?
EvilCreeps 1 year ago
@EvilCreeps Use an If statement.
TheButcherClan 1 year ago
This is awesome. Thanks.
misfitjustice 1 year ago
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
Tinopa2 1 year ago 6
iWolfrost 1 year ago
@iWolfrost aight thx
hope it'll work, I'll find out as soon as my computer with flash works again
Tinopa2 1 year ago
Thanks for he tutorial. You helped me a lot.
Bumbanut 2 years ago
neliete54 2 years ago
Can anyone tell me how to make the days, stats, and HP for dating games ?
FantasyyX 2 years ago
Thanks, this really helped me out! One thing though, I was disigning a game, and I want to make it so you have 5 lives. I got that part down, you click the wrong answer and it subtracts 1. I want it so when it gets to 0 it will go to the "you lose" frame. Instead it just keeps on going on the negative numbers. Can you or someone please help me out?
Wammy92k 2 years ago
if you haven't already, make your lives into a variable, and then use this code:
if(lives <1){
gotoAndStop("youlose");
}
pm me if that doesb't work, and send me the code too.
xflamingpenguinx 2 years ago
add this:
if (lives==0){ //if "lives"(dynamic texts var name) is equal to 0
gotoAndStop(2); //do something. Here: Gotoandstop Frame 2, where there is a message!
} //end
Hope it helped :D
Prid
Prid13 2 years ago
check out conditional statements
MC117db 2 years ago
Oh, I had that figured, never mind.
inspired81 3 years ago
Thank you so much for these thorough instructions. Maybe I didn't pay enough attention here and I am new to Flash, but I'm just wondering wether you used ActionScript 2.0 or 3.0 on most of your tutorial?
inspired81 3 years ago
flash 2.0
shark10666 3 years ago
Do i need to make the variables global? because i can't get anything to appear in that text box! (I can if I set the variables on the main timeline )
The dynamic text box doesn't seem to be able to 'reach into' the ball & pull out data? i even tried using a trace command and it's all working fine otherwise? what am i doing wrong. Im on CS3. I'm literally copying your video step by step. Maybe i just need a good nights sleep & a PC restart :) Thanks
askewdale 3 years ago
no.. you don't need to make a variables global... unlike game maker :D
leafinmilo 2 years ago
clear and concise - keep them coming
goonsmile 3 years ago
This is one of the better videos
on youtube. keep them coming
msg360 3 years ago
Is there a way to make the number keep going up?
TheIdiotNation 3 years ago
oops sorry it said...
TheIdiotNation 3 years ago
lol u have a radio guys voice!
djdawkins36 3 years ago
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
u rule omg u r helping me soo much
XpLoeRe 3 years ago
i coudnt do the thing wid the typing box thing the button i couldnt clik it?
cwalka2k7 4 years ago
thank you Greatly Appreciated
NicholasSta 4 years ago