Page 1 of 1

Slideshow over one card portion

Posted: Wed Apr 27, 2016 2:56 pm
by gcubar
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

Re: Slideshow over one card portion

Posted: Wed Apr 27, 2016 3:03 pm
by Klaus
Hola Gilberto,

1. welcome to the forum! :D
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

Posted: Thu Apr 28, 2016 4:36 pm
by gcubar
Klaus wrote:Hola Gilberto,
1. welcome to the forum! :D
Thanks! and thanks again for your quick answer :D
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 :(
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.

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
At the end, if this is an expected behaviour as you say, how can I make a slideshow on a portion of card without freezes the rest of application's components?

Thanks,
Gilberto Cuba Ricardo

Re: Slideshow over one card portion

Posted: Thu Apr 28, 2016 5:09 pm
by Klaus
Hola Gilberto,
...is the "visual effect" or the "lock screen" which blocks the IDE?
it is the combination of both, but you cannot use a visual effect without "lock screen"!
and that's why i don't understand the reason for the IDE and entire screen freezes.
So do I, but that surely has technical reasons but we cannot do anything about it.
how can I make a slideshow on a portion of card without freezes the rest of application's components?
I'm afraid you can't if you want to use visual effects!


Best

Klaus

Re: Slideshow over one card portion

Posted: Thu Apr 28, 2016 5:34 pm
by dunbarx
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