-
Variables
Hi,
I´m just starting to learn the basics of programming, but it seems my set variable actions are just being ignored in the movie. In the first frame I put this actionscript
bluebloc = "1";
In the 5th I put this
if (bluebloc = 1) {
gotoAndPlay(2);
}
if (bluebloc = 2) {
gotoAndPlay(8);
}
Then I put a button with a set variable actionscript in it like this
on (release) {
bluebloc = "2";
}
N matter how much I change things round, the flash movie just ignores all the variable, does anyone know why?
-
Re: Variables
code:
bluebloc = "1";
means you set bluebloc to a string "1", not to a number (which would be without quotes )
code:
if (bluebloc = 1) {
here you set bluebloc to 1 instead of comparing it's value with 1 which would be :
code:
if (bluebloc==1)
but go on since we learn only from mistakes
:) :) :)