Hi all. I've got a card with a lot of elements on it and I need to display a number of sequential items as a little animation (showing and hiding primitive shapes) on one part of the card. With all of the other elements on screen, the refresh is pretty slow, so I'm hoping that redrawing only part of the screen will give me a boost. Is there a way to refresh only one area of the card and leave the rest alone?
BTW, I am currently using lock/unlock screen.
Thanks!
M-A
Refresh only part of the screen?
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
-
- Posts: 49
- Joined: Mon Apr 03, 2017 3:55 pm
- Location: Nova Scotia, Canada
Refresh only part of the screen?
Hypertalk developer on and off since the days of SuperCard. Currently using LC to do rapid prototyping for a new kids' toy.
-
- VIP Livecode Opensource Backer
- Posts: 7237
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: Refresh only part of the screen?
Check the dictionary for:
Code: Select all
lock screen for visual effect in rect <rectangle>
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
-
- Posts: 49
- Joined: Mon Apr 03, 2017 3:55 pm
- Location: Nova Scotia, Canada
Re: Refresh only part of the screen?
Thank you Jacque. I gave that a try with the following code:
I also just tried plain old "unlock screen" at the end. Both methods played at the same speed as it was without specifying the rect.
That being the case, my solution is to open up a substack that contains only the elements I need to do the animation and play the animation in that window. This achieves the end of not updating what's in the main stack. This method sped up the animation display by about 2x.
Code: Select all
lock screen for visual effect in rect (the rect of group "groupName")
(do stuff)
unlock screen with visual effect "plain" very fast
That being the case, my solution is to open up a substack that contains only the elements I need to do the animation and play the animation in that window. This achieves the end of not updating what's in the main stack. This method sped up the animation display by about 2x.
Hypertalk developer on and off since the days of SuperCard. Currently using LC to do rapid prototyping for a new kids' toy.