# AS 2.0 help needed

**URL:** <https://forum.kirupa.com/t/as-2-0-help-needed/197057>\
**Category:** flash\
**Created:** [August 13, 2006, 7:56am UTC](https://forum.kirupa.com/t/as-2-0-help-needed/197057 "2006-08-13T07:56:59Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![pavanshinde](https://avatars.discourse-cdn.com/v4/letter/p/7ba0ec/32.png) [@pavanshinde](https://forum.kirupa.com/u/pavanshinde)\
**Post date:** [August 13, 2006, 7:56am UTC](https://forum.kirupa.com/t/as-2-0-help-needed/197057/1 "2006-08-13T07:56:59Z")

</div>

Hi All,

i have incuded an AS file in my fla. But is gives an error

[COLOR=Red]ball.as: Line 73: ActionScript 2.0 class scripts may only define class or interface constructs.  
}[/COLOR]

What should i do to remove this error

Here is the code of \*\*ball.as

\*\*[COLOR=Blue]//Ball class  
function move()  
{  
if (Math.abs(\_stepx) \< 0.1)  
{  
\_stepx = 0;  
}  
\_stepy += \_root.YGRAVITY;  
\_y += \_stepy;  
if (\_stepx != 0)  
{  
\_x += \_stepx;  
if (\_stepx \> 0)  
{  
\_stepx -= \_root.XGRAVITY;  
}  
else  
{  
\_stepx += \_root.XGRAVITY;  
}  
if (\_x \< \_root.LEFTBORDER + \_root.BALLW2)  
{  
\_x = \_root.LEFTBORDER + \_root.BALLW2;  
\_stepx = -\_stepx \* \_root.WALLREFLECTION;  
if (Math.abs(\_stepx) \> \_root.MINHITSPEED)  
{  
\_root.playSound(“snd\_refl”);  
}  
}  
if (\_x \> \_root.RIGHTBORDER - \_root.BALLW2)  
{  
\_x = \_root.RIGHTBORDER - \_root.BALLW2;  
\_stepx = -\_stepx \* \_root.WALLREFLECTION;  
if (Math.abs(\_stepx) \> \_root.MINHITSPEED)  
{  
\_root.playSound(“snd\_refl”);  
}  
}  
}  
if (\_y \< \_root.UPBORDER + \_root.BALLW2)  
{  
\_y = \_root.UPBORDER + \_root.BALLW2;  
\_stepy = -\_stepy;  
if (Math.abs(\_stepy) \> \_root.MINHITSPEED)  
{  
\_root.playSound(“snd\_refl”);  
}  
}  
if (\_y \> \_root.DOWNBORDER - \_root.BALLW2)  
{  
\_y = \_root.DOWNBORDER - \_root.BALLW2;  
\_stepy = -\_stepy \* \_root.WALLREFLECTION;  
if (\_root.hiscores \< \_root.hits)  
{  
\_root.hiscores = \_root.\_hits;  
\_root.\_hiscores = \_root.hiscores;  
\_root.sp1 = ‘Spoints: ’ + \_root.hits / 3;  
\_root.submitScores();  
}  
else if (\_root.hits \>= 1)  
{  
// getURL(‘javascript:alert(’ + \_root.hits +’);’);  
// getURL(‘javascript:alert("’ + \_root.sp1 +’");’);  
\_root.sp1 = 'Spoints: ’ + \_root.hits / 3;  
\_root.submitScores();  
}  
else  
{  
\_root.history.unshift(\_root.hits);  
\_root.history.sort(\_root.compareFunction);  
\_root.history.length = 5;  
\_root.hits = 0;  
\_root.\_hits = \_root.hits;  
}  
if (Math.abs(\_stepy) \> \_root.MINHITSPEED)  
{  
\_root.playSound(“snd\_refl”);  
}  
}  
\_cspeed = \_stepx \* \_root.RK;  
if (\_cspeed != 0)  
{  
\_rotation += \_cspeed;  
}  
\_root.shadow.\_x = \_x;  
\_root.shadow.\_xscale = 100 - ((450 - \_y) / 4.5);  
\_root.shadow.\_yscale = 100 - ((450 - \_y) / 4.5);  
}

function press()  
{  
\_delx = (\_x - \_root.\_xmouse) / \_root.XK;  
\_dely = (\_root.\_ymouse - \_y) / \_root.YK;  
if ((\_stepy \> 0 && delx \< 0) || (\_stepy \< 0 && delx \> 0))  
{  
\_stepx = -\_stepx \* \_root.FOOTREFLECTION;  
}  
\_stepx += \_delx;  
if (\_stepy \> 0)  
{  
\_stepy = -\_stepy \* \_root.FOOTREFLECTION;  
}  
if (\_dely \> 0 && \_dely \> \_root.YMINDEL)  
{  
\_stepy -= \_dely;  
}  
else  
{  
\_stepy -= \_root.YMINDEL;  
}  
\_root.hits++;  
\_root.\_hits = \_root.hits;  
this.gotoAndPlay(2);  
\_root.playSound(“snd\_hit”);  
\_root.startDeformation();  
}  
[/COLOR]\*\*  
PLZ help

Thanks  
\*\*
