Help me im retarded

can some one tell me why this is not working

MovieClip.prototype.ball = fucntion(gravity, speedx, speedy, bounce, friction)
{
this._y += speedy;
this._x += speedx;
this._alpha = 100Math.random;
this._xscale = 200
Math.random;
this._yscale = this._xscale;
this._rotation += speedx;
this.speedy += gravity;
if (this._y == 75) {
this._y = 250;
this.speedy *= -this.bounce;
this.speedx *= this.friction;
}
};
MovieClip.prototype.ball=fucntion (gravity, speedx, speedy, bounce, friction){
if(this._x == 275){
this._x =275;
this.speedx *=-1;
}
}
MovieClip.prototype.ball=fucntion (gravity, speedx, speedy, bounce, friction){
if(this._x == 25){
this._x =25;
this.speedx *=-1
}
}

//im really new at this but this site has been a god sent for thanks for the help

hmm … if you wrote that and you’re a newb then i must be “uber-newb”

what error is the script giving you?

do you have an example file?

heres the error im gettin
Scene=Scene 1, Layer=Layer 1, Frame=1: Line 16: ‘;’ expected
MovieClip.prototype.ball=fucntion (gravity, speedx, speedy, bounce, friction){

Scene=Scene 1, Layer=Layer 1, Frame=1: Line 22: ‘;’ expected
MovieClip.prototype.ball=fucntion (gravity, speedx, speedy, bounce, friction){

and heres the fla

i haven’t tested the script but the sintax error you have is:

[COLOR=red]fucntion[/COLOR] wrong
function correct

Well… If you copied this from your original… Then I’d suggest checking your spelling…

fucntion should be function

Ohh… And by the looks of this… You are making the same ball function do 3 different things… I think what you might want to do is…

Name them three different things… Then you have to call your function somewhere else by saying

_root.ball.doThis(10,10,10,10,10);

Where doThis is the name you would put behind prototype.

And you have 3 of the exact same prototypes with different code inside.

How is flash supposed to know which one to target?

edit: Playa beat me.

ok thank for the hints im really bad at this but im trying to learn

hmm … i didn’t see that the three functions have the same name :sleep: