Solved

on timeOut() problems with MIAW's

Posted on 2006-06-21
4
200 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-
  • 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 150 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

When deciding to adopt any help desk solutions many factors should be explored before taking decisions. This will change from business to another but in general there are some kind of rule of thumb. Here are some quick tips: Do we need only ticket…
Introduction In this tutorial, I'll explain how to create an animated progress meter in a wireframe prototype developed using Axure RP 7.0 - a leading prototyping tool for designing web sites and software. (For more information about Axure and gett…
The purpose of this video is to demonstrate how to update a WordPress Site’s version. WordPress releases new versions of its software frequently and it is important to update frequently in order to keep your site secure, and to get new WordPress…
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…

706 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now