ok so i have made an pong game in flash. or im trying to xD.
but i need help on how to get the ball to move from on side to the other and if the paddle is in the way it bounces back can you help me??
the paddle moves up and down really fast, im calibrating it all the time to make it move smoothly and i cant upload the new version all the time . thats why the paddle is wierd in this swf file.
(when this is finished im gonna give you the code to it.)
if (ball._x<ball._width/2)goLeft=false
if (ball._x>(Stage.Width-ball._width/2))goLeft=true
if (ball._y<ball._height/2)goUp=false
if (ball._y>(Stage.Width-ball._height/2))goUp=true
thanks
a big hug to you (im a member in extreme tutorials forum and everytime someone helps me i give them a big hug (just so you know, i dont want you to think im crazy :D))
ok i think i got it no errors but one prob x0 , the ball stands still in the middle :S
if (ball._x<Number(leftpaddle._x+leftpaddle._width+ball._width/2)){
if (ball._y>Number(leftpaddle._y-ball._width/2) and ball._y<Number(leftpaddle._y+leftpaddle._height+ball._width/2)){
//hit
goLeft=false
}
}
if (ball._x<leftpaddle._x-ball._width-10){
//the ball is out
}
Thanks all i dont think i need nor want any more help im gonna work on the pong game and we will see how good it gets A big hug too all of you. the paddles doesnt jump to the right place anymore they are much more smoothly now. when i get this working i have only 1 thing left to do. make the ball and paddles better xD they are ugly now.
and i need sound effects
but i cant find sound effects can someone show me a page where i can download free sound effects for games. (i have searched)
the canadian i have one problem :S i cant get the black out of your pong game