Post

 Resources 

Console

Home | Profile | Active Topics | Members | Search | FAQ
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 VBGamer
 VBGamer
 Animations

Note: You must be registered in order to post a reply.

Screensize:
UserName:
Password:
Format Mode:
Format: BoldItalicizedUnderlineStrikethrough Align LeftCenteredAlign Right Horizontal Rule Insert HyperlinkInsert EmailInsert Image Insert CodeInsert QuoteInsert List Spell Checker
   
Message:

* HTML is OFF
* Forum Code is ON
Smilies
Smile [:)] Big Smile [:D] Cool [8D] Blush [:I]
Tongue [:P] Evil [):] Wink [;)] Clown [:o)]
Black Eye [B)] Eight Ball [8] Frown [:(] Shy [8)]
Shocked [:0] Angry [:(!] Dead [xx(] Sleepy [|)]
Kisses [:X] Approve [^] Disapprove [V] Question [?]

   Insert an File
Check here to include your profile signature.
Check here to subscribe to this topic.
    

T O P I C    R E V I E W
kingkirb Posted - Jun 01 2006 : 06:41:13 AM
How do i go about adding a pre animated image to VB? Basicly ive got some animated images i made and i was wondering if i can jsut add the file instead of using a timer and adding every individual frame. Thanks J(kingkirb)
5   L A T E S T    R E P L I E S    (Newest First)
kingkirb Posted - Jun 11 2006 : 2:14:23 PM
Sorry this reply took so long ive not ben weel this past week. Ok loading the picture file it doesnt seem to work for me. i tried putting file equal to

C:\Documents and Settings\Jason guthrie\My Documents\My Pictures\Game Pictures\Animations\Attack1

and i keep getting the run time error 75. path/file access error

For the array of pics. that would work well but when i use seperate pictures due to the same problem as above i get a black flashy bit in the back of the pictures and it annoys me.

What im trying to do is ive got an animation made up. it plays fine by itself but when i try to integrate it into my game so that i can jsut play the file in VB it doesnt work. i tried using a OLE but i cant get any format to work(this is OLE format not GIF etc format).

Do i have to make these animations frame by frame in VB??
Thanks for your help. J(kingkirb)
Walrus Posted - Jun 01 2006 : 3:50:50 PM
I, too, am not 100% sure what you mean. I think I know, though.

Try like this:
  
Private ArrayOfPics(1 To 3) As Picture  
  
Private Sub Form_Load()  
    Set ArrayOfPics(1) = LoadPicture(file1)  
    Set ArrayOfPics(2) = LoadPicture(file2)  
    Set ArrayOfPics(3) = LoadPicture(file3)  
End Sub
  
Private Sub Timer1_Timer()  
    Static i As Long
  
    If i = UBound(ArrayOfPics) Then
        i = 1  
    Else
        i = i + 1  
    End If
  
    Image1.Picture = ArrayOfPics(i)  
End Sub
  
PW7962 Posted - Jun 01 2006 : 2:29:11 PM
ok so basically when you load an image through a picturebox it saves it to memory. An d the different number you get each time is the pictures location in memory. To load a file into a picturebox use this:
picture1.Picture = loadpicture(file)

Then interchange file with the location of the image you want on your computer. I believe that should answer your question.
Dark_Lord Posted - Jun 01 2006 : 11:13:37 AM
hey kingkirb, i dont understand what you really mean.

If you want to add the animated image, try to save it in *.gif format in the software you created it in and then try to load it in image or picturebox. I think image would suite it much well.

kingkirb Posted - Jun 01 2006 : 07:11:26 AM
ok now ive confused myself. When i try to make the animation using indvidual frames what im doing is i have a timer set to check what picture is imagebox then if its frame1 change it to frame 2 etc except i am not sure how to fins the name of the picture file it loads. I tried to have the image then get the program to print the value of image1.picture and it gives a number, but then when i load the program and do it again it gives a completly different number,everytime. how do i get VB to understand what file im looking for? J(kingkirb)

VBGamer © Go To Top Of Page
This page was generated in 0.09 seconds. Snitz Forums 2000

Copyright © 2002 - 2004 Eric Coleman, Peter Kuchnio , et. al.