Delete Timeout
i have this function on frame 5function playit() {play();}setTimeout(playit,5000);and i want to delete it on frame 10 how to do this try like this but nothingdelete playit();i have a button on stage and when i press on it its paly frame 10 and thats wy i want to delete this time out,if u dont press on it in 5 secont it should play automatic
Adobe > ActionScript 1 and 2
Posted on: 06/11/2008 10:44:00 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Timeout
I have created a menu system http://www.online-mixing.com
The menu pops up from the menu title you mouseover, and then l have a box around the menu layout so when you move away from the selected menu box the menu closes. However, if you move your mouse really quickly off the flash nav then it still thinks the mouse is on the menu.
Is there a way of setting a timeout so that the menu collapes after a given time?
Luke
Timeout
Hi,
When I run my code i GET the following:
Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
at draft11_fla::MainTimeline/checkCorner()
at draft11_fla::MainTimeline/computerPlayer()
at draft11_fla::MainTimeline/keyDownHandler2()
temps
Timeout.
I have an actionscript 2.0 movie, using multiple scenes and buttons.
It allows the user to click there way through the timeline, and across scenes.
I have a problem, If a user walks away from it - without completing it at exhibition, I would like it to timeout and reset to frame 1, scene 1.
I have the following code on a layer that stretchs the length of scene 1.
Taken from a flash help forum:
//see if there is inactivity (for 4 seconds)
var myInterval = setInterval(myFunction, 25*1000);
//there is no inactivity, the mouse is moving
this.onMouseMove = function() {
//clear the interval
clearInterval(myInterval);
//but set a new one
//if there is inactivity after all, for 4 seconds, do something, i.e., call the function
myInterval = setInterval(myFunction, 25*1000);
};
function myFunction()
{
clearInterval(myInterval);
gotoAndStop("Scene 1", 1);
}
My question is to I put that code on the start frame of every scene? (Which I havedone).
The time allocated for the timeout seems to get progressively faster after the initial timeout.
for example, I can click through indefinitely the first time, after it resets I can click through for 25 seconds, after this resets perhaps half, then half of that etc...
so,
What exactly does the clearinterval(myInterval), line do?
I have a feeling its try to reset the timer, and stop it from sending the playhead back to "Scene ,1, 1"
But it doesnt seem to be working.
Code works great for one cycle, But once its reset. The code with trigger itself every 25 seconds, even if i make a conscious effort to continuously move the mouse?
Does 'MouseMove', mean clicking, or just tracking?
Anyhelp would be much appreciated. (
Timeout In Actionscript?
Hey there - I'm pretty new to any comprehensive use of actionscript.
I want to start using scripts to animate stuff in stead of tweening. I've got the basics (eg. using "while" actions to loop commands etc.)
My problem is that I don't know how to stop the 'animation' running as fast as my pc can process it.
Is there some way that I can put a short delay between the loops in this piece of code (similar to Timeout in javascript)???
Otherwise it gets processed so fast that it jumps the 100 pixels in one go!
=============================================
i = 0;
while (i<20) {
_root.image1._x = (_root.image1._x)-5;
i++;
}
=============================================
Thanks for any response (much appreciated!)
Tom Inwood
http://www.mareen.co.uk
Timeout Function ?
hi,
can u please gimme a timout function .. where i can call a function after a specific time interval
A Timeout For A Game
Can anyone tell me if it's possible to create some sort of timeOut object in Actionscript?
Basically, I just want something to delay an action and still be able to change that delay to make it shorter or longer.
If your solution involves playing with the frameRate then forget about it.
LoadVars Timeout
hi,
Please someone tell me loadVars.sendAndLoad timeout span.
Thank you.
Timeout Function
hiya,
just a quick question...im designing for a standalone kiosk therefore i want to know how to have the application automatically return to the first scene when there is no interaction within a movie for a period of 5 minutes. if anyone knows-thats would be great!!
thanks in advance
Flash Timeout
Hi,
I have a dynamic menu that loads about 500 items from database.
The loading is ok, and it was working fine until a little time ago.
But now, because it have a lot of items, the script takes some time to instantiate all mcs in the memory, and because that, my site pops a window saying that "the script can make slow down the computer, etc, etc", that message when the script enters in a infinit loop. There's not the case, my loop is right, just takes some time.
How can I override this pop up message?
Thanks
Timeout Question...
hi...
for example if i come to frame 37...
then i want to stop there for 15 secinds and then procced till the end...
so i need a stop(); timeout script...
any help appreciated..
thanx in advance...
Stop() Timeout
hi...
i wonder...
is there a way when i put stop(); to certain frame so the movei can play again after 15 seconds...
any suggestion appreciated...
thanx in advance..
Timeout Script
Hi big world out there..
does anyone know a timeout script so that my flash movie returns to ..say frame 1, after about 3 minutes of no use.
thanks for any advice and help
Session Timeout
Hi,
How do you create a session timeout in Flash. I would like the application to close down if there has been no activity for two minutes. Thank you in advance.
Var LastSelected: Does This 'timeout'?
a bunch of buttons contain code like this:
on(release) {
if (lastSelected == grid_housing) {
_root.grid.grid_housing.gotoAndPlay("fade");
}
if (lastSelected == grid_homes) {
_root.grid.grid_homes.gotoAndPlay("fade");
}
if (lastSelected == grid_hotels) {
_root.grid.grid_hotels.gotoAndPlay("fade");
}
lastSelected = this;
}
this works on all buttons, but only once. the second time, any code associated with lastSelected doesn't work at all.
whattayathink?
sbb
Timeout Problem
Hi Coders
I am capturing and image from swf to jpg with the following code. It sometimes gives the output. But sometimes cause timeout "A script is causing flash player ". Is there a way to make it not timeout.
I have used http://www.buraks.com/swfsli/ with the cmdline "swfsli index.swf /t200 /b /d /v"
Code:
Code:
who = mixer_mc.holder_mc;
var pixels:Array = new Array();
//var snap = new BitmapData(33, 43);
var snap = new BitmapData(331.5, 432.9);
snap.draw(who);
var w:Number = snap.width, tmp;
var h:Number = snap.height;
var a:Number = 0;
while(a<=w) {
b = 0
while(b<=h) {
tmp = snap.getPixel(a, b).toString(16);
pixels.push(tmp);
b++
}
perc = int((a*100)/w)/2;
_root.mixer_mc.outputLoading_mc.bar_mc.gotoAndStop(perc);
a++
}
outputImage(pixels, h, w, action);
snap.dispose();
NetConnection Timeout
Im testing out Red5 server at the moment for a friends project, although its the worlds worst thing to debug and find information for. Anyway im having troubles connecting to it at the moment, and i realised that the NetConnection object that im connecting with doesnt seem to timeout, it just hangs when trying to connect to the server.
So is there a way to set a timeout value? i thought that i could maybe run a timer in the background and after X ticks i can try and close the object, although im not sure if this will have a bad effect if i just close it during a connection attempt...
Anyway you guys are the pros, i cant seem to find much online about this subject so let me know if any of you have had any experience with this... or Red5 server... im could do with some help with that as its PAINFUL trying to develop for it at the moment... but i guess that is for another thread/forum...
URLLoader Timeout
Is there anyway to set the timeout of a request with URLLoader?
I want to test a connection to a server but if it takes longer than 10seconds I want it to timeout the request. Is this possible?
Geturl Timeout
hello there;
a simple question (or 2) about geturl:
* for how long does geturl try to retrieve a file (get request) before producing a timeout?
* is there a way to force timeout of e.g. 10 seconds?
(context; we have a flash app that downloads 3 xml's every 30 seconds. we have the impression that on rare occasions the download stalls and that that halts the downloading/ displaying process)
thanks!
frank
Timeout Problem
I have a problem with a timeout function I'm building. I have an input textfield "entryBox1" which I want the user to type the text "document1" into. I want to check what they have typed when two seconds have elapsed since their last keystroke.
The problem at the moment is that it works fine if the press a key before two seconds but if they wiat two seconds before pressing their first key then it immediately goes to the failure label.
Thanks for any help.
I have the following code on the maintimeline.
PHP Code:
stop();
timerRunning = 0;
myListener = new Object();
myListener.onKeyDown = function() {
timerRunning = 1;
};
myListener.onKeyUp = function() {
resetTimer();
};
Key.addListener(myListener);
// Resets the Timer
function resetTimer() {
timeEnd = getTimer();
}
I have a blank movie clip with the following code on it.
onClipEvent (enterFrame) {
timeNow = getTimer();
timeNext = _parent.timeEnd+2000;
if ((_parent.timerRunning == 1) && (timeNow>timeNext)) {
if (_parent.entryBox1.text == "document1") {
_parent.gotoAndStop(2);
} else {
_parent.gotoAndStop(3);
}
}
}
Stop(); Timeout
hi...
i wonder...
is there a way when i put stop(); to certain frame so the movei can play again after 15 seconds...
any suggestion appreciated...
thanx in advance..
Timeout Problem
I'm loading an xml file with about 6000 records. the xml loads ok - after a bit of time.
I'm looping through the xml to create a list of items. my loop seems to create around 600 items and then i get the error: the script is causing Flash Player to run slowly . . . .
I have checked the options and have found a utility that will remove the timeout error. This doesn't seem like a good option tho. I have thought about somehow splitting the loop into chunks of say 500 items, but I'm not sure how to do this exactly??? Or perhaps splitting up the xml???
Any advice on this greatly appreciated :-)
Session Timeout
Hi,
How do you create a session timeout in Flash. I would like the application to close down if there has been no activity for two minutes. Thank you in advance.
Best Way To Do Timeout Prompts?
I'm using MX 2004, and I need voiceover timeout prompts. What's the best way to accomplish the timing? I've used onEnterFrame to count down some timers, but, but I've had mixed results - they don't have to be too accurate, just working with some predictabillity. I'm also concerned that using onEnterFrame may slow things down too much.
I tried to use setInterval directly, and have the interval clear itself, but it didn't. I also tried Senocular's setTimeout function that uses setInterval, but it only runs once, same kind of thing I tried in simpler form. I tried different things and now I'm all confuzzled - sometimes they work and sometimes not. I should probably start from scratch (again), but deadlines are looming and I can't think straight anymore - I'm just kind of thrasing around - I also tried a "do nothing" loop, but then I get a "slow script" warning.
I think part of the problem is that I have some voiceovers as prompts and they aren't finished by the time the interval is cleared. I preloaded them into a swf and am loading the movie that way.
Advice is greatly appreciated, TIA!
Timeout Function
Can anyone tell me what the actionscript equivalents of the javascript setTimeout and clearTimeout methods are please?
Thanks G :)
How To Clear A Timeout
Hi.
I need to clear a timeout in another movieclip.
I use the clearTimeout directive in _root. and doesn't work. I need it to work from _root.
Example:
button_btn.onRelease = function() {
_root.clearTimeout(_root.content_mc.my_timeout);
}
And it doesn't work.
Has anyone any ideas how it should be written?
Thanks.
NetConnection Timeout?
i'm aware that NetConnection.connect() goes through 'a predetermined sequence of ports and protocols' until it finds one that is successful. i would like to know if it's possible to speed up the process by adjusting a timeout on the alternatives within the sequence.
i'm just curious to know if this is possible without setting up the sequence of checks manually(and therefore having control over the timeout) or in parallel, such as is described here: http://www.adobe.com/devnet/flashcom/articles/firewall_streaming.html
Edited: 12/04/2007 at 02:51:30 PM by Craig Grummitt
Timeout Prob
hello
I'm trying to create a list of items from an xml file. the file loads fine but my for loop times-out after about 600 items..
how can I stop this or how to do it differently?????????
ActionScript Code:
linksXML.onLoad = function() { trace(linksXML); var theURL; var theDisplayName; var baseSearchPath = "response/parameter/value/atoz"; var total = linksXML.getNodeSiblingCount(baseSearchPath, "link"); trace(total); var items = new Array();// for (var i = 0; i<total; i++) for (var i = 0; i<500; i++) { theURL = linksXML.getNodeAttribute(baseSearchPath + "/link["+i+"]", "url"); theDisplayName = linksXML.getNodeAttribute(baseSearchPath + "/link["+i+"]", "displayname"); var item = {name:theDisplayName, url:theURL}; items.push(item); } _root.atozList = createList(items); _root.atozLoaded();}
Script Timeout
if i have two swfs, for example loader.swf and movie.swf...script timeout of loader.swf is 15 sec, and movie.swf is 60 sec, if i load movie.swf into loader.swf, what script timeout will be applied to script of movie.swf, 15 or 60 sec?
How Do I Set The NetStream Timeout
I have created my own videoPlayer class using flashes NetStream class and Video class.
I am not connecting to a flash media server, however I need to adjust / increase the timeout() setting so that it waits longer before timing out when connecting to a stream.
Does anyone know how to do this;
Thanks
Timeout Code In Actionscript?
I was wondering if there was some timeOut function I could use to insert a certain amount of time between iterations in a loop? I've seen the getTimer() function but it isn't really useful since I want a delay and not the script checking a timer all the time... Any suggestions? Thanks!
Timeout Function In Flash 5
need help,
i want to make a timeout function in flash 5,
this means if i dont move the mouse for x sec.
my flash movie jumps to frame x,
can anyone help me??
thanks in advance
OnClipEvent (data) ... TimeOut ?
hello people,
this board seems always to be the answers to my worries. here's my latest. I use the "onClipEvent (data)" and it works fine when using variables from a PHP.
onClipEvent (data){play();}
Now, if the server's down and my PHP doesn't give me the requested varaibles... what to do? the play(); action stalls and nothing happens. Is there an easy trick to avoid my SWF to stop if there's no data?
Thx,
kim
Adding A Timeout Function?
PLease Help. I have a scene made up of several MC's athat all play on keystrokes. I want to set it up so that if there are no keystrokes for , lets say 30 seconds, the movie automatically jumps back to the first frame. Is this possible with variables, or is there a better way to do it?
Automatic Timeout System
Hi Guys & Gals.
I'm a little new ere, so treat me nice or sumthin! Anyway, I have a problem with a project I am trying to do in Flash MX. What I want to do is create a standalone projector publication for advertising a company. It will be navigatable by the user by a series of buttons. The problem I have is I want to make a system so that after 5 minutes, if no one has pressed any more buttons, i want it to return to the first scene. Does anyone know any flashy actionscript to help?
The reason I want this system is so that the presentation dosen't sit halfway through waiting for another input, and the next user has to navigate their way back to the beginning!!
If anyone can help I'd be really grateful!
Thanks
Mouse No Activity Timeout
hello, i made a kiosk screen using flash mx, i just wanted to know that when there is no activity on the kiosk presentation for 20secs, it should move to the first frame....how do i program this script?
would really appreciate your help.
thanx in advance.
Webservises Class And Timeout
i wont to cach the timeout event and difine that time
i Know that i webservise component there is a timeout filde
but i did nt see any thing like that in the webservises class
thank
shvilam
Timeout Function For Frame
I have a single frame where I want the user to accomplish the task in a given timeframe. How can I use setinterval and have it just apply to that frame only.
mx
Anyone Know How To Do A Simple Timeout Script
Hi
I'm teaching some 1st year uni students basic flash stuff and without overloading their brains with too much code, wondered if anyone could suggest a simple way to achieve a timeout. The brief is to create a free standing kiosk for a local museum. All pretty simple timeline based stuff mostly. But would like to add a function so that when a user walks away, after a predetermined period of time with no activity ( it will be a touch screen kiosk so no mouse clicks) the movie goes back to frame 1 .
I did a search on this site and saw a lot of very codecentric solutions . Trouble is with simply copying and pasting relatively complex code I don't think this will help students with quite basic skills .
Any suggestions anyone?
thanks in advance ..
[8]timeout Coding Problem
I've used a block of code for several years. All it does is load a new movie once timed out.
This code is now no longer executing.
Of course I tried all the latest EOLAS work arounds (my button on the same page will load the movie) - so I don't think EOLAS is the issue.
I'm checking teh forum to see if any new issues has arised that prevent timing code from activating in the latest ie browsers due to EOLAS or any other problems?
Any input would be appreciated.
Thanks
URLLoader Response Timeout
I was asked to give longer waiting time (30sec) for URLLoader response. Is that possible to change in some way (not Socket).
Thanks,
George
2MB XML --> 15-second Timeout Error --> Compression?
Dear Flashkit,
I've been working with increasingly big XML files lately (~2MB at this moment) and want to load them into flash without getting the 15-second time-out error. What my plan was, to compress the XML files , load them into AS3 and decompress with bytearray.decompress(). Now, I can not get further than this website http://www.strille.net/tutorials/Fla...ssor/index.php where they offer a great executable for compressing XML files (however the decompression code is for AS2), and the zlib library (which I am guessing I should use inside a C program probably..) . None of my attempts have worked out so far.
Any suggestions? How can I load in my XML without timing out?
SendAndLoad() Timeout Question
hhheeeyyy yyyooouuu ggguuuyyysssss......
we had a project go live yesterday and just heard that 3 people our of 876 had their game 'freeze & go nowhere'. its a simple guessing game where we use the sendAndLoad method to send and recieve information from the server. my first question is does anyone know if this method has a timeout?
Changing XMLSocket Timeout
Hello,
I'm writing an xml socket communication class, which extends the XMLSocket class.
I made something similar to G Skinner's LoadVars2 (added event dispatcher and enabled timeout shorter than the default timeout which is about 20 seconds).
Now, it works great if I set the delay for any number of seconds less than the default, but, I couldn't find any way to make the timeout longer that, unless If for example the default XMLSocket timeout is 20 seconds and I want 30 seconds timeout, then I can open 1 socket with 20 seconds, and after it gets timeout, I'll open another one with 10 seconds timeout.
Well, I think it's pretty bad option.
The Connection class I wrote which extends XNLSocket is attached to this message.
I'll be glad to hear some ideas to get around this.
Thanks in advance.
Default Script Timeout
Hi,
I was trying to code a script but I keep getting this error:
"Error #1502: A script has executed for longer than the default timeout period of 15 seconds."
So after googling this for a while, I found you could change this in the publish settings (I'm using flash cs3 pro) and it everything was going fine while I was doing my testing in the IDE. The script ran for a long time (>5 minutes) but the player allowed it to do it's thing and didn't complain till the computation was done. However when I put this on my server, I got that error again, I'm stumped.
It's a very simple script which is on frame one of the flash file:
Code:
function getNewItemsRange():void {
var header:URLRequestHeader = new URLRequestHeader("pragma", "no-cache");
var rangeRequest:URLRequest = new URLRequest("http://myUrl.com/getData.php");
rangeRequest.requestHeaders.push(header);
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, rangeCompleteHandler);
loader.dataFormat = URLLoaderDataFormat.VARIABLES;
loader.load(rangeRequest);
}
function rangeCompleteHandler(event:Event):void {
var rangeId:int = int(event.target.data.rangeId);
var rangeStart:Number = Number(event.target.data.rangeStart);
var rangeEnd:Number = Number(event.target.data.rangeEnd);
if (rangeId != -1) {
rangeStartTxt.text = rangeStart.toString();
rangeEndTxt.text = rangeEnd.toString();
trace(rangeId)
//trace(rangeEnd);
var numItems:Number = processItems(rangeStart,rangeEnd); //TAKES A VERY LONG TIME (>5 minutes)
totalTxt.text = numPrimes.toString();
var variables:URLVariables = new URLVariables();
variables.rangeId = rangeId;
variables.total = numPrimes;
var totalRequest:URLRequest = new URLRequest();
totalRequest.url = "http://myUrl.com/sendProcessedItems.php";
totalRequest.data = variables;
var loader:URLLoader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT;
loader.addEventListener(Event.COMPLETE, rangeCountCompleteHandler);
loader.load(totalRequest);
}
}
function rangeCountCompleteHandler(event:Event):void {
getNewItemsRange();
}
//start it up
getNewItemsRange();
I also considered the solution on this website:
http://blog.justgreat.nl/2007/08/24/...imeout-period/
but in my case, I don't just want to catch the error and stop, I want to catch the error and keep the loop going.
if anyone has seen this before, I would appreciate the help
thanks
Multipage Timeout Problem
Anyone know a workaround to avoid a Runtime Error #1502 when printing multipage documents. It seems the error keeps occuring when the whole process start() - addPage() - send() takes more than 15 seconds.
For instance, in my app I download 50 images to a container, once the images are loaded I start the print process by sending the pages to the spooler with a loop.
Essentially the images aren't being sent fast enought to avoid the Timeout error.
ActionScript Code:
private function sendJob(e : Event) : void
{
pj = new PrintJob();
if (pj.start())
{
for(;sPrintImages.numChildren > 0;)
{
// all images are contained in sPrintImages
var temp : Sprite = sPrintImages.getChildAt(0) as Sprite;
pj.addPage(temp);
sPrintImages.removeChild(temp);
temp = null;
}
pj.send();
}
}
Using A Timeout To Change Boolean Value?
Hello everyone, I am creating a flipping magazine as part of an intro movie for a client. I have purchased a page flip component which is setup to automatically flip through it's pages.
The component needs to start flipping at a certain time during the intro movie. I think all I need to do is create a timout to set enabledProp to true, but I am not coding it correctly.
Here is the actionscript. It is commented so it is easier to understand what's going on. I am a beginner with actionscript so this is probably a simple fix. I appreciate any help.
ActionScript Code:
myBook.flipOnClickProp = false
myBook.autoFlipProp = 0;
// two lines above stop mouse input
myBook.enabledProp = false;
// disables book so that it stays on cover. I need to enable this after a certain amount of time to start the flipping.
// Below I tried 3 seconds.
begin = 3000;
beginplayTimeout = setTimeout(myBook, enabledProp = true, begin);
// 2 lines above are what I wrote to change enabledProp to true after 3 seconds. This is the part that is not functioning.
//All code under this comment was included with the component to make it flip automatically.
delay = 900;
// 2 second: 2000 ms
forwardInterval = setInterval(myBook, "flipForward", delay);
myBook.onLastPage = function() {
clearInterval(forwardInterval);
lastPageInterval = setInterval(closeLastPage, delay);
};
function closeLastPage() {
myBook.flipGotoPage(0);
clearInterval(lastPageInterval);
forwardInterval = setInterval(myBook, "flipForward", delay);
}
Timeout Of Script Execution
Good time to All, Amigos!!!
how i can make timeout more longer in flash player: php's debuging take more time than 15 seconds???
----------------------------------------------------------
Thanks in Advance.
Mouse Inactivity Timeout
I tweaked some code and made a timeout function for my movie. It works okay when the user does not move their mouse for 2 seconds. But I want it to not timeout if the user presses any key, and this will not work. "onKeyDown" is not working, it's being ignored. My code is as follows:
Code:
// Time value, in milliseconds, after which, failing any mouse movement, an action is to occur.
numMouseTimeoutMS = 2000;
// Define what is to happen should the mouse be moved.
_root.onMouseMove = onKeyDown = function() {
// Clear preceding setInterval ID.
clearInterval(itvMouseID);
// Set new interval.
itvMouseID = setInterval(fncMouseCheck, numMouseTimeoutMS);
};
// Function run by setInterval.
fncMouseCheck = function () {
// Clear interval.
clearInterval(itvMouseID);
// Whatever action is supposed to happen on timeout
gotoAndStop("pause");
};
stop();
Any ideas how I can make it not timeout if the user presses any key?
|