<?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: Creating timers using the Timer class</title>
	<atom:link href="http://blog.flexexamples.com/2008/02/20/creating-timers-using-the-timer-class/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.flexexamples.com/2008/02/20/creating-timers-using-the-timer-class/</link>
	<description>Just a bunch of Adobe Flex Examples</description>
	<lastBuildDate>Fri, 19 Mar 2010 20:35:16 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: thuyhh</title>
		<link>http://blog.flexexamples.com/2008/02/20/creating-timers-using-the-timer-class/comment-page-1/#comment-2594</link>
		<dc:creator>thuyhh</dc:creator>
		<pubDate>Wed, 06 May 2009 03:19:15 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/02/20/creating-timers-using-the-timer-class/#comment-2594</guid>
		<description>hi,
i using below :
            private function createTimer(): void
            {
	            var intTimeTick:Number = 0;
	            intTimeTick = CConst.intPriceWorldTime;

	            tmrRefresh1 = new Timer(intTimeTick);
	            tmrRefresh1.addEventListener(TimerEvent.TIMER, tmrRefresh_OnTimer);

	            tmrRefresh1.start();
            }
            private function tmrRefresh_OnTimer(event:TimerEvent): void
            {
		    intTimmer = 0;
		    BindData(CCommonData.curInvestorTemp);

            }
            public static function BindData(curInv:Number):void
	    {
	   var objTotalInfoAccountController:CTotalInfoAccountController=new CTotalInfoAccountController();
				   objTotalInfoAccountController.ListTotalInfoAccount(curInv,CCommonController.ConvertDate(CCommonData.curDay.toDateString()),1,1,new mx.rpc.Responder(Result,CCommonController.faultHandler));
	   }

This funtion will allway request after CConst.intPriceWorldTime = 3000. But program is very slow. What is solution for this problem ?.</description>
		<content:encoded><![CDATA[<p>hi,<br />
i using below :<br />
            private function createTimer(): void<br />
            {<br />
	            var intTimeTick:Number = 0;<br />
	            intTimeTick = CConst.intPriceWorldTime;</p>
<p>	            tmrRefresh1 = new Timer(intTimeTick);<br />
	            tmrRefresh1.addEventListener(TimerEvent.TIMER, tmrRefresh_OnTimer);</p>
<p>	            tmrRefresh1.start();<br />
            }<br />
            private function tmrRefresh_OnTimer(event:TimerEvent): void<br />
            {<br />
		    intTimmer = 0;<br />
		    BindData(CCommonData.curInvestorTemp);</p>
<p>            }<br />
            public static function BindData(curInv:Number):void<br />
	    {<br />
	   var objTotalInfoAccountController:CTotalInfoAccountController=new CTotalInfoAccountController();<br />
				   objTotalInfoAccountController.ListTotalInfoAccount(curInv,CCommonController.ConvertDate(CCommonData.curDay.toDateString()),1,1,new mx.rpc.Responder(Result,CCommonController.faultHandler));<br />
	   }</p>
<p>This funtion will allway request after CConst.intPriceWorldTime = 3000. But program is very slow. What is solution for this problem ?.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Douglas querubin</title>
		<link>http://blog.flexexamples.com/2008/02/20/creating-timers-using-the-timer-class/comment-page-1/#comment-2593</link>
		<dc:creator>Douglas querubin</dc:creator>
		<pubDate>Tue, 02 Dec 2008 21:14:28 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/02/20/creating-timers-using-the-timer-class/#comment-2593</guid>
		<description>hello, I have a timer, most do not understand much of AS3, I would like to create with an external file .as to please if someone wants to help me would be very grateful.

meumaiil@hotmail.com</description>
		<content:encoded><![CDATA[<p>hello, I have a timer, most do not understand much of AS3, I would like to create with an external file .as to please if someone wants to help me would be very grateful.</p>
<p><a href="mailto:meumaiil@hotmail.com">meumaiil@hotmail.com</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: saul</title>
		<link>http://blog.flexexamples.com/2008/02/20/creating-timers-using-the-timer-class/comment-page-1/#comment-2595</link>
		<dc:creator>saul</dc:creator>
		<pubDate>Mon, 01 Dec 2008 19:25:00 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/02/20/creating-timers-using-the-timer-class/#comment-2595</guid>
		<description>@Peter,

I managed to fix my previous problems with an IFrame - you know me well!

Because i use transitions between states i needed a timer to wait and fire a complete event once the transition had completed, which is based on time also. Peter this example was very easy to modify and works perfectly.

You are the man Peter, thanks for saving us newbies and getting us there quicker.

Faith restored.</description>
		<content:encoded><![CDATA[<p>@Peter,</p>
<p>I managed to fix my previous problems with an IFrame &#8211; you know me well!</p>
<p>Because i use transitions between states i needed a timer to wait and fire a complete event once the transition had completed, which is based on time also. Peter this example was very easy to modify and works perfectly.</p>
<p>You are the man Peter, thanks for saving us newbies and getting us there quicker.</p>
<p>Faith restored.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Galahady</title>
		<link>http://blog.flexexamples.com/2008/02/20/creating-timers-using-the-timer-class/comment-page-1/#comment-2592</link>
		<dc:creator>Galahady</dc:creator>
		<pubDate>Mon, 16 Jun 2008 16:34:59 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/02/20/creating-timers-using-the-timer-class/#comment-2592</guid>
		<description>Dear Peterd,

Thx for your prompt response!

This time i&#039;m not prudent engough. You are right. It&#039;s not the timer&#039;s fault, although i can reproduce the same issue again and again.

After several experiments, i guess the totalMemory might be the total amount of memory used by all Flash Player instances in the current browser process.

Thx again~!

Yours sincerely, Galahady.</description>
		<content:encoded><![CDATA[<p>Dear Peterd,</p>
<p>Thx for your prompt response!</p>
<p>This time i&#8217;m not prudent engough. You are right. It&#8217;s not the timer&#8217;s fault, although i can reproduce the same issue again and again.</p>
<p>After several experiments, i guess the totalMemory might be the total amount of memory used by all Flash Player instances in the current browser process.</p>
<p>Thx again~!</p>
<p>Yours sincerely, Galahady.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: peterd</title>
		<link>http://blog.flexexamples.com/2008/02/20/creating-timers-using-the-timer-class/comment-page-1/#comment-2591</link>
		<dc:creator>peterd</dc:creator>
		<pubDate>Sun, 15 Jun 2008 04:30:25 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/02/20/creating-timers-using-the-timer-class/#comment-2591</guid>
		<description>Galahady,

Unfortunately I cannot reproduce the issue.
Using the following code my total memory jumped from 5152768 to 5169152, where it stayed fairly steady:
&lt;pre class=&quot;code&quot;&gt;
&lt;?xml version=&quot;1.0&quot; encoding=&quot;utf-8&quot;?&gt;
&lt;mx:Application xmlns:mx=&quot;http://www.adobe.com/2006/mxml&quot; creationComplete=&quot;init();&quot;&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private var timer:Timer;

            private function init():void {
                timer = new Timer(1000);
                timer.addEventListener(TimerEvent.TIMER, timer_timer);
                timer.start();
            }

            private function timer_timer(evt:TimerEvent):void {
                lblTotalMemory.text = new Date().toTimeString() + &quot;: &quot; + String(System.totalMemory);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Label id=&quot;lblTotalMemory&quot; /&gt;

&lt;/mx:Application&gt;
&lt;/pre&gt;

I&#039;m not 100% certain if the &lt;code&gt;totalMemory&lt;/code&gt; property returns the amount of memory (in bytes) used by the *current* Flash Player instance for the specific Flex application, or if it returns the amount of memory used by *all current* Flash Player instances. Meaning, your numbers may not be what you expect if you have other Flash Player instances running in the background which may be doing animations or calculations or serving advertisements or whatever.

Peter</description>
		<content:encoded><![CDATA[<p>Galahady,</p>
<p>Unfortunately I cannot reproduce the issue.<br />
Using the following code my total memory jumped from 5152768 to 5169152, where it stayed fairly steady:</p>
<pre class="code">
&lt;?xml version="1.0" encoding="utf-8"?&gt;
&lt;mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" creationComplete="init();"&gt;

    &lt;mx:Script&gt;
        &lt;![CDATA[
            private var timer:Timer;

            private function init():void {
                timer = new Timer(1000);
                timer.addEventListener(TimerEvent.TIMER, timer_timer);
                timer.start();
            }

            private function timer_timer(evt:TimerEvent):void {
                lblTotalMemory.text = new Date().toTimeString() + ": " + String(System.totalMemory);
            }
        ]]&gt;
    &lt;/mx:Script&gt;

    &lt;mx:Label id="lblTotalMemory" /&gt;

&lt;/mx:Application&gt;
</pre>
<p>I&#8217;m not 100% certain if the <code>totalMemory</code> property returns the amount of memory (in bytes) used by the *current* Flash Player instance for the specific Flex application, or if it returns the amount of memory used by *all current* Flash Player instances. Meaning, your numbers may not be what you expect if you have other Flash Player instances running in the background which may be doing animations or calculations or serving advertisements or whatever.</p>
<p>Peter</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Galahady</title>
		<link>http://blog.flexexamples.com/2008/02/20/creating-timers-using-the-timer-class/comment-page-1/#comment-2590</link>
		<dc:creator>Galahady</dc:creator>
		<pubDate>Sat, 14 Jun 2008 21:17:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/02/20/creating-timers-using-the-timer-class/#comment-2590</guid>
		<description>Dear Peterd,

   First, let me thank you with all my heart for your great blog! it really helps me a lot, and makes my programming in flex become a joyful experience. :)

   I have a question about the memory usage of the Timer control. When i create
a time with the following code snippet, i can see the total memory used by the
flay payer going up and up, steadily, at the speed of 30K~10K per second.

   what&#039;s wrong? did i make something wrong or it is a bug of flex?

   thx in advance.

   regards
   Galahady

   p.s:

&lt;pre class=&quot;code&quot;&gt;
private var timer:Timer;

private function init():void {
    timer = new Timer(1000);
    timer.addEventListener(TimerEvent.TIMER, timer_timer);
    timer.start();
}

private function timer_timer(evt:TimerEvent):void {
    lblTotalMemory.text = String(System.totalMemory);
}
&lt;/pre&gt;</description>
		<content:encoded><![CDATA[<p>Dear Peterd,</p>
<p>   First, let me thank you with all my heart for your great blog! it really helps me a lot, and makes my programming in flex become a joyful experience. :)</p>
<p>   I have a question about the memory usage of the Timer control. When i create<br />
a time with the following code snippet, i can see the total memory used by the<br />
flay payer going up and up, steadily, at the speed of 30K~10K per second.</p>
<p>   what&#8217;s wrong? did i make something wrong or it is a bug of flex?</p>
<p>   thx in advance.</p>
<p>   regards<br />
   Galahady</p>
<p>   p.s:</p>
<pre class="code">
private var timer:Timer;

private function init():void {
    timer = new Timer(1000);
    timer.addEventListener(TimerEvent.TIMER, timer_timer);
    timer.start();
}

private function timer_timer(evt:TimerEvent):void {
    lblTotalMemory.text = String(System.totalMemory);
}
</pre>
]]></content:encoded>
	</item>
	<item>
		<title>By: dormouse</title>
		<link>http://blog.flexexamples.com/2008/02/20/creating-timers-using-the-timer-class/comment-page-1/#comment-2589</link>
		<dc:creator>dormouse</dc:creator>
		<pubDate>Thu, 21 Feb 2008 02:00:30 +0000</pubDate>
		<guid isPermaLink="false">http://blog.flexexamples.com/2008/02/20/creating-timers-using-the-timer-class/#comment-2589</guid>
		<description>peter

happy 元宵节(sweet dumplings made of glutinous rice flour, chinese festival).
thanks for your all examples, they are very good. And i can learn a lot in your website
best wishes to you. :)

dormouse</description>
		<content:encoded><![CDATA[<p>peter</p>
<p>happy 元宵节(sweet dumplings made of glutinous rice flour, chinese festival).<br />
thanks for your all examples, they are very good. And i can learn a lot in your website<br />
best wishes to you. :)</p>
<p>dormouse</p>
]]></content:encoded>
	</item>
</channel>
</rss>
