I have adapted the tutorial from the flash on this site, complex rollover/rollout effects or something similar, to create this:
stop();
this.onEnterFrame = function(){
if(rewind == 1){
prevFrame();
}
if(rewind == 3){
if (this.currentFrame == 12){
stop();
}else{
play();
}
}
}
this.onRollOver = function(){
if (rewind == 3) {
stop();
}else{
rewind = 0;
play();
}
}
this.onRollOut = function(){
if (rewind == 3){
if (this.currentFrame == 12) {
stop();
}else{
play();
}
}else{
rewind = 1;
}
}
this.onDragOut = function(){
if (rewind == 3){
if (this.currentFrame == 12) {
stop();
}else{
play();
}
}else{
rewind = 1;
}
}
this.onPress = function(){
if (rewind == 3) {
rewind = 1;
}else{
rewind = 3;
delete this.onEnterFrame;
}
}
The idea is for it to behave like a regular rollin/out button, but when you click on it, have it stay frozen on the last frame of the mc (button), which is frame 12. However, it does not not act as so, and I’m unsure as to why. Could anyone explain to me why possibly, and help me corect the issue?