Results 1 to 3 of 3

Thread: Game & Graph

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2001
    Posts
    49

    Game & Graph

    GameHello everybody, I have a 2 Flag pictures. How could I make these Two picture change(rotate) every 5 seconds in the same location. Any help would be great, thanks
    Smilies are ON

  2. #2
    Frenzied Member Jotaf98's Avatar
    Join Date
    Jun 2000
    Location
    I'm not gonna give you my IP address! Ok... Portugal, South-Western Europe, 3rd rock from the sun (our star is easy to find, a 47 Ursae Majoris in the Milky Way :p )
    Posts
    1,457
    Let's see... try this code. You'll need a timer, picture1 and picture2 with the images of the flags, and an empty picture3

    VB Code:
    1. Private Sub Timer1_Timer()
    2.   Static Pic As Long
    3.   If Pic = 1 Then
    4.     picture3.Picture = picture1.Picture
    5.     Pic = 2
    6.   Else
    7.     picture3.Picture = picture2.Picture
    8.     Pic = 1
    9.   End If
    10. End Sub

    Basically, every 5 seconds it will toggle Pic between 1 or 2, and based on that show the proper image
    Code:
    Temp = Me.GetIQ()
    'Error 9: Overflow
    'DON'T PANIC! :eek:

    To learn how to use realistic effects in your games like fire, rain, snow and magic effects, read my article on particles systems here.


    Jotaf's Theories!
    "Cats land on their feet. Toast lands peanut butter side down. A cat with toast strapped to its back will hover above the ground in a state of quantum indecision."

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2001
    Posts
    49
    Originally posted by Jotaf98
    Let's see... try this code. You'll need a timer, picture1 and picture2 with the images of the flags, and an empty picture3

    VB Code:
    1. Private Sub Timer1_Timer()
    2.   Static Pic As Long
    3.   If Pic = 1 Then
    4.     picture3.Picture = picture1.Picture
    5.     Pic = 2
    6.   Else
    7.     picture3.Picture = picture2.Picture
    8.     Pic = 1
    9.   End If
    10. End Sub

    Basically, every 5 seconds it will toggle Pic between 1 or 2, and
    based on that show the proper image
    Hello Jotat98, thank you so much , the code is perfect, thank you
    again
    Smilies are ON

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width