Can't get a code persistent independent loop of the chassis.

Hello.

I need a code of 'security' to perform systematically at regular intervals (for example, run once every minute). I'm developing a program that must have the USB pen inserted to avoid multiple computers using the same USB. I know how to check for the USB, but the problem lies in making it to check every 60 seconds. I already tried this:

on exitframe

If the timer > 60 then

checkUSB()

startTimer()

end if

end exitframe

It gets only released in this framework (which makes sense), and I need to be able to be triggered from almost anywhere, as long as the film is running.

Is there a way to make code run regardless of what image the film is on? I can add an invisible sprite on stage with one "on exitframe me ' behavior, but that looks to a workaround sorta dumb. Is there a better?

I use DirectorMX 2004 in Windows 7.

Thank you.

Marco Roberto.

Use a timeout object.  The Director help file is particularly terrible regarding the syntax for wait times, so I recommend that you read this article that describes their use very well:

http://www.Director-online.com/dougwiki/index.php?title=timeout

Basically, the startMovie (or when you want to start the USB control), you must add the code to create the time-out.  This would call a script #movie every second (or whatever interval you want).

Tags: Director

Similar Questions

Maybe you are looking for