Hello colleagues,
I'm trying to do an application with a slideshow that changes every time automatically. I'm doing it on an image, locking the screen and using visual effect; however, I am having some problems with the application performance.
The slideshow works well and makes transitions in time and with the desired effect, but it frezzes the whole LiveCode IDE (which includes my application as well) when the image is changed.
I attached a sample code so they can see my problem. To start transitions is given a click on the "start" button and to stop him in the "stop" button. When the slideshow is running, and we begin scrolling the text of below field, it frezzes at the same time when the image will be changed. The same applies ever I try to write in the script editor whether the slideshow is activated.
Could this be a bug or is there something I'm going unnoticed in my code?
Beforehand thank you very much.
Gilberto Cuba Ricardo
Slideshow over one card portion
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Slideshow over one card portion
- Attachments
-
- skSlideShow.zip
- (162.88 KiB) Downloaded 182 times
Re: Slideshow over one card portion
Hola Gilberto,
1. welcome to the forum!
2. Without looking at your scripts: visual effects ARE in fact blocking!
Means during the effect everything halts/freezes, this is exspected behaviour
and we cannot do anything about it
Best
Klaus
1. welcome to the forum!

2. Without looking at your scripts: visual effects ARE in fact blocking!
Means during the effect everything halts/freezes, this is exspected behaviour
and we cannot do anything about it

Best
Klaus
Re: Slideshow over one card portion
Thanks! and thanks again for your quick answerKlaus wrote:Hola Gilberto,
1. welcome to the forum!![]()

Excuse me, but i don't understand well; is the "visual effect" or the "lock screen" which blocks the IDE? Because, I use the lock screen for a region of card, and that's why i don't understand the reason for the IDE and entire screen freezes.Klaus wrote:2. Without looking at your scripts: visual effects ARE in fact blocking!
Means during the effect everything halts/freezes, this is exspected behaviour
and we cannot do anything about it![]()
This is the script I have on the image that behave as slideshow.
Code: Select all
on automaticSlideShow
if gShowSlide is not true then
exit automaticSlideShow
end if
-- only lock a portion area of screen
lock screen for visual effect in rect (the rect of me)
-- iterate cyclically
put lCurrentImage mod lTotalSlideImage into lCurrentImage
add 1 to lCurrentImage
-- exchange images
local tImageID
put item lCurrentImage of gSlideImageIDs into tImageID
put the image ID tImageID into the image "imgSlideShow"
-- unlock with desired effect and velocity
unlock screen with visual effect "dissolve" very fast
-- launch automatic slideshow after desired time
send "automaticSlideShow" to me in 3 secs
end automaticSlideShow
Thanks,
Gilberto Cuba Ricardo
Re: Slideshow over one card portion
Hola Gilberto,
Best
Klaus
it is the combination of both, but you cannot use a visual effect without "lock screen"!...is the "visual effect" or the "lock screen" which blocks the IDE?
So do I, but that surely has technical reasons but we cannot do anything about it.and that's why i don't understand the reason for the IDE and entire screen freezes.
I'm afraid you can't if you want to use visual effects!how can I make a slideshow on a portion of card without freezes the rest of application's components?
Best
Klaus
Re: Slideshow over one card portion
Hi.
All Klaus said.
Know that simply locking the screen is not blocking. In fact this is used for just the opposite reason, to allow other processes to run without either slowing down the whole thing, or preventing the user from seeing those processes, or both.
But you raise an interesting question. How to run a visual effect without using a visual effect. You would have to roll your own. I can see ways of doing this. They all involve overlaying or insinuating other controls on top of each other and adjusting their rects, adjusting blend levels, that sort of thing. All kluges, but surely doable.
Are you game?
Craig Newman
All Klaus said.
Know that simply locking the screen is not blocking. In fact this is used for just the opposite reason, to allow other processes to run without either slowing down the whole thing, or preventing the user from seeing those processes, or both.
But you raise an interesting question. How to run a visual effect without using a visual effect. You would have to roll your own. I can see ways of doing this. They all involve overlaying or insinuating other controls on top of each other and adjusting their rects, adjusting blend levels, that sort of thing. All kluges, but surely doable.
Are you game?
Craig Newman