LoadAnimImage
BlitzMax Forums/BlitzMax Beginners Area/LoadAnimImage| 
 | ||
| I did a search here and didn't find out actually how to use this.  Any help would be appreciated.  Here's some simple code I'm trying to run: Graphics 640,480,0
animimage = LoadAnimImage("animguy2.png", 200, 200, 0, 1) 
Repeat
        Cls
        DrawImage(animimage,200,200,0)
         Flip 
Until KeyDown(KEY_ESCAPE) Or AppTerminate()
End Sorry for the stupid question, can't figure it out. I made a two cell png file and each cell is 200 X 200. Thanks! | 
| 
 | ||
| you tell it which frame to draw, which means you also need to advance a frame when you need the animation to advance. so create a variable, called animFrame or something similar and then use that as the frame parameter in DrawImage. | 
| 
 | ||
| Thanks, I'm sorry I didn't post this right.  Even when I run the above code I get Unhandled Exception:Attempt to access field or method of Null object. I've tried every combination of cell #'s. I've quadrupled checked the image to make sure there's two cells each of 200 X 200. I can actually display the image normally with ould loadanim, but the of course you see both cells. Thanks again. | 
| 
 | ||
| Good god I'm such a fool.  I've been working on this so long that it was finally working, but I hadn't saved my latest version and it was still untitled.  So it couldn't find the image.  Duh.  Thanks again again :). |