View Full Version : can you do gif animations in Open Laszlo?
stuckhere90
05-20-2008, 09:02 AM
I am interested in do so gif animations, and was wondering if OL an do those?
Thanks
kmeixner
05-20-2008, 12:14 PM
I have tried setting animated GIFs as resources in OpenLaszlo 3.3.3 and they just display the 1st frame. However, you could try separating the individual GIF frames into separate GIF files and assign each image as a separate frame in the resource and then use the LzTimer class to switch between the frames.
Kevin
jameserb
08-19-2008, 09:52 AM
you can simulate animated gifs using resources and frames.
For example, I've implemented a typical progress bar, where little dots move across the screen, using a resource with several frames.
I then use a timer to control the change of frames:
<method name="progress">
<![CDATA[
var newFrm = status_bar.getAttribute('frame');
if(newFrm < 6){
newFrm ++;}
else{
newFrm = 1;
}
status_bar.setAttribute('frame', newFrm);
LzTimer.resetTimer(this.progressDelegate, 600);
]]>
</method>
Just one approach to this problem.
vBulletin® v3.8.4, Copyright ©2000-2012, Jelsoft Enterprises Ltd.