# On Rollover Effect

**URL:** <https://forum.kirupa.com/t/on-rollover-effect/105664>\
**Category:** Uncategorized\
**Created:** [March 28, 2004, 7:50pm UTC](https://forum.kirupa.com/t/on-rollover-effect/105664 "2004-03-28T19:50:20Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Flashfile](https://avatars.discourse-cdn.com/v4/letter/f/ea5d25/32.png) [@Flashfile](https://forum.kirupa.com/u/Flashfile)\
**Post date:** [March 28, 2004, 7:50pm UTC](https://forum.kirupa.com/t/on-rollover-effect/105664/1 "2004-03-28T19:50:20Z")

</div>

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:
