Page 1 of 1

open a substack in an opencard handler

Posted: Mon Jul 29, 2013 11:54 pm
by Martin Koob
I am trying to have a substack open above the main stack when a card opens. What happens is the substack opens in front of the main stack but immediately the main stack moves to the front. I want the substack to stay above the main stack.

Two illustrate this I created a simple stack with a main stack with two cards and a sub stack called "window2"

Card 1 of the main stack has a button with the script

Code: Select all

on mouseUp 
   go card 2 
end mouseUp 
Card 2 of the main stack has the following card script

Code: Select all

on opencard 
   show stack "window2" 
   go stack "window2" 
   #the following wait command is just to hold stack "window2" open long enough to see it opened 
   wait 2 seconds 
end opencard 

on closecard 
   hide stack "window2" 
end closecard 
Card 2 of the main stack also has a button with the following script

Code: Select all

on mouseUp 
    go card 1 
end mouseUp 
When you click the button to go to card 2 the stack "window2" opens above the main stack and stays for the 2 seconds of the wait but then the main stack moves to the front.

I assume the problem is that when the opencard message ends the stack with the card with that handler becomes the active stack and moves to the front.

I have tried sending or dispatching messages to other objects to show and go to the substack but if I do that within the opencard handler after those messages are dealt with the context returns to the open card handler and then the main stack becomes active again.

Is there another way to do this?

Thanks.

Martin Koob

Re: open a substack in an opencard handler

Posted: Tue Jul 30, 2013 1:12 am
by shaosean
The extension rev is not allowed.
really? you guys couldn't even be bothered to modify the settings of the forum to allow your own file format?

This uses a "send" command in the openCard of card 1 of stack "untitled 1"

Re: open a substack in an opencard handler

Posted: Tue Jul 30, 2013 1:31 pm
by Martin Koob
Thanks Shaosean.

I see it is the send in time that makes the difference. I was just using send.

Martin

Re: open a substack in an opencard handler

Posted: Tue Jul 30, 2013 2:06 pm
by Klaus
shaosean wrote:
The extension rev is not allowed.
really? you guys couldn't even be bothered to modify the settings of the forum to allow your own file format?
You guys? C'mon, that's not my fault, cherie 8-)

Please complain at RunRev :-D

Re: open a substack in an opencard handler

Posted: Tue Jul 30, 2013 2:59 pm
by shaosean
easier to blame you santa klaus ;-P

Re: open a substack in an opencard handler

Posted: Tue Jul 30, 2013 3:18 pm
by Klaus
*#%%$ยง]]##*++

:-D