LoadAnimImage
BlitzMax Forums/BlitzMax Programming/LoadAnimImage
| ||
Hi all, I am trying to load this image: ![]() local fntImage:TImage; fntImage = LoadAnimImage ("digits.png",26,32,0,12,FILTEREDIMAGE); While Not KeyDown(key_escape) Cls drawimage fntImage (fntImage,10,10); Flip Wend But this gives error saying i am trying to access a null object, however if i use: fntImage = LoadImage ("digits.png"); it works fine, is there any particular reason this may occur? |
| ||
most strange, deleted the line of code, and pasted it back in and it works :-S |
| ||
Check drawimage command, it should be : drawimage (image,x,y,frame) try this : Graphics 120,80,0 Global fntImage:TImage fntImage = LoadAnimImage ("digits.png",26,32,0,12,FILTEREDIMAGE) Global frame:Int = 0 While Not KeyDown(key_escape) Cls DrawImage fntImage,10,10,frame frame = frame + 1 If frame = 12 Then frame =0 Flip WaitKey Wend |
| ||
:-D sorry typo, twas there originally, original problem was it not loading the image, but as i say removing and adding the code did it :-S |