DerCAW
12-02-2006, 11:08 AM
I'm trying to create a very basic slideshow app, that uses photos with hard-coded names in the same directory as the SOLO app.
In essence, the application should load the photos at runtime, fade in to the first, possibly pan across it, fade it out, fade the next one in, pan some, etc. - once it reaches the last photo, it should return to the first and begin again. An eternal loop.
My problem is that A) since there is no user-interactivity with the application, everything occurs 'oninit', and B) the compiled application thus tries to execute all of the instructions simultaneously.
So what should happen is that the application loads the view, which oninit calls the method which will animate the fade-in, animate the panning, animate the fade-out, then change the 'resource' attribute on the view and fade in the next picture.
Except that it tries to do all of these at the same time, and ends up changing the resource to a different picture before it even fades in all the way, calling the next method and getting caught up in the eternal loop without knowing what to do.
Does anyone have any idea on how to force OpenLaszlo to obey the order of execution, and not begin the next command until the first one has been completed? Or any other way of accomplishing the same result?
Any help is very much appreciate, thanks.
In essence, the application should load the photos at runtime, fade in to the first, possibly pan across it, fade it out, fade the next one in, pan some, etc. - once it reaches the last photo, it should return to the first and begin again. An eternal loop.
My problem is that A) since there is no user-interactivity with the application, everything occurs 'oninit', and B) the compiled application thus tries to execute all of the instructions simultaneously.
So what should happen is that the application loads the view, which oninit calls the method which will animate the fade-in, animate the panning, animate the fade-out, then change the 'resource' attribute on the view and fade in the next picture.
Except that it tries to do all of these at the same time, and ends up changing the resource to a different picture before it even fades in all the way, calling the next method and getting caught up in the eternal loop without knowing what to do.
Does anyone have any idea on how to force OpenLaszlo to obey the order of execution, and not begin the next command until the first one has been completed? Or any other way of accomplishing the same result?
Any help is very much appreciate, thanks.