-
set property for movie
I made a movie called mymovie which is used as an effect that has two appear only sometimes. Therefore I made a little actionscript to either display the movie or not. (see script below) But for some reason this does not work. No matter what the value of 'counter' is Flash allways takes the first line of the script (i.e. mymovie._visible = true).
Can someone explain to me why Flash skips the If-statement in this case?
counter = 1;
if (counter = 0) {
mymovie._visible = true;
} else {
mymovie._visible = false;
}
-
you're using the wrong operator
this should work:
counter = 1;
if (counter == 0) {
mymovie._visible = true;
} else {
mymovie._visible = false;
}
and while I'm at it, try this:
mymovie._visible = counter == 0;
or this:
mymovie._visible = Boolean(counter);
-
Thanx Pecoes, that helps a lot
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|