# Updating code for Lionbichstudios tutorial

**URL:** <https://forum.kirupa.com/t/updating-code-for-lionbichstudios-tutorial/194874>\
**Category:** flash\
**Created:** [July 26, 2006, 9:33pm UTC](https://forum.kirupa.com/t/updating-code-for-lionbichstudios-tutorial/194874 "2006-07-26T21:33:29Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pherank](https://avatars.discourse-cdn.com/v4/letter/p/4af34b/32.png) [@Pherank](https://forum.kirupa.com/u/Pherank)\
**Post date:** [July 26, 2006, 9:33pm UTC](https://forum.kirupa.com/t/updating-code-for-lionbichstudios-tutorial/194874/1 "2006-07-26T21:33:29Z")

</div>

I would like to update this “Rollover Depth” script to work in Flash Player 7 (works in 6):  
([http://www.lionbichstudios.com/flash\_tutorials\_actionscript\_rolloverdepth.html](http://www.lionbichstudios.com/flash_tutorials_actionscript_rolloverdepth.html))

The functionality works much better than the standard rollOver/rollOff scripts.  
I assume there’s a problem with how the variables are declared, but haven’t been able to fix it yet. Anyone have any ideas?

MovieClip.prototype.jumpSkale = function(obj, rush, friction) {  
this.tempo += (obj - this.\_xscale) \* rush;  
this.tempo \*= friction;  
this.\_xscale = this.\_yscale += this.tempo;  
};  
for (var i = 1; i \<= 3; i++) {  
this[“MC” + i].onEnterFrame = function() {  
if (this.hitTest(\_root.\_xmouse, \_root.\_ymouse, true)) {  
this.jumpSkale(400, .9, .6);  
} else {  
this.jumpSkale(100, .6, .5);  
}  
};  
this[“shadow” + i].nr = i;  
this[“shadow” + i].onEnterFrame = function() {  
this.\_xscale = this.\_yscale = \_root[“MC” + this.nr].\_xscale;  
};  
}
