-
I am trying to get a variable take a specific value in a specific frame. I don't want it to be defined for the whole timeline.
Currently, it looks like that:
var cool;
ifFrameloaded(instance1.labelx) {cool=2};
ifFrameloaded(instance1.labely) {cool=3};
but var always takes the value of the most recent ifFrameloaded statement....
Thanks
-
try this
var cool;
if (_currentframe==instance1.labelx) {
cool = 2;
} else if ( _currentframe==instance1.labely) {
cool = 3;
}
hth,
-g
-
can i do that with more than two values, too?
I am not that familiar with ActionScript (or any other programming language ;-)yet. I was missing the case[] option
that I know from C. I actually have about five frames to jump to.
I cannot do that with if - else because that only allows tow options, right?
-
sure you can, you can, you can string together as many if else statements as you want.
there is probably more elegant way to do it, but i don't know enough about progrmming to know what that might be.
hth,
-g
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
|