i took the _root out from in front of floor and now it’s telling it to go to that frame number i have frame labels that are numbers so i can increment the value of floor and it will go to specific frame labels … otherwise i could just do nextFrame(); and prevFrame(); =)
the script you gave me makes it go to the next frame. i want it to go to the next frame label
they are both numbers but label 2 could be in frame 14 while label 3 is in frame 22 … i want it to go to the next frame label
also i tried to put an if statement before the code since we only have 5 floors. but it doesn’t seem to stop the value from incrementing when i trace it
*Originally posted by lostinbeta *
**Any idea why it works with on (release) and not on(press) senocular? I am interested in this one, makes no sense to me. **
actually I should have mentioned this since I should have known it would have been a problem, but…
its because there are actually 2 actions set in the example in the download. One on the movieclip and one on the button. The button is the darker image ot the stairsUp symbol, while the movieclip is the symbol with 16% alpha overlayed. Each have an on(press) action but only one will work since the uppermost button action supercedes any below.
Since the button has the correct hit area (that which is specified in its 4th frame) THAT is the symbol that this script should be attached to, and the button script should be deleted. The button initially had:
on (press) {
_root.nextFrame();
}
on it, which I guess was part of the experimenting of trying to get this to work? Anyway, in the linked example it was there along with the movieclip on(press) which in combination confused each other.
only one of those symbols should have any action, and that should be the button and that would be
on(press){
map.gotoAndStop(string(++floor));
}
or whatever it was from prior to this you found worked (though this works too)
thats actually a number thing. Like you cant name instances with a number so is true with frame labels (as gotoAndStop(“1”) is equivelent to gotoAndStop(1))
you should replace the frame labels with something like f1 instead of 1 and f2 instead of 2 etc. Then include that in the goto with “f”+floor
…another thing Ive overlooked lol… Im getting too old for this