been trying to crack this one - it’s just a simple rollover, but my AS3 attempt (below the AS2 version here) only plays the first frame when it should roll…
// AS2:
function startRoll() {
this.nextFrame();
}
function stopRoll() {
this.prevFrame();
}
// button:
bttn.onRollOver = function() {
this.onEnterFrame = startRoll;
};
bttn.onRollOut = function() {
this.onEnterFrame = stopRoll;
};
bttn.onPress = function() {
getURL(“http://www.site.com”,"_blank");
}
// AS3:
bttn.addEventListener(MouseEvent.MOUSE_OVER, startRoll);
bttn.addEventListener(MouseEvent.MOUSE_OUT, stopRoll);
function startRoll(event:MouseEvent):void{
MovieClip(this).bttn.nextFrame();
}
function stopRoll(event:MouseEvent):void{
MovieClip(this).bttn.prevFrame();
}
bttn.addEventListener(MouseEvent.CLICK,enter_url);
function enter_url(evt:Event):void
{
var enter_site:URLRequest = new URLRequest("http://www.site.com");
navigateToURL(enter_site,"_blank");
}