Is there a way to cycle through a number of different images say every 5-10 secs, preferably with fade in/out ?
If so how.
Thanks.
Is there a way to cycle through a number of different images say every 5-10 secs, preferably with fade in/out ?
If so how.
Thanks.
I assume then that this can’t be done …
I don’t think there is any way to do fade in/out.
But yes you can show images in a cycle. For this you have to create a job by using Scheduler plug-in.
This job will be executed at the time interval set by you. In this scheduler job, load image to the media field.
Write the logic to cycle through the images.
Hope this will help.
In developer and I run this code but I get the error listed after the code:
var startDate = new Date();
startDate.setTime(startDate.getTime()+20000);
var endDate = new Date(startDate.getTime()+100000);
plugins.scheduler.addJob('Image5seconds',startDate,globals.setImage(),5000,40,endDate);
Can’t find method com.servoy.extensions.plugins.scheduler.SchedulerProvider.js_addJob(string,java.util.Date,org.mozilla.javascript.Undefined,number,number,java.util.Date). (C:\Documents and Settings\Default User\servoy_workspace\InMocean\forms\MainUser.js#15)
at C:\Documents and Settings\Default User\servoy_workspace\InMocean\forms\MainUser.js:15 (onShow)
I assume the scheduler would run the globals.setImage method and I would have a test in that method that determines which image to display which alters the image using the following code.
forms.MainUser.elements.img_middle.setImageURL('media:///my.png')
Problem is I can’t even get the scheduler invoked due to the above error nor whether this is the correct way of swapping the images.
Hi
Please remove the parenthesis from the global method.
var startDate = new Date();
startDate.setTime(startDate.getTime()+20000);
var endDate = new Date(startDate.getTime()+100000);
plugins.scheduler.addJob('Image5seconds',startDate,globals.setImage,5000,40,endDate);
Thanks works fine.