visual effect between stacks

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9655
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

visual effect between stacks

Post by dunbarx » Sat May 15, 2021 2:48 pm

I have never needed to use a visual effect, though have played around a long time ago.

No problem between cards on a stack, but cannot make the visual effect, er, visual, between stacks. This comes from a thread:
viewtopic.php?f=8&t=35826

Anyway, with two stacks "a' and 'b", from a button on "a', this navigates, but without any visual effect:

Code: Select all

on mouseUp
   visual effect "dissolve"
   go stack "b" in new window
end mouseUp
There is a delay, the same as if the effect was in fact doing its thing. No other gadgetry, locking/unlocking the screen for visual effect, say, matters.

This is why I am back in the beginners section.

Craig
Last edited by dunbarx on Sat May 15, 2021 10:47 pm, edited 2 times in total.

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: visual effect between stacks

Post by jmburnod » Sat May 15, 2021 3:39 pm

Hi Craig,
I remember used the blendlevel property of stack "b" to simulate a visual effect dissolve.
Jean-Marc
https://alternatic.ch

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9361
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: visual effect between stacks

Post by richmond62 » Sat May 15, 2021 4:32 pm

Code: Select all

on mouseUp
   put the windowID of stack "STAKKK" into STKID
   visual effect "dissolve"
   go stack "NOOO" in window STKID
end mouseUp
Works. 8)
Attachments
STAKKK.livecode.zip
Here's the stack.
(831 Bytes) Downloaded 119 times

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9655
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: visual effect between stacks

Post by dunbarx » Sat May 15, 2021 5:29 pm

@Richmond.

Thanks, but not for me.

Again, there is a delay one would expect from the visual effect process, but no actual effect

On Mac.

@ Jean-Marc.

Makes sense, but the dictionary states that one can use visual effects when navigating from one stack to another using the "go" command alone. You post implies a kludge is required. Is that in fact so?

Is this just a dictionary error? Or more likely, just me?

Craig

Klaus
Posts: 13823
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: visual effect between stacks

Post by Klaus » Sat May 15, 2021 5:40 pm

Hi Craig,

it definitively works, however only on a "per stack" base, not with different windows!

Code: Select all

...
visual effect "dissolve"
go stack "b" in new window
...
Doesn't work!

1. the two stacks must have the exact same dimensions w/h
2. use the official syntax:

Code: Select all

...
lock screen for visual effect
go stack "b" in window of this stack
unlock screen with visual dissolve
...
Tested and works! :-)


Best

Klaus

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9823
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: visual effect between stacks

Post by FourthWorld » Sat May 15, 2021 10:20 pm

dunbarx wrote:
Sat May 15, 2021 2:48 pm

Code: Select all

   go stack "b" in new window
The "in new window" clause interests me. Perhaps we have an opportunity to enhance the docs.

Craig, what was your intention in adding that clause?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9655
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: visual effect between stacks

Post by dunbarx » Sat May 15, 2021 10:45 pm

Richard.
Craig, what was your intention in adding that clause?
None. I have never "used" a visual effect, though played around with them way back in the day. This derived from the other thread.

Craig

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9655
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: visual effect between stacks

Post by dunbarx » Sat May 15, 2021 10:52 pm

Rereading the dictionary, I can see that it sort of implies being limited to stacks that are "folded" into the same window.

It threw me though.

And so Jean-Marc's kludge is just that, something that will do the job really and truly between two separate stacks, each to their own. Good to know how these things work...

Craig

jmburnod
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 2718
Joined: Sat Dec 22, 2007 5:35 pm
Location: Genève
Contact:

Re: visual effect between stacks

Post by jmburnod » Sun May 16, 2021 11:39 am

Thanks Craig to examine deeply this case and refresh my memory
Best
Jean-Marc
https://alternatic.ch

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9361
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: visual effect between stacks

Post by richmond62 » Sun May 16, 2021 12:46 pm

HyperCard was concieved off as a single-windowed arrangement with a stack of cards metaphor.

LiveCode has inherited that metaphor. but also introduced the concept of substacks; therefore
allowing the possibility of multiple windows for a single application.

The visual effect transitions have also been conceived as things that happen between cards in the
same stack, so it should come as no great surprise that attempting to use them between stacks
is beset with problems.

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7227
Joined: Sat Apr 08, 2006 8:31 pm
Location: Minneapolis MN
Contact:

Re: visual effect between stacks

Post by jacque » Sun May 16, 2021 5:52 pm

richmond62 wrote:
Sun May 16, 2021 12:46 pm
The visual effect transitions have also been conceived as things that happen between cards in the
same stack, so it should come as no great surprise that attempting to use them between stacks
is beset with problems.
It's officially supported, and using the window ID is the only way to use visual effects to navigate between two stacks. But use the syntax Klaus suggested. Also, I usually use the window ID rather than "this window" though apparently that works.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”