<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Flash Player use of Internal clock</title>
	<atom:link href="http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/</link>
	<description>There is no universally agreed-upon biological definition of dreaming</description>
	<lastBuildDate>Wed, 28 Jul 2010 11:46:28 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Nenserma</title>
		<link>http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/comment-page-1/#comment-930</link>
		<dc:creator>Nenserma</dc:creator>
		<pubDate>Thu, 14 May 2009 23:05:00 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/#comment-930</guid>
		<description>ÐžÑ‡ÐµÐ½ÑŒ Ð¸Ð½Ñ‚ÐµÑ€ÐµÑÐ½Ð¾!!! Ð¢Ð¾Ð»ÑŒÐºÐ¾ Ð½Ðµ Ð¾Ñ‡ÐµÐ½ÑŒ Ð¼Ð¾Ð³Ñƒ Ð¿Ð¾Ð½ÑÑ‚ÑŒ ÐºÐ°Ðº Ñ‡Ð°ÑÑ‚Ð¾ Ð¾Ð±Ð½Ð¾Ð²Ð»ÑÐµÑ‚ÑÑ Ð²Ð°Ñˆ Ð±Ð»Ð¾Ð³?</description>
		<content:encoded><![CDATA[<p>ÐžÑ‡ÐµÐ½ÑŒ Ð¸Ð½Ñ‚ÐµÑ€ÐµÑÐ½Ð¾!!! Ð¢Ð¾Ð»ÑŒÐºÐ¾ Ð½Ðµ Ð¾Ñ‡ÐµÐ½ÑŒ Ð¼Ð¾Ð³Ñƒ Ð¿Ð¾Ð½ÑÑ‚ÑŒ ÐºÐ°Ðº Ñ‡Ð°ÑÑ‚Ð¾ Ð¾Ð±Ð½Ð¾Ð²Ð»ÑÐµÑ‚ÑÑ Ð²Ð°Ñˆ Ð±Ð»Ð¾Ð³?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Flash Clocks</title>
		<link>http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/comment-page-1/#comment-909</link>
		<dc:creator>Flash Clocks</dc:creator>
		<pubDate>Mon, 04 May 2009 22:16:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/#comment-909</guid>
		<description>thanks for the artcile, very good, and thanks all for the replies too, i am having problems with time display in some of my flash projects.</description>
		<content:encoded><![CDATA[<p>thanks for the artcile, very good, and thanks all for the replies too, i am having problems with time display in some of my flash projects.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Cegegroops</title>
		<link>http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/comment-page-1/#comment-905</link>
		<dc:creator>Cegegroops</dc:creator>
		<pubDate>Fri, 01 May 2009 20:46:33 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/#comment-905</guid>
		<description>Ð˜Ð½Ñ‚ÐµÑ€ÐµÑÐ½Ð¾, Ð° Ð¿Ð¾Ñ‡ÐµÐ¼Ñƒ Ñ‚Ð°Ðº Ñ€ÐµÐ´ÐºÐ¾ Ð±Ð»Ð¾Ð³ Ð¾Ð±Ð½Ð¾Ð²Ð»ÑÐµÑ‚Ðµ?</description>
		<content:encoded><![CDATA[<p>Ð˜Ð½Ñ‚ÐµÑ€ÐµÑÐ½Ð¾, Ð° Ð¿Ð¾Ñ‡ÐµÐ¼Ñƒ Ñ‚Ð°Ðº Ñ€ÐµÐ´ÐºÐ¾ Ð±Ð»Ð¾Ð³ Ð¾Ð±Ð½Ð¾Ð²Ð»ÑÐµÑ‚Ðµ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tiedevaw</title>
		<link>http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/comment-page-1/#comment-897</link>
		<dc:creator>Tiedevaw</dc:creator>
		<pubDate>Sat, 25 Apr 2009 20:43:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/#comment-897</guid>
		<description>ÐšÐ»Ð°ÑÑÐ½Ð°Ñ ÑÑ‚Ð°Ñ‚ÑŒÑ, ÐºÑÑ‚Ð°Ñ‚Ð¸ Ð°Ð²Ñ‚Ð¾Ñ€Ñƒ Ñ…Ð¾Ñ‡Ñƒ Ð¿Ñ€ÐµÐ´Ð»Ð¾Ð¶Ð¸Ñ‚ÑŒ ÑƒÑÑ‚Ð°Ð½Ð¾Ð²Ð¸Ñ‚ÑŒ Ð¾Ñ‚ ÑÐ½Ð´ÐµÐºÑ.Ð´ÐµÐ½ÐµÐ³ Ñ„Ð¸ÑˆÐºÑƒ Ð½Ð° ÑÐ°Ð¹Ñ‚ â€œÐ”Ð°Ð¹ Ñ€ÑƒÐ±Ð»ÑŒâ€. Ð¯ Ð±Ñ‹ Ð´Ð°Ð», Ñ‚Ð°Ðº ÑÐºÐ°Ð·Ð°Ñ‚ÑŒ Ð½Ð° Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶Ð°Ð½Ð¸Ðµ.</description>
		<content:encoded><![CDATA[<p>ÐšÐ»Ð°ÑÑÐ½Ð°Ñ ÑÑ‚Ð°Ñ‚ÑŒÑ, ÐºÑÑ‚Ð°Ñ‚Ð¸ Ð°Ð²Ñ‚Ð¾Ñ€Ñƒ Ñ…Ð¾Ñ‡Ñƒ Ð¿Ñ€ÐµÐ´Ð»Ð¾Ð¶Ð¸Ñ‚ÑŒ ÑƒÑÑ‚Ð°Ð½Ð¾Ð²Ð¸Ñ‚ÑŒ Ð¾Ñ‚ ÑÐ½Ð´ÐµÐºÑ.Ð´ÐµÐ½ÐµÐ³ Ñ„Ð¸ÑˆÐºÑƒ Ð½Ð° ÑÐ°Ð¹Ñ‚ â€œÐ”Ð°Ð¹ Ñ€ÑƒÐ±Ð»ÑŒâ€. Ð¯ Ð±Ñ‹ Ð´Ð°Ð», Ñ‚Ð°Ðº ÑÐºÐ°Ð·Ð°Ñ‚ÑŒ Ð½Ð° Ð¿Ð¾Ð´Ð´ÐµÑ€Ð¶Ð°Ð½Ð¸Ðµ.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tomek</title>
		<link>http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/comment-page-1/#comment-416</link>
		<dc:creator>Tomek</dc:creator>
		<pubDate>Wed, 09 Jul 2008 22:18:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/#comment-416</guid>
		<description>Thank you from Poland</description>
		<content:encoded><![CDATA[<p>Thank you from Poland</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ram</title>
		<link>http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/comment-page-1/#comment-411</link>
		<dc:creator>Ram</dc:creator>
		<pubDate>Fri, 04 Jul 2008 10:31:27 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/#comment-411</guid>
		<description>Hello everyone!
I&#039;m doing a similar project, in which I have music tracks playing and I need precise timing.
Did anyone find a solution to this?
The file that Nick posted gives 404.
If anyone has an idea, please mail me at cool-rr@cool-rr.com

Thanks,
Ram</description>
		<content:encoded><![CDATA[<p>Hello everyone!<br />
I&#8217;m doing a similar project, in which I have music tracks playing and I need precise timing.<br />
Did anyone find a solution to this?<br />
The file that Nick posted gives 404.<br />
If anyone has an idea, please mail me at <a href="mailto:cool-rr@cool-rr.com">cool-rr@cool-rr.com</a></p>
<p>Thanks,<br />
Ram</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/comment-page-1/#comment-314</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Sun, 11 May 2008 16:29:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/#comment-314</guid>
		<description>Ok, I think that now I&#039;ve got a good result. The customTimer auto adjust itself for better performance, if it loose some ms it doesn&#039;t fail, but auto adjust the next interval. We can set a maxLoop value to improve performances... 

Than I have associated one task to the interval and it doesn&#039;t create problems, the timing is always perfect.

I added a normal setInterval monitor for comparing...

Now I don&#039;t know if this is a good solution, but I feel good now :-)

http://www.studiozu.com/custom_timer/customTimer.swf</description>
		<content:encoded><![CDATA[<p>Ok, I think that now I&#8217;ve got a good result. The customTimer auto adjust itself for better performance, if it loose some ms it doesn&#8217;t fail, but auto adjust the next interval. We can set a maxLoop value to improve performances&#8230; </p>
<p>Than I have associated one task to the interval and it doesn&#8217;t create problems, the timing is always perfect.</p>
<p>I added a normal setInterval monitor for comparing&#8230;</p>
<p>Now I don&#8217;t know if this is a good solution, but I feel good now <img src='http://www.dreaminginflash.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
<p><a href="http://www.studiozu.com/custom_timer/customTimer.swf" rel="nofollow">http://www.studiozu.com/custom_timer/customTimer.swf</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/comment-page-1/#comment-313</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Sun, 11 May 2008 03:34:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/#comment-313</guid>
		<description>One working update with simoultaneous animations and text...

http://www.studiozu.com/custom_timer/customTimer.swf

Bye! :-)</description>
		<content:encoded><![CDATA[<p>One working update with simoultaneous animations and text&#8230;</p>
<p><a href="http://www.studiozu.com/custom_timer/customTimer.swf" rel="nofollow">http://www.studiozu.com/custom_timer/customTimer.swf</a></p>
<p>Bye! <img src='http://www.dreaminginflash.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nick</title>
		<link>http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/comment-page-1/#comment-309</link>
		<dc:creator>Nick</dc:creator>
		<pubDate>Sat, 10 May 2008 00:19:19 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/#comment-309</guid>
		<description>Hi Ivan, yes I tried with some tasks running under and the flash intervall precision go down:

I disposed 4 mc on the stage running crazy on the enterframe. With these simultaneous tasks I needed to set the precision value not at 0.99, but at 0.97 to let the timer go on... with more clips the correct value can be 0.94 or 0.8 or 0.3.

Flash player&#039;s performances decrease with a lot of tasks, so, with the performances, decreases also the flash interval precision, so we need to consider this when we set the precision value. The bad thing is that decreasing the precision value we need greater loops to reach the correct interval... So more tasks more cpu usage...

The other problem, referred to the function I posted, is that I do calculations of the timer position using the time value saved into the variable timerPosition. And this variable must have as value a multiple of our interval. If you do something after the while loop, where we increase the timer position, we also need to take care of the time needed by this stuff to execute, otherwise our timerPosition value gets bad value that never more will verify the if statement causing the interruption of our custom interval...

everything is bad... 

I think that this time an hack isn&#039;t enough to find an acceptable solution to this flash limit... only you, actionscript gurus, maybe can find the right trick and I will be here reading... 

thanks for blogging masters</description>
		<content:encoded><![CDATA[<p>Hi Ivan, yes I tried with some tasks running under and the flash intervall precision go down:</p>
<p>I disposed 4 mc on the stage running crazy on the enterframe. With these simultaneous tasks I needed to set the precision value not at 0.99, but at 0.97 to let the timer go on&#8230; with more clips the correct value can be 0.94 or 0.8 or 0.3.</p>
<p>Flash player&#8217;s performances decrease with a lot of tasks, so, with the performances, decreases also the flash interval precision, so we need to consider this when we set the precision value. The bad thing is that decreasing the precision value we need greater loops to reach the correct interval&#8230; So more tasks more cpu usage&#8230;</p>
<p>The other problem, referred to the function I posted, is that I do calculations of the timer position using the time value saved into the variable timerPosition. And this variable must have as value a multiple of our interval. If you do something after the while loop, where we increase the timer position, we also need to take care of the time needed by this stuff to execute, otherwise our timerPosition value gets bad value that never more will verify the if statement causing the interruption of our custom interval&#8230;</p>
<p>everything is bad&#8230; </p>
<p>I think that this time an hack isn&#8217;t enough to find an acceptable solution to this flash limit&#8230; only you, actionscript gurus, maybe can find the right trick and I will be here reading&#8230; </p>
<p>thanks for blogging masters</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ivan Valadares</title>
		<link>http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/comment-page-1/#comment-308</link>
		<dc:creator>Ivan Valadares</dc:creator>
		<pubDate>Fri, 09 May 2008 22:53:06 +0000</pubDate>
		<guid isPermaLink="false">http://www.dreaminginflash.com/2008/05/07/flash-player-use-of-internal-clock/#comment-308</guid>
		<description>Nick did you try that code running some animations and other code at the same time? It says:â€Iâ€™m sorry, too hard to get absolute precisionâ€ and then it stops running the timer. This happens because you kill the interval and if there are other things running at the same time, it never enters in this if:  if ((getTimer() - timerPosition) == interval).
As3 code, if anyone wants to give it a try:

var timer:Timer;
var timerPosition:Number;
var interval:Number;
var precision:Number;

function CustomTimer(delay:Number) {
	timerPosition   = 0;
	interval        = delay;
	precision       = 0.965;
		
	timer = new Timer(delay);
	timer.addEventListener(TimerEvent.TIMER,update);
	timer.start();
}

function update(e:TimerEvent):void {
	var t:Number = 0;
	timer.stop();
	
	while (getTimer()-timerPosition &lt; interval) {
		t++;
	}
	
	(t == 0) ? trace(&quot;Iâ€™m sorry, too hard to get absolute precision&quot;) : trace(&quot;Total iterations to get precision: &quot; + t + &quot; (Higer values need greater precision for lower cpu&quot;);
	if ((getTimer()-timerPosition) == interval) {
		timerPosition += interval;
		trace(&quot;Timer in this moment: &quot;+getTimer()+&quot; ms&quot;);
		timer = new Timer(interval*precision);
		timer.addEventListener(TimerEvent.TIMER,update);
		timer.start();
	}
}

CustomTimer(3000);</description>
		<content:encoded><![CDATA[<p>Nick did you try that code running some animations and other code at the same time? It says:â€Iâ€™m sorry, too hard to get absolute precisionâ€ and then it stops running the timer. This happens because you kill the interval and if there are other things running at the same time, it never enters in this if:  if ((getTimer() &#8211; timerPosition) == interval).<br />
As3 code, if anyone wants to give it a try:</p>
<p>var timer:Timer;<br />
var timerPosition:Number;<br />
var interval:Number;<br />
var precision:Number;</p>
<p>function CustomTimer(delay:Number) {<br />
	timerPosition   = 0;<br />
	interval        = delay;<br />
	precision       = 0.965;</p>
<p>	timer = new Timer(delay);<br />
	timer.addEventListener(TimerEvent.TIMER,update);<br />
	timer.start();<br />
}</p>
<p>function update(e:TimerEvent):void {<br />
	var t:Number = 0;<br />
	timer.stop();</p>
<p>	while (getTimer()-timerPosition &lt; interval) {<br />
		t++;<br />
	}</p>
<p>	(t == 0) ? trace(&#8220;Iâ€™m sorry, too hard to get absolute precision&#8221;) : trace(&#8220;Total iterations to get precision: &#8221; + t + &#8221; (Higer values need greater precision for lower cpu&#8221;);<br />
	if ((getTimer()-timerPosition) == interval) {<br />
		timerPosition += interval;<br />
		trace(&#8220;Timer in this moment: &#8220;+getTimer()+&#8221; ms&#8221;);<br />
		timer = new Timer(interval*precision);<br />
		timer.addEventListener(TimerEvent.TIMER,update);<br />
		timer.start();<br />
	}<br />
}</p>
<p>CustomTimer(3000);</p>
]]></content:encoded>
	</item>
</channel>
</rss>
