Foro de elhacker.net

Programación => Programación Visual Basic => Mensaje iniciado por: ninto33 en 22 Enero 2010, 13:31 pm



Título: Ayuda. ping pong
Publicado por: ninto33 en 22 Enero 2010, 13:31 pm
Hola , estoy haciendo un simple juego de ping pong (soy nuevo en esto) i quisiera saber que debo usar para que cuando toke por ejemplo la a se mueva pa la izquierda y tambien queria saber como hacer que la pelota rebote.
Bueno gracias
chau

urgente!!


Título: Re: Ayuda. ping pong
Publicado por: MCKSys Argentina en 23 Enero 2010, 04:00 am
... quisiera saber que debo usar para que cuando toke por ejemplo la a se mueva pa la izquierda y tambien queria saber como hacer que la pelota rebote.

Yo usaría VB + Flash OCX (ActionScript)

Saludos!


Título: Re: Ayuda. ping pong
Publicado por: seba123neo en 23 Enero 2010, 18:31 pm
ninto33 si queres aprender , tambien debes aprender a buscar, mientras mejor sepas buscar, mas vas a aprender...aca tenes miles de codigos de ping pong, estudialos y fijate como hacen...

Ping Pong (http://www.planet-source-code.com/vb/scripts/BrowseCategoryOrSearchResults.asp?txtCriteria=ping+pong&blnWorldDropDownUsed=TRUE&txtMaxNumberOfEntriesPerPage=10&blnResetAllVariables=TRUE&lngWId=1&B1=Quick+Search&optSort=Alphabetical)

saludos.


Título: Re: Ayuda. ping pong
Publicado por: ninto33 en 23 Enero 2010, 23:20 pm
Private Sub Picture1_Keypress(Keyascii As Integer)
If Text4.Left <= 60 And Keyascii = 97 Then
Text4.Left = Text4.Left
ElseIf Text4.Left > 60 And Keyascii = 97 Then
Text4.Left = Text4.Left - 100
ElseIf Text4.Left = 9360 And Keyascii = 115 Then
Text4.Left = Text4.Left
ElseIf Keyascii = 115 Then
Text4.Left = Text4.Left + 100
Else
Text4.Left = Text4.Left
End If
If Text3.Left <= 60 And Keyascii = 111 Then
Text4.Left = Text3.Left
ElseIf Text3.Left > 60 And Keyascii = 111 Then
Text3.Left = Text3.Left - 100
ElseIf Text3.Left = 9360 And Keyascii = 112 Then
Text3.Left = Text3.Left
ElseIf Keyascii = 112 Then
Text3.Left = Text3.Left + 100
Else
Text3.Left = Text3.Left
End If
If Keyascii = 97 And Keyascii = 111 Then
Text4.Left = Text4.Left - 100
Text3.Left = Text3.Left - 100
ElseIf Keyascii = 97 And Keyascii = 112 Then
Text3.Left = Text3.Left - 100
Text4.Left = Text4.Left + 100
ElseIf Keyascii = 115 And Keyascii = 111 Then
Text4.Left = Text4.Left + 100
Text3.Left = Text3.Left - 100
ElseIf Keyascii = 115 And Keyascii = 112 Then
Text4.Left = Text4.Left + 100
Text3.Left = Text3.Left + 100
Else
Text4.Left = Text4.Left
Text3.Left = Text3.Left
End If
End Sub

aki me salio para que se mueva :P me falta la pelotita alguien puede ayudarme en eso? por lo menos diciendome que puedo utilizar asi averiguo sobre la instruccion