Code archives/Graphics/Dissolve Effect

This code has been declared by its author to be Public Domain code.

Download source code

Dissolve Effect by ninjarat2006
This takes whatever is currently on the backbuffer and tiles it. Then it shrinks and rotates the tiles slowly until they dissapear.
Global imgs:TImage[20,15]
initfadeout()

'your code goes here

Function initfadeout()
	For j=0 To 19
		For k=0 To 14
			imgs[j,k]=CreateImage(GraphicsWidth()/20,GraphicsHeight()/15,1,DYNAMICIMAGE)
			MidHandleImage imgs[j,k]
		Next
	Next
End Function
	
Function fadeout()
	For j=0 To 19
		For k=0 To 14
			GrabImage imgs[j,k],j*(GraphicsWidth()/20),k*(GraphicsHeight()/15)
		Next
	Next
	
	For i#=1 To 0 Step -.015
		Cls
		SetTransform (1-i)*180,i,i
		For j=0 To 19
			For k=0 To 14
				x=j*(GraphicsWidth()/20); y=k*(GraphicsHeight()/15)
				xh=GraphicsWidth()/40; yh=GraphicsHeight()/30
				DrawImage imgs[j,k],x+xh,y+yh
			Next
		Next
		SetHandle 0,0
		SetTransform 0,1,1
		Flip
	Next
End Function

Comments

Curtastic2006
Hi, nice little effect. Make it work in strict mode please.


ninjarat2006
Okay, this should work in strict mode.



Booticus2006
Hey thats damned neat! Thanks a lot!


Code Archives Forum