Frame script effect makes buttons not work

Hi Im currently redoing my web site using flash. I came across this awesome script for animating text buttons that generate random leters as the user rolls over them.
To get the example check out http://www.theronin.co.uk/index_flash.html
So at the moment Ive got the rollover effect happening but I cant actually make the buttons go any where.
Here is the frame script (written by Danny Franzreb from Toabot)

ref_mc = this.dynBtn_mc;

ref_mc._alpha = 75;

ref_mc.textButton_txt.autoSize = true;

ref_mc.text_str = ref_mc.textButton_txt.text;

ref_mc.inv_btn._width = ref_mc.textButton_txt._width;

ref_mc.aniFrames = 6;

ref_mc.count = 0;

ref_mc.inv_btn.onRollOver = function(){
this._parent.onEnterFrame = btnRollOver;
}

ref_mc.inv_btn.onRollOut = function(){
this._parent.onEnterFrame = btnRollOut;
}
function btnRollOver(){

if(this.count < this.aniFrames){
    this._alpha = Math.ceil(Math.random() * 50) + 50;
    var temp_str = "";
    for(var i = 0; i < this.text_str.length; i++){
        temp_str += String.fromCharCode(65 + Math.round(Math.random()*25));
    }
this.textButton_txt.text = temp_str;
    this.count++;
}else{
    this._alpha = 100;
    this.textButton_txt.text = this.text_str.toUpperCase();
    this.onEnterFrame = undefined;
}

}
function btnRollOut(){
if(this.count > 0){
this._alpha = Math.ceil(Math.random() * 50) + 50;
var temp_str = “”;
for(var i = 0; i < this.text_str.length; i++){
temp_str += String.fromCharCode(97 + Math.round(Math.random()*25));
}
this.textButton_txt.text = temp_str;
this.count–;
}else{
this._alpha = 75;
this.textButton_txt.text = this.text_str.toLowerCase();
this.onEnterFrame = undefined;
}
}

then Im trying to add the regular button action on to the buttons
on(release) {
gotoAndPlay(20);
}

I know this isnt really the way to go but not sure if this is the way to go I know that its possible because the effect is used on theronin site for the navigation buttons

Instead of putting it on the buttons, which isn’t really recommended, put the action in a frame,


ref_mc.inv_btn.onRelease = function(){
gotoAndPlay(20)
}

Im just guessing here, post a fla if you want it fixed faster. Kinda hard to fix when we cant see how you have it set up. =)

Great, thanks rhamej I was thinking thats the way to go but my attempts at putting the action in the frame didnt work out. That script you have posted looks promising. If it doesn’t work I’ll put up a fla.
:thumb2:

rhamej You Rock!
Worked like a charm, Thanks heaps mate. :bu:

:thumb: