help, why wont my image render?
Monkey Forums/Monkey Beginners/help, why wont my image render?
| ||
just start a basic write a cant see my image. loads up fine but i do get a null object access error on the browser debug all files are in the folder named correctly.... im stumped heres the code thx [code] Strict Import mojo Class pong Extends App Field batx: Float = 250.0 Field baty: Float = 350.0 Field bat_img : Image Method OnCreate: Int() SetUpdateRate(60) bat_img = LoadImage( "bat.bmp" ,1 , Image.MidHandle) Return 0 End Method OnUpdate: Int() Return 0 End Method OnRender: Int() Cls ( 80,80,80) DrawImage ( bat_img, batx, baty ) Return 0 End End Function Main: Int() New pong Return 0 End [code] |
| ||
I do not know if the problem is the image file itself but recently my game became stuck and unresponsive when attempting to load a png file which had been saved using the application FSViewer but it ran well after opening the png file and saving it using Paint.NET. |
| ||
will give it a try thx! thought maybe it was because my file was bmp, but i thought bmp was supported. ill try both with paint now thanks bud will report back |
| ||
it worked!!! that was fustrating. seems monkey doesnt like bmp |
| ||
do you know what file types are supported |
| ||
Depends on the target platform. When you open the help files, right there is a link "File formats". It will bring you to a page that list what format is suported on which target platform. |
| ||
Thank you for this information MikeHart ! I was always searching in my old sources (where i test plateform target). |