hi
I got a code from ANDY FOULDS website.
the code is in As1.
what it does: plays a movieclip forward and backwards on any mouse event.
THE CODE IS GIVEN ‘AS IS’ AND IS USED AT YOUR OWN RISK.
FEEL TO FREE TO USE IT AS YOU LIKE. BE NICE AND LET ME KNOW IF YOU DO :¬)
ANDY_FOULDS.
A SIMPLE LITTLE PROTOTYPE FOR PLAYING ANY MC BACKWARDS. ONE THAT I
USE IN PRACTICALLY EVER PROJECT I DO…
*********************************************************************/
movieclip.prototype.back = function() {
this.onEnterFrame = function() {
this.prevFrame();
// DELETES THE ENTERFRAME IF THE CLIP IS AT FRAME 1
if (this._currentframe == 1) {
delete this.onEnterFrame;
}
};
};
//IF USING ‘back()’ USE THIS INSTEAD OF ‘play()’ AS WELL
movieclip.prototype.forward = function() {
delete this.onEnterFrame;
this.play();
};
//USAGE == yourMovieclip.back();
//USAGE == yourMovieclip.forward();
//ON A FRAME OR BUTTON OR VIA A SCRIPT.
BUTTON code:
on(rollOver){
bar_mc.forward();
line_mc.forward()
}
on(rollOut){
bar_mc.back();
line_mc.back()
}
I need to convert this code in As2
Thx in advance