<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0">
  <channel>
    <title>Comments on snippet: 'ActionScript 3 Delay Function'</title>
    <description>Snipplr comments feed</description>
    <link>https://snipplr.com/</link>
    <lastBuildDate>Wed, 22 Apr 2026 07:04:17 +0000</lastBuildDate>
    <item>
      <title>scottwatkins said on 06/Apr/2011</title>
      <link>https://snipplr.com/view/51631/actionscript-3-delay-function</link>
      <description>&lt;p&gt;Be sure to include the timer classes&#13;
&#13;
import flash.events.TimerEvent;&#13;
import flash.utils.Timer;&lt;/p&gt;</description>
      <pubDate>Wed, 06 Apr 2011 07:20:59 UTC</pubDate>
      <guid>https://snipplr.com/view/51631/actionscript-3-delay-function</guid>
    </item>
    <item>
      <title>scottwatkins said on 06/Apr/2011</title>
      <link>https://snipplr.com/view/51631/actionscript-3-delay-function</link>
      <description>&lt;p&gt;This is a function that I've needed but wasn't available in AS3. Basically, we create a timer, add a listener to it, and start the timer. In the listener, we run the supplied function with the supplied parameters, then remove the listener.&lt;/p&gt;</description>
      <pubDate>Wed, 06 Apr 2011 07:25:38 UTC</pubDate>
      <guid>https://snipplr.com/view/51631/actionscript-3-delay-function</guid>
    </item>
    <item>
      <title>scottwatkins said on 06/Apr/2011</title>
      <link>https://snipplr.com/view/51631/actionscript-3-delay-function</link>
      <description>&lt;p&gt;UPDATE: I've had to remove the `timer = null` declaration because that was clearing the `timer` variable before additional iterations were completed. It worked fine when `repeat` was set to 1, but when `repeat` was greater than 1, timer was nulled out before the second iteration could be started.&lt;/p&gt;</description>
      <pubDate>Wed, 06 Apr 2011 07:29:38 UTC</pubDate>
      <guid>https://snipplr.com/view/51631/actionscript-3-delay-function</guid>
    </item>
    <item>
      <title>scottwatkins said on 07/Apr/2011</title>
      <link>https://snipplr.com/view/51631/actionscript-3-delay-function</link>
      <description>&lt;p&gt;UPDATE: I've fixed the `timer = null` issue. The function now works as expected.&lt;/p&gt;</description>
      <pubDate>Thu, 07 Apr 2011 00:01:41 UTC</pubDate>
      <guid>https://snipplr.com/view/51631/actionscript-3-delay-function</guid>
    </item>
  </channel>
</rss>
