On Rollover Effect

Hi All,

I tried making a movieClip roll in and out of the page on rollover a button. but it failed using this script on Flash MX 2004 with Instance name of MC.

Actionscript


//on the keyframe
yTarget = 100;

Actionscript


//And this on the movieclip (button embedded)

yMC = getProperty ( _root.MC, _y);

moveMC = _root.yTargetMC - yMC;

setProperty ( _root.MC, _y, yMC + (moveMC/10));

Actionscript


// on the button

on ( rollover) {

yTarget = 50;

}

FlashFile:hr: