Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

on timeOut() problems with MIAW's

Posted on 2006-06-21
4
Medium Priority
?
229 Views
Last Modified: 2013-12-24
Hi,
I have a movie script that returns my application to starting point with something like this:

on timeOut
    play movie "xxx"
end

This works fine even if I have several different movies in my application but when I have MIAW's I'll get problems. The stage doesn't seem to now anything about the mouse clicks in MIAW and on timeOut -handler occurs even if I'm having some action in MIAW. How can I avoid the timeOutLength not to fill when MIAW is open and clicked?

On the other hand, I also had the situation where I opened a MIAW and after that the on timeOut never occurred.

It seems kind of random which effect I do get.
0
Comment
Question by:-J-
[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 20

Expert Comment

by:MediaMacros
ID: 16955273
Timeouts are based on a set time, not on when you last clicked.  You can check the lastEvent to see when the user last clicked, pressed a key, etc.  That can be used inside the timeout event to see if enough time has passed and if not reset the timeout interval acordingly.
0
 

Author Comment

by:-J-
ID: 16958139
This is a quote from director help about timeOut handler:

"System message and event handler; contains statements that run when the keyboard or mouse is not used for the time period specified in timeOutLength."

So it says that it's the last klick or key press that starts counting towards the timeOutLength.

I've set the timeOutLength for a few seconds (for test purposes) and it works fine when I have just stage and keep clicking the mouse. When I stop clicking director acts accordingly and plays movie "xxx" after that few seconds.

But when I open a MIAW I get those problems I described.

BTW, I'm using MX 2004 if that makes any difference.
0
 
LVL 20

Accepted Solution

by:
MediaMacros earned 600 total points
ID: 16959022
Sorry, I thought you were trying to set up a custom timeout object.  

The problem is that each window gets its own "space" so if you want the timeout to be handled across both you will need to roll your own custom handler.  

You can add to your script to check the lastevent of each window by looping through the window list using the tell command.  You can then see if anything was done in a time less than the timout period and if so reset the period acordingly.
0
 

Author Comment

by:-J-
ID: 16999676
I added in movie script "on enterFrame" handler with this kind of a line:

if the lastevent > foo then bar

I use that script globally in every movie and that made it, I didn't even have to loop the windowlist.
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

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

Now that Expression Web 4.0 (http://www.microsoft.com/expression/products/Upgrade.aspx) is free if you buy or have the full version of Expression Web 3.0, now is the best time to  migrate from FrontPage to Expression Web (http://www.frontpage-to-exp…
Originally, this post was published on Monitis Blog, you can check it here . It goes without saying that technology has transformed society and the very nature of how we live, work, and communicate in ways that would’ve been incomprehensible 5 ye…
The purpose of this video is to demonstrate how to exclude a particular blog category from the main blog page. This is can be used when a category already has its own tab, or you simply want certain types of posts not to show up on the main blog. …
The purpose of this video is to demonstrate how to Import and export files in WordPress. This will be demonstrated using a Windows 8 PC. Go to your WordPress login page. This will look like the following: mywebsite.com/wp-login.php : Click on Too…
Suggested Courses

610 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