Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

Is there a command in Lingo similar in function to a "C" Sleep command?

Posted on 2001-09-04
4
Medium Priority
?
227 Views
Last Modified: 2013-12-24
I would like to pause a handler for a brief amount of time.  I tried using a "pause" and a "delay" statement but they didn't seem to accomplish the results I need.  I am a novice to Director so I need specifics.
0
Comment
Question by:bleek
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 2

Expert Comment

by:winwiz
ID: 6454696
I'm not sure you I have enough information about your issue.  But if you are trying to wait for something to occur, you could use a repeat while statement:

repeat while flag <> 1
--nothing
-- the behavior will sit here until flag = 1
end repeat


-- at some point you would set flag = 1 and the behavior will continue.

--
hope this helps, if not, please be more specific about what you are trying to accomplish.

thanks
0
 

Author Comment

by:bleek
ID: 6461913
I was hoping for a set time for the pause, like a Sleep(1000) in "C".  I saw a "Wait for Time Duration "  but didn't get enough detail to use it. If there is no such feature, I will have to use a loop, but I was trying to avoid that.
0
 
LVL 2

Accepted Solution

by:
winwiz earned 400 total points
ID: 6462134
I have written a handler to use that should work exactly like the sleep() funcion in C.

put this code into a movie script, so you'll be able to call it from anywhere:

on sleep secs
  startTimer
  repeat while the timer < secs*60
    --do nothing  
  end repeat
  return
end

then, just like in C, you can have a time out any time by calling sleep():   i.e.=  

on beginsprite me
sleep(5) -- wait for 5 seconds
alert "it's been 5 seconds"
end
0
 

Author Comment

by:bleek
ID: 6463822
Thanks.  That seems to do the job.
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Turn A Profile Picture Into A Cartoon Using Photoshop And Illustrator This tutorial will teach you how to make a cartoon style image out of a regular picture. I have tried to keep the tutorial as simple as possible. I used Adobe CS4 for this tuto…
When setting up new project requests for our site, one of the most powerful tools our team has available to use is Axure (http://www.axure.com/). It’s a tool for creating software and web prototypes that can function and interact as if it were the a…
The purpose of this video is to demonstrate how to properly insert a Vimeo Video into a WordPress site or Blog. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp…
The purpose of this video is to demonstrate how to prevent comment spam on a WordPress Website. This will be demonstrated using a Windows 8 PC. Plugin Akismet will be used. Go to your WordPress login page. This will look like the following: myw…

721 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question