confused

BlitzMax Forums/BlitzMax Beginners Area/confused

why does this not work

While Not KeyHit(key_escape)

sound=LoadSound("C:\Documents and Settings\-------\My Documents\Peabrain Files\Smiley\soundfx18.wav",True)
PlaySound sound

Global ship:TImage = LoadImage("C:\Documents And Settings\--------\My Documents\Peabrain Files\Smiley\smile man.bmp",filteredimage|dynamicimage)

HideMouse

Function DrawImage(image:TImage,x#,y#,frame=0) ship



If KeyHit(key_0)
Print "0"
EndIf

End
Wend

When testing setup for file loading it is always good to keep the media in a folder along with the file stop problems with finding media in huge database you could always change later
Graphics 800,600,32,0
Global ship:TImage = LoadImage("C:\Documents And Settings\--------\My Documents\Peabrain Files\Smiley\smile man.bmp",FILTEREDIMAGE)

Global sound:TSound=LoadSound ("C:\Documents and Settings\-------\My Documents\Peabrain Files\Smiley\soundfx18.wav",True)

playsound(sound)

While not keyhit (KEY_ESCAPE)

Drawimage ship,100,100,0

If Keydown(key_0)
drawtext "0 that how its works", 200,100 
EndIf

Flip
Wend
end 



Try that

Graphics mode has to be set before loading any media or they are cleared from memory and will need to be reloaded

thx