In a message dated 3/5/05 8:47:37 AM, [EMAIL PROTECTED] 
writes:

>From [EMAIL PROTECTED]  Sat Mar  5 11:57:53 2005
>Return-Path: <[EMAIL PROTECTED]>
>Delivered-To: [email protected]
>Received: from mail-relay.infostations.net (mail-relay.infostations.net
>   [69.19.152.5])  by mail.runrev.com (Postfix) with ESMTP id 7463B93007A
>   for <[email protected]>;
>   Sat,  5 Mar 2005 11:57:53 -0500 (EST)
>Received: from seriyu.infostations.net (seriyu.infostations.net [71.4.40.35])
>   by mail-relay.infostations.net (Postfix) with ESMTP id 97E379F813
>   for <[email protected]>;
>   Sat,  5 Mar 2005 08:44:05 -0800 (PST)
>Received: from host-66-81-136-137.rev.o1.com ([66.81.136.137])
>   by seriyu.infostations.net with esmtp (Exim 4.41 #1)
>   id 1D7cNv-0003aB-JS
>   for <[email protected]>; Sat, 05 Mar 2005 08:44:12 -0800
>Mime-Version: 1.0
>Message-Id: <[EMAIL PROTECTED]>
>In-Reply-To: <[EMAIL PROTECTED]>
>References: <[EMAIL PROTECTED]>
>Date: Sat, 5 Mar 2005 08:44:42 -0800
>To: [email protected]
>From: Jim Hurley <[EMAIL PROTECTED]>
>Content-Type: text/plain; charset="us-ascii" ; format="flowed"
>Subject: Waiting for a handler to finish
>X-BeenThere: [email protected]
>X-Mailman-Version: 2.1.1
>Precedence: list
>Reply-To: How to use Revolution <[email protected]>
>List-Id: How to use Revolution <use-revolution.lists.runrev.com>
>List-Unsubscribe: <http://lists.runrev.com/mailman/listinfo/use-revolution>,
>   <mailto:[EMAIL PROTECTED]>
>List-Archive: <http://lists.runrev.com/pipermail/use-revolution>
>List-Post: <mailto:[email protected]>
>List-Help: <mailto:[EMAIL PROTECTED]>
>List-Subscribe: <http://lists.runrev.com/mailman/listinfo/use-revolution>,
>   <mailto:[EMAIL PROTECTED]>
>
>I'm having problems with messages.
>
>I want to have an oval graphic fade out to 0 width and height, 
>relocate to a new position and then fade in with diamMax width and 
>height at the new location.
>
>And I want all this to happen while another graphic is moving on the 
>screen. For this reason, all loops are executed with "send" messages 
>in xx time.
>
>I have tried the following:
>
>local diamMax
>
>on mouseUp
>
>   send "mouseUP" to grc "myGraphic"
>
>   --The above command starts "myGraphic" in motion.
>   --That motion is executed with {"send ..... in 10 millisec" and
>   --is suppose to continue while the rest of this script is running.
>
>   put the width of me  into diamMax
>
>   --I want the following doFadeOut to complete execution before 
>"doFadeIn" starts.
>   doFadeOut diamMax
>
>   --The following wait doesn't do what I want.
>   --It halts everything since the message is received at the
>   --first execution of doFadeOut.
>   wait until "doFadeOut" is not in the pendingMessages --What do I 
>need to do here?
>   set the loc of me to 200,200
>   doFadeIn 0
>end mouseUP
>
>on doFadeOut r
>   set the width of me to r
>   set the height of me to r
>   if r =0 then exit doFadeOut
>   send "doFadeOut r-1" to me in 1 tick
>end doFadeOut
>
>on doFadeIn r
>   set the width of me to r
>   set the height of me to r
>   if r = diamMax then exit doFadeIn
>   send "doFadeIn r+1" to me in 1 tick
>end doFadeIn
>
>I guess I could insert a wait diamMax ticks (plus something for good 
>measure). But there must be a way of detecting when doFadOut has 
>finished and then moving on.
   One thing you might consider is using a custom property; set the 
ItzInvisible of the stack to false when the fading starts, and set it to true 
when the 
fading is done.
   Another thing you might try is moving your "doFadeIn 0" statement to the 
"doFadeOut" handler, like so:

on doFadeOut r
   set the width of me to r
   set the height of me to r
   if r =0 then
     doFadeIn 0
   else
     send "doFadeOut r-1" to me in 1 tick
  end if
end doFadeOut

   You shouldn't need to explicitly exit "doFadeOut"; the way this is set up, 
it simply won't send "doFadeOut" when R = 0, which means the "send"-loop 
*will* finish at that point.

   Hope this helps...
_______________________________________________
use-revolution mailing list
[email protected]
http://lists.runrev.com/mailman/listinfo/use-revolution

Reply via email to