PDA

View Full Version : png animation


zaknbou
11-27-2006, 11:18 AM
after i export my gif animation to still pic .png and starting the timer in preload, i add a pic at timer to load the first png but i don't know how to
continue from here , how could i load other so i got an animation ...

holtgrewe
11-27-2006, 11:33 AM
On Preload
Page.StartTimer(500)
-- Find out the X & Y coordinates of your image.
pic_pos = Image.GetPos("Picture");


On Timer
-- Start moving the image.
Image.SetPos("PNG_Image1", pic_pos.X+10, pic_pos.Y+10 );


Assuming the scripting is correct, this should get you started. re-post if you need further assistance, there should be some good examples on the Forum.

I hopes this helps.

zaknbou
11-27-2006, 11:38 AM
thanks man for the reply but i don't need to move my pic into my page ,
i need to change it to another one , pic1 then pic2 ..pic 5 till
i got my animtion in a fixed place .

holtgrewe
11-27-2006, 11:50 AM
Okay,

On Preload
Page.StartTimer(500)
-- Find out the X & Y coordinates of your image.
pic_pos = Image.GetPos("Image_1");


after showing image_1,

On timer
--set Image opacity to 0
Image.SetOpacity("Image_1", 0)
-- move the image
Image.SetPos("Image_1", pic_pos.X+10, pic_pos.Y+10 );
-- load a new image
Image.Load("Image_1", "AutoPlay\\Images\\Image_2.jpg")

etc.

I'm not certain the coding is 100% correct, but this should work with some tweaking.
As long as your Images are sequentially number you can hang it in a loop and increment the Image numbers appropriately.

I hope this helps.