SetMaskColor problem

BlitzMax Forums/BlitzMax Beginners Area/SetMaskColor problem

Please Help me! There is my code
 		AutoMidHandle True 
	     Type player
	               	   Field x#,y#,xspd#,yspd#,friction#=0.004,acceleration#=0.008,spdvector#,direction#,maxspd#=0.6
				   	   Field turnspd#,turnaccel#=0.1,turnmax#=0.7,turnfriction#=0.04, life
					    Field entity=LoadImage("player.png")
					Method create()
						x=400 ; y=300 ' ñîçäàíèå ïëååðà â öåíòðå ýêðàíà
					End Method
					
		 Method update()
						If KeyDown(Key_up)
							 xspd:+Cos(direction)*acceleration	 
							 yspd:+Sin(direction)*acceleration
						End If
						If KeyDown(Key_down)
							 xspd:-Cos(direction)*acceleration
							 yspd:-Sin(direction)*acceleration
						End If
						spdvector=Sqr(xspd*xspd+yspd*yspd) 'âåêòîð ñêîðîñòè
									If spdvector > 0
										xspd:-(xspd/spdvector)*friction
										yspd:-(yspd/spdvector)*friction
									End If
									
									If spdvector>maxspd
										xspd:+(xspd/spdvector)*(maxspd-spdvector)
										yspd:+(yspd/spdvector)*(maxspd-spdvector)
									End If
							If spdvector<0.2		  ' óñëîâèå "ñêîëüæåíèÿ"
								turnfriction=10
							Else
								turnfriction=0.04
						    End If
							      	x:+xspd
									y:+yspd
						DrawText (spdvector,15,15)
						
						If KeyDown(KEY_RIGHT) turnspd:+turnaccel
						If KeyDown(KEY_LEFT) turnspd:-turnaccel
						
		  If turnspd>turnmax turnspd=turnmax
		  If turnspd<-turnmax turnspd=-turnmax	
		  direction:+turnspd
		  If direction>360 direction:-360
		  If direction<0 direction:+360				
	      If turnspd>turnfriction Then turnspd:-turnfriction
		  If turnspd<-turnfriction Then turnspd:+turnfriction
	      If turnspd < turnfriction And turnspd > -turnfriction Then turnspd=0		
							SetScale 0.3,0.3
							SetRotation direction
							DrawImage entity,x,y
							SetRotation 0
							SetScale 1,1
	 End Method
				  
		EndType 
		
		Graphics 800,600,32
		water=LoadAnimImage("wateranim.jpg",124,124,0,23)
		AutoImageFlags (MASKEDIMAGE)
		SetMaskColor (0,0,0)
		player1:player=New player
		player1.create()
		Repeat
		Cls
		frame=MilliSecs()/92 Mod 23
		TileImage (water,0,0,frame)
		player1.update()
		Flip
		Until KeyHit(Key_Escape)


Who know, why setmaskcolor don't work?

Setmaskcolor must come before loadimage. :) I think anyway.

I'm pretty sure you have to set the mask colour before you load your image. Same with the AutoImageFlags.

thanks for advice. But image still have black edge's =(

Probably the Edges are "Nearly" black

no...edges fully black (i check it by Paint =) )

PS Does SetScale aspect on TileImage?

If the rest of the mask is now not displayed, then the edges of your image cannot be black, otherwise you wouldn't be able to see them. If you can, post a link to your image and we'll take a look at it.

As for SetScale affecting TileImage, I'm afraid it does not. SetRotation doesn't affect TileImage either.

JazzieB, thanks! I has solved my problem.