Bitmap File Not Working
- Posted by Lone_EverGreen_Ranger Dec 06, 2010
- 1161 views
Hello. All I am trying to do is load a bitmap file onto the window, however it is not working. I'll post my code.
atom HeroWalk_Gfx sequence file procedure Load_HeroWalkGfx(integer self, integer event, sequence parm) fName = getOpenFileName(EDWin,file,GfxType) if length(fName) = 0 then return end if HeroWalk_Gfx = loadBitmapFromFile(file) if HeroWalk_Gfx != 1 then return end if --the window is declared as a constant drawBitmap(Hero_WalkGfx_Win,HeroWalk_Gfx,0,0) --these are declared as integers if HeroWalk_Frames > 0 then HeroWalk_CurrentFrame = HeroWalk_CurrentFrame + 1 elsif HeroWalk_CurrentFrame >= HeroWalk_TotalFrames then HeroWalk_CurrentFrame = 1 end if end procedure setHandler(Hero_WalkGfx_Load,w32HClick,routine_id("Load_HeroWalkGfx"))