Multiple Visual Effects Simultaneously?

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Multiple Visual Effects Simultaneously?

Post by endernafi » Wed May 02, 2012 12:38 pm

Hello Dear LiveCoders...


Is it possible to execute (at least) two visual effects simultaneously?
I know that LiveCode doesn't support multithreading natively,
but maybe there is a workaround...

Say, we have two groups on our card;
one is a group of image thumbnails of an album,
and the other is a group of navigation buttons.

We want to change the photo album with dissolve effect;

Code: Select all

hide group "album1" with visual effect dissolve fast
show group "album2" with visual effect dissolve fast
and to change the nav buttons with push effect but exactly at the same time

Code: Select all

hide group "buttons1" with visual effect push left
show group "buttons2" with visual effect push left
.
Btw, my question is about executing simultaneously,
not about two different effects.

Thanks for any help & idea { or educated guesses :) }


~ enderNafi

Klaus
Posts: 14212
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Multiple Visual Effects Simultaneously?

Post by Klaus » Wed May 02, 2012 12:43 pm

Hi endernafi,

welcome to the forum! :)

yep, that is possible!

Hint: The syntax for "visual effect" has changed slightly in 5.0x!

Try this:
...
## the trick is to use "lock screeen", do your stuff and then unlock the screen!
lock screen for visual effect
hide group "album1"
show group "album2"
# Now show all your modifications at once:
unlock screen with visual effect dissolve fast
...

Best

Klaus

endernafi
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 296
Joined: Wed May 02, 2012 12:23 pm
Contact:

Re: Multiple Visual Effects Simultaneously?

Post by endernafi » Wed May 02, 2012 1:05 pm

Hi Klaus,

Thanks, it worked like a charm :)
But I guess this question belongs to the beginner section,
considering how simple the solution was :oops:

Thanks again...

Kind Regards,



enderNafi
~... together, we're smarter ...~
__________________________________________

macOS Sierra • LiveCode 7 & xCode 8

Klaus
Posts: 14212
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Multiple Visual Effects Simultaneously?

Post by Klaus » Wed May 02, 2012 1:29 pm

Hi endernafi,

definitively no need to be embarrassed! :)

Please check these stacks, great learning resources!
http://www.runrev.com/developers/lesson ... nferences/


Best

Klaus

Post Reply