setTimeout works just like setInterval except it only runs once. Unfortunately it's not in the intrinsic classes, so either set it up locally in your intrinsic class definitions (never a good idea), or call it using array notation; _global ["setTimeout"].
More info here: http://www.justgooddesign.com/blog/settimeout-setinterval-or-onenterframe.ht m _____________________________ Jesse Graupmann www.jessegraupmann.com www.justgooddesign.com/blog/ _____________________________ -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Matt Samet Sent: Thursday, March 01, 2007 2:06 PM To: [email protected] Subject: RE: [Flashcoders] Set Interval Question > setTimeout(fadeOut, 7000); Sure you aren't thinking of Javascript? ;) -=matt -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Alain Rousseau Sent: Thursday, March 01, 2007 12:39 PM To: [email protected] Subject: RE: [Flashcoders] Set Interval Question You should rethink your approach, I believe it will be easier to just start a fade in, wait 10 seconds, fade out. When the fade out is complete start over with another picture. untested code below : import mx.transitions.Tween; import mx.transitions.easing.*; var curID = 0; fadeIn(); function fadeIn() { curID++; var curMC:MovieClip = "image" + curID; myTween = new Tween(curMC, "_alpha", Strong.easeIn, 0, 100, 1.5, false); // or something like that myTween.onMotionFinished = Delegate.create(this, pauseImage); } function pauseImage() { setTimeout(fadeOut, 7000); } function fadeOut() { var curMC:MovieClip = "image" + curID; myTween = new Tween(curMC, "_alpha", Strong.easeOut, 100, 0, 1.5, false); myTween.onMotionFinished = Delegate.create(this, fadeIn); if (curID < 6) curID = 0; // we start back at the first image } HTH ! Alain -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Paul V. Sent: 1 mars 2007 14:46 To: Flash Coders; Flashnewbie Mailing List Subject: [Flashcoders] Set Interval Question Hello Again, I have a setInterval issue/question, here it is. I set a main timer. 10 seconds. In that 10 second interval, I load, fade in, pause on, and fade out, that image. That is working mostly fine. Accept I have a seperate setInterval starting for the images fade in and fade out functions (1.25 sec * 2). And have it pausing for the remainder which should be 7.5 seconds. Problem is it doesn't work out, and by the 4th or 5th image it is noticably offset. I am guessing this is because of the time it takes to process the code, didn't seem likely at first, but It is not off by much, and it seems to be increasing marginally which means that not much, becomes significant. Long story short, well...point being that I want to be able to call the main timer, and tap into it at 0-1.25 seconds and then again at 7.5 -10 seconds to run the image fade in and fade out. Can I do this, from variableName = SetInterval (function, 10000); use the running timer for other functions? Thanks again. If you need clarification about just what the heck I am trying to say. I can send in some code. Thanks, Paul Vdst _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com -- No virus found in this incoming message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.5/706 - Release Date: 2007-02-28 16:09 -- No virus found in this outgoing message. Checked by AVG Free Edition. Version: 7.5.446 / Virus Database: 268.18.5/706 - Release Date: 2007-02-28 16:09 _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com _______________________________________________ [email protected] To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com

