473,396 Members | 1,864 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Action script that acts like a screensaver

I'm creating a interactive map that guests will be able to use for our property. I have many different pages and movie clips. The question I have is if a guest walks up to the map and goes to a certain page to view one of our outlets (which has photos and a brief description of what it is) and then leaves, how do I make the file go back to a home page or screensaver after a certain amount of time of inactivity of the mouse? I've tried timed-intervals but if you go to a page that has the action script for it and then go to another page, it will take the timed-interval with it and then go to the main page even when a guest is at the interactive map.

If you all know of any code that basically runs like a screensaver for you computer please help me.

Thanks,
Dec 11 '07 #1
1 4424
//Tracks mouse movement, resets timer to 5 minutes and starts counting down
onMouseMove = function() {
total = 300;
}

//Tracks mouse button press, resets timer to 5 minutes and starts counting down
var mouseListener:Object = new Object();
mouseListener.onMouseDown = function() {
total = 300;
};

Mouse.addListener(mouseListener);

var total = 300; //5 minutes

timerStart = function() {
errorRate =0 ;
onEnterFrame = function() {
minutes = Math.floor(total/60);
seconds = total%60;
my_txt.text = "0"+minutes+":"+seconds;

var time = (minutes *100)+seconds;
if (time == 00) {
// You need to put your scene in here!
}
trace(time);
}
};
counter = function () {
total--;
if (minutes ==0 & seconds==1) {
clearInterval(setIt);

}
};
intID = setInterval(count, 1000);
setIt = setInterval(this, "counter", 1000);



timerStart();
Jan 2 '08 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: klappnase | last post by:
Hello everyone, does anyone know a way to stop the screensaver under linux from starting up while a certain process is running? I need this because I experience a memory leak while recording...
0
by: Luke | last post by:
I am trying to capture an event when the screensaver starts. I have code working on Windows XP etc when the Password/Welcome Screen is enabled . Using the Fast User Switching Notifications. ...
2
by: DanielB | last post by:
Does anyone know what the command line argumentto launch a screensaver's options/configuration dialog is on Windows XP Pro? From most of the example source code I can find on the web, it would...
0
by: Paul Smith | last post by:
I have been given an unusual task to create a Windows Service to do something periodically to make the screensaver timer reset. We have a general policy of locking computers automatically after 10...
4
by: Paul Smith | last post by:
I have been given an unusual task to create a Windows Service to do something periodically to make the screensaver timer reset. We have a general policy of locking computers automatically after 10...
1
by: DanielB | last post by:
Does anyone know what the command line argumentto launch a screensaver's options/configuration dialog is on Windows XP Pro? From most of the example source code I can find on the web, it would...
4
by: Simon Mercer | last post by:
I have been trying to build a screensaver that will connect to a database and display specific data depending on the user that is logged in. I have managed to get a simple data access screensaver...
6
by: VMI | last post by:
How difficult is it to develop a screensaver in C#? The screensaver would be composed of several images and each image would be displayed on the screen for a few seconds. The only difficult part...
0
by: suzyq89 | last post by:
Hi there, I'm a newbie with AS2....and i wanted to learn to create a photo gallery that scrolls right or left, and that when you click on the photo it becomes bigger. Well I found a tutorial from...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.