Alert icon
We're changing our privacy policy. This stuff matters.  Learn more  Dismiss

Simple Animation with Visual Basic 2008

Loading...

Sign in or sign up now!
Alert icon
Upgrade to the latest Flash Player for improved playback performance. Upgrade now or more info.
26,547
Loading...
Alert icon
Sign in or sign up now!
Alert icon

Uploaded by on Dec 13, 2009

This is a simple and very cool animation with VB 2008
***IMPORTANT*** To make this project work you need these two pics- a bat with its wings and an the other bat with its wings down. To get these pics go the following site http://img121.imageshack.us/i/bat1a.png/
http://img5.imageshack.us/i/bat1b.png/


After going to the link copy and paste the two pics into a directory (simply a place where u know it is like my pics)

Public Clas frmMain Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick
Static x As Integer = 5
Static y As Integer = 0
Static flip As Boolean = False

If y Mod 2 = 0 Then
Me.PictureBox1.Image = My.Resources.bat1_a
Else
Me.PictureBox1.Image = My.Resources.bat1_b

End If
if Me.PictureBox1.Left (Greater Then Sign)= 500 Then
x = -5
flip = True
ElseIf Me.PictureBox1.Left (less Then Sign)= 0 Then
x = 5
flip = False
End If
If flip = True Then
Me.PictureBox1.Image.RotateFlip(RotateFlipType.RotateNoneFlipX)
End If
Me.PictureBox1.Left = Me.PictureBox1.Left + x
y += 1




End Sub


End Class

The next vid that i will make will show how make the naimation move using the arrow keys :)

  • likes, 4 dislikes

Link to this comment:

Share to:

Uploader Comments (MrShadeslayer)

  • nope actually im using visual 2010 witch may be the prob like the rest of the codes...

  • @DeCoDeNation Than why are you complaining if you using a newer version of visual basic? Its common sense! If you are going to use an updated program, obviously the coding might change a bit.

  • the codes are incorrect plus its not fourms its forms o and theres some other spell mistakes also.

  • @DeCoDeNation Whatever you say troll :) fyi the code works for everyone else. Either you cant read or just love to troll :D

  • do this work on 2010 version?

  • @linkinl1 Hopefully it should

see all

All Comments (58)

Sign In or Sign Up now to post a comment!
  • exelente thanks =D

    

  • just did it , thanks :D

  • @SeriousIlya

    DW everything works ok now. I just forgot to enable the timer :)

  • My object isn't moving.

    I have a timer and an unlocked image object in my form.

    here's the code; (Note that I am only testing out the movement, without the "imageflip" stuff)

    Private Sub Timer1_Tick(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles Timer1.Tick Static x As Integer = 5 If circle.Left >= 500 Then x = -5 ElseIf circle.Left <= 0 Then x = 5 End If Me.circle.Left = Me.circle.Left + x End Sub

Loading...

Alert icon
0 / 00Unsaved Playlist Return to active list
    1. Your queue is empty. Add videos to your queue using this button:
      or sign in to load a different list.
    Loading...Loading...Saving...
    • Clear all videos from this list
    • Learn more