# Combining PROTOTYPE with onEnterFrame?

**URL:** https://forum.kirupa.com/t/combining-prototype-with-onenterframe/46784
**Category:** flash
**Created:** [March 27, 2004, 11:14pm UTC](https://forum.kirupa.com/t/combining-prototype-with-onenterframe/46784 "2004-03-27T23:14:39Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![flaxcreatures](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/flaxcreatures/32/448_2.png) [@flaxcreatures](https://forum.kirupa.com/u/flaxcreatures)
#### Post date: [March 27, 2004, 11:14pm UTC](https://forum.kirupa.com/t/combining-prototype-with-onenterframe/46784/1 "2004-03-27T23:14:39Z")

</div>

Can someone tell me how to cimbine the prototype with onEnterFrame. I’d like to fade in some objects like this:

[AS]

mc.\_alpha = 0  
onEnterFrame = function () {  
if (mc.\_alpha\<101) {  
mc.\_alpha = Math.round(mc.\_alpha+6)  
trace(mc.\_alpha);  
}  
mc.\_y = Math.round((mc.\_y+12)\*0.9)  
}

[/AS]

or can it be done without onEnterframe with an interval or something like that?

hope someone can help me out
