# onRollOver and OnRollOut

**URL:** <https://forum.kirupa.com/t/onrollover-and-onrollout/277457>\
**Category:** flash\
**Created:** [December 12, 2008, 6:27am UTC](https://forum.kirupa.com/t/onrollover-and-onrollout/277457 "2008-12-12T06:27:01Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![obmon](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/obmon/32/3503_2.png) [@obmon](https://forum.kirupa.com/u/obmon)\
**Post date:** [December 12, 2008, 6:27am UTC](https://forum.kirupa.com/t/onrollover-and-onrollout/277457/1 "2008-12-12T06:27:01Z")

</div>

I have the following function… which is part of a class

```php

// Function to handle completion of (pre)loading
    private function onLoadInit():Void {
        trace("image loaded");
        // Variable Definition
        imageHolderMask = new MovieClip;
        
        // Attach Mask to image
        imageHolderMask = featuredHolder.attachMovie("msk_featuredProjectImage", "msk_featuredProjectImage", featuredHolder.getNextHighestDepth(), {_x:0, _y:0});
        imageHolder.setMask(imageHolderMask);
                
        // Tween image to fade in
        var imageHolderTween:Tween = new Tween(imageHolder, "_alpha", Strong.easeOut, 0, 100, 10, false);
        
        // Set Button Actions for Image Holder
        var thisButton = imageHolder;
        thisButton.onRollOver = function() {
            var imageRevealTween:Tween = new Tween(featuredHolder.mc_featuredProjectText, "_y", Strong.easeOut, imageHolderMask._y, 100, 10, false);
        }
        thisButton.onRollOut = function() {
            var imageHideTween:Tween = new Tween(imageHolder, "_y", Strong.easeOut, imageHolderMask._y, 200, 10, false);
        }
            
        // Remove miniLoader
        miniLoader.removeMovieClip();
    }

```

The rollOver and rollOut functions don’t work. From my searches, it seems that I can’t have both the rollOver, and rollOut on the same movie clip. I also realize that in CS3, eventListner’s are powerful enough to handle this problem. But Since i don’t have CS3 yet… what can i do to make this work in cs2?

thanks in advance for your help.
