Flash MX to Flash 5 Button scripts

Hi all can anyone help me out here.

I have almost finished this site. However I am going to require the site to work with flash 5 as this will cover a wider array of users. The following action script works great. As I have buttons with movie clips, so this script works great, and has been placed in a seperate layer above the button on the timeline, rather than the instance button itself and it works fine. But this script is for Flash MX only, can anyone come up with an alternative with the same functionaility please:

[AS]

buttonOne.onRollOver = function(){
OK1 = true;
}
buttonOne.onRollOut = function(){
OK1 = false;
}
effectOne.onEnterFrame = function() {
if (OK1) {
effectOne.nextFrame();
} else {
effectOne.prevFrame();
}
};

[/AS]

This code has been used for four buttons, so they are labeled buttonOne upwards likewise for the movie clips labeled effectOne, and of course OK1 / OK2 / OK3 / OK4. please help me out here, as it needs to be complete for tommorow.

cheers all that help

Trev

Ok…

Dynamic event handlers are not supported in Flash 5, you’ll need to use static event handlers:
[AS]// put this code on the buttonOne actions
on (rollOver) {
effectOne.over = true;
}
on (rollOut) {
effectOne.over = false;
}
// put this code on the effectOne actions
onClipEvent (enterFrame) {
if (over) this.nextFrame();
else this.prevFrame();
}[/AS]
And do the same for the other MovieClips/Buttons:
[AS]// buttonTwo actions
on (rollOver) {
effectTwo.over = true;
}
on (rollOut) {
effectTwo.over = false;
}
// effectTwo actions
onClipEvent (enterFrame) {
if (over) this.nextFrame();
else this.prevFrame();
}[/AS]

Hi Thanks for your reply Kode, its more complicated, I have other activities going on, do you have an email I can send you the fla ?

trev

kax_ at msn dot com

You may send me $107.99 USD along with your FLA. Thank you. :stuck_out_tongue:

[:P] might wanna put sarcasm tags around that… he might think you’re serious… [/ :P]