# Hey how do I change this AS to work in 8?

**URL:** <https://forum.kirupa.com/t/hey-how-do-i-change-this-as-to-work-in-8/178498>\
**Category:** flash\
**Created:** [February 11, 2006, 2:51am UTC](https://forum.kirupa.com/t/hey-how-do-i-change-this-as-to-work-in-8/178498 "2006-02-11T02:51:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![BlackShadow](https://avatars.discourse-cdn.com/v4/letter/b/67e7ee/32.png) [@BlackShadow](https://forum.kirupa.com/u/BlackShadow)\
**Post date:** [February 11, 2006, 2:51am UTC](https://forum.kirupa.com/t/hey-how-do-i-change-this-as-to-work-in-8/178498/1 "2006-02-11T02:51:57Z")

</div>

It doesn’t work in 8 but will work in the previous versions. I already changed the var and added :Object to it cuz I know Flash 8 needs those now. but I still dont understand why and how to make this code compatible with 8.

[AS]function move(clipName) {  
var slider:Object = this;  
destination = slider.ynew;  
position = clipName.\_y;  
bounce = 0.800000;  
speed = 5;  
velocity = velocity \* slider.bounce + (destination - position) / slider.speed;  
clipName.\_y = clipName.\_y + velocity;  
}  
this.ynew = 20;  
mainHeader\_mc.onEnterFrame = function ()  
{  
move(this);  
};  
stop();[/AS]

Thanks guys! :krazy:
