# Flash MX to Flash 5 Button scripts

**URL:** https://forum.kirupa.com/t/flash-mx-to-flash-5-button-scripts/29900
**Category:** flash
**Created:** [September 1, 2003, 8:21pm UTC](https://forum.kirupa.com/t/flash-mx-to-flash-5-button-scripts/29900 "2003-09-01T20:21:59Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![trevorsaint](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/trevorsaint/32/268_2.png) [@trevorsaint](https://forum.kirupa.com/u/trevorsaint)
#### Post date: [September 1, 2003, 8:21pm UTC](https://forum.kirupa.com/t/flash-mx-to-flash-5-button-scripts/29900/1 "2003-09-01T20:21:59Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 1, 2003, 9:56pm UTC](https://forum.kirupa.com/t/flash-mx-to-flash-5-button-scripts/29900/2 "2003-09-01T21:56:24Z")

</div>

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]

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 1, 2003, 11:22pm UTC](https://forum.kirupa.com/t/flash-mx-to-flash-5-button-scripts/29900/3 "2003-09-01T23:22:03Z")

</div>

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 2, 2003, 5:26am UTC](https://forum.kirupa.com/t/flash-mx-to-flash-5-button-scripts/29900/4 "2003-09-02T05:26:47Z")

</div>

kax\_ at msn dot com

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

---

<div class="post-metadata">

### Author: ![system](https://canada1.discourse-cdn.com/flex011/uploads/kirupa/original/3X/6/2/621e5c11736f46532526e61be85940af4230f3e5.png) [@system](https://forum.kirupa.com/u/system)
#### Post date: [September 2, 2003, 12:36pm UTC](https://forum.kirupa.com/t/flash-mx-to-flash-5-button-scripts/29900/5 "2003-09-02T12:36:43Z")

</div>

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