PDA

View Full Version : Function


Katzy
05-30-2003, 01:45 PM
This function will not work, and I do not know why. Can anyone help me out?

I am calling the function from a script on a movie clip like so:

onClipEvent (enterFrame) {
// call the buttonFUnction
buttonFunction();
}

This is my function which is on a button:

function buttonFunction(){

on(rollOver){
mouseOver = true;
trace("MouseOver is true");
}

on(rollOut){
mouseOver = false;
trace("mouseOver is false");
}
}

This is the error I get when I test the movie:

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 1: Statement must appear within on handler
function buttonFunction(){


Thank you,

Jeff

CyanBlue
05-30-2003, 02:07 PM
Howdy and Welcome... ;)

Is it F5 or FMX???

This script is the only one you will be needing on the button...on(rollOver){
mouseOver = true;
trace("MouseOver is true");
}

on(rollOut){
mouseOver = false;
trace("mouseOver is false");
}and you don't need the first part of the script that is in the onClipEvent() block... Try it and see if it works... ;)