#Include "window9.bi"

Dim As Integer mov(4)
Dim As HWND m(4)
m(0)=OpenWindow("Анимашки",10,10,500,170)
CenterWindow(m(0))
ContainerGadget(5,1,200,490,170)
For i As Integer = 1 To 4
	m(i)=ImageGadget(i,110*(i-1)+10*i,10,110,110)
	mov(i)=LoadMovie(m(i),i & ".gif",1,1,110,110)
	ResizeMovie(_
	mov(i),_
	1,_
	1,_
	MovieSourseWidth(mov(i)),_
	MovieSourseHeight(mov(i))_
	)
	PlayMovie mov(i)
Next
ResizeGadget(5,,1)
UpdateWindow(m(0))
Do : Loop Until WaitEvent=EventClose
For i As Integer = 1 To 4
	FreeMovie(mov(i))
Next

