Solved

on timeOut() problems with MIAW's

Posted on 2006-06-21
4
201 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

Microsoft Certification Exam 74-409

Veeam® is happy to provide the Microsoft community with a study guide prepared by MVP and MCT, Orin Thomas. This guide will take you through each of the exam objectives, helping you to prepare for and pass the examination.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
how to gather data from news site 6 32
New Windows 2012 Server with IIS 8.5 installed all webs get 500.19 errors 17 468
Web Modal Window 1 75
graphic software 6 89
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 create a Printer Friendly PDF on a WordPress Page. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome Screenshot” Google Chrome Extension, and SmallPDF.com Log…
The purpose of this video is to demonstrate how to set up basic WordPress SEO. This will be demonstrated using a Windows 8 PC. The plugin used will be WordPress SEO by Yoast. Go to your WordPress login page. This will look like the following: myw…

920 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