# Class Functions

**URL:** <https://forum.kirupa.com/t/class-functions/188391>\
**Category:** flash\
**Created:** [May 7, 2006, 8:34am UTC](https://forum.kirupa.com/t/class-functions/188391 "2006-05-07T08:34:11Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![dcem](https://avatars.discourse-cdn.com/v4/letter/d/ee59a6/32.png) [@dcem](https://forum.kirupa.com/u/dcem)\
**Post date:** [May 7, 2006, 8:34am UTC](https://forum.kirupa.com/t/class-functions/188391/1 "2006-05-07T08:34:11Z")

</div>

Hey People,

I have created a class called RButton which extends MovieClip.

I need to know how to define a function in this class to make the movieclip gotoAndStop on frame 2 when someone rolls over it.

I have placed an instance of RButton on the stage using:  
attachMovie(“Rbutton”, ‘portfolio’, 100);

How do you do this?

Cheers!
