# Actionscripted easing tween triggered by onrollover

**URL:** <https://forum.kirupa.com/t/actionscripted-easing-tween-triggered-by-onrollover/97912>\
**Category:** Uncategorized\
**Created:** [December 31, 2003, 3:52am UTC](https://forum.kirupa.com/t/actionscripted-easing-tween-triggered-by-onrollover/97912 "2003-12-31T03:52:40Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![onData](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/ondata/32/395_2.png) [@onData](https://forum.kirupa.com/u/onData)\
**Post date:** [December 31, 2003, 3:52am UTC](https://forum.kirupa.com/t/actionscripted-easing-tween-triggered-by-onrollover/97912/1 "2003-12-31T03:52:40Z")

</div>

Hi,

Just wanted to know if someone could help me out on this one. I have been trying to get a ease tween of a clips \_alpha property to fade in when rolled over, and then fade out when rolled out. In the first frame of the main timeline, I have these two functions:  
[AS]  
this.fadeIn = function(clip) {  
et = 0;  
ed = 10;  
clip.onEnterFrame = function() {  
et++;  
if(et\<ed) {  
clip.\_alpha = Sine.easeIn(et, 0, 100, ed);  
}  
}  
}  
this.fadeOut = function(clip) {  
// the opposite, etc…  
}  
[/AS]  
then within the movieclip that I use as a rollover, I put the following script:  
[AS]  
this.onRollOver = function() {  
\_root.fadeIn(this.faderClip);  
}  
this.onRollOut = function() {  
\_root.fadeOut(this.faderClip);  
}  
[/AS]  
Now, the fading in/out works just fine, but the trigerring is not isolated, and random clips fade in and out regardless of what clip I am moving on or off of. How do I isolate this? These are dynamically attached clips, just as a note. Any help would be greatly appreciated.

CJ:hr:
