CLS , _RGB32(128, 128, 128) ' set background color for show how use video on different background
VideoPicture&
= _LOADIMAGE("FXFire1.JPG", 32) ' file is hacked from other game :-D
DIM Frame
(10) AS LONG ' i need using 10 frames from this file (see to this image)
x = 1: y = 1
FOR VideoFramesLoad
= 1 TO 10 ' in file is total 16 video frames, but program use 10 only. This loop load it all to one array. This way you can use for your hero in game. Frame&
(VideoFramesLoad
) = _NEWIMAGE(64, 64, 32) ' all video frames loaded from source file are 64x64 pixels big _PUTIMAGE (0, 0), VideoPicture&
, Frame&
(VideoFramesLoad
), (x
, y
)-(x
+ 64, y
+ 64) _SETALPHA 0, _RGB32(0, 0, 0) TO _RGB32(100, 150, 160), Frame&
(VideoFramesLoad
) 'Set background in SOURCE FRAME as full transparent in range from full black color (_RGB32 0,0,0) to color 100,150,160. x
= x
+ 64:
IF x
> 3 * 64 THEN x
= 1: y
= y
+ 64 ' X and Y creating correct coordinates for loading all images from source
Mx = 400 - 32: My = 300 - 32: zoom = 1
_MOUSEMOVE Mx
, My
' shift mouse to middle animation (animation is 64x64 si his middle is 32) VideoPlay = VideoPlay + 1
IF VideoPlay
> 10 THEN VideoPlay
= 1 Mw
= _MOUSEWHEEL(1) ' use mouse wheel for zooming. Can be used for 3D effect. zoom = zoom + (Mw * 2)
_PUTIMAGE (Mx
- 32, My
- 32)-(Mx
+ 32 + zoom
, My
+ 32 + zoom
), Frame&
(VideoPlay
) ' LOCATE 1, 1:
PRINT "Use mouse for fire move, mouse wheel for zoom, Esc for end."
FOR ClearMemory
= 1 TO 10 _FREEIMAGE Frame&
(ClearMemory
) ' all images are deleted from memory. This muss be done, because images need many memory _FREEIMAGE VideoPicture&
' source image is deleted from memory