<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>localToGlobal &#187; utils</title>
	<atom:link href="http://blog.fjakobs.com/archives/category/utils/feed" rel="self" type="application/rss+xml" />
	<link>http://blog.fjakobs.com</link>
	<description>FLASH BLOG</description>
	<lastBuildDate>Tue, 25 Jan 2011 14:28:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>pause Timer with ExtendedTimer in ActionScript 3.0</title>
		<link>http://blog.fjakobs.com/archives/101</link>
		<comments>http://blog.fjakobs.com/archives/101#comments</comments>
		<pubDate>Thu, 16 Oct 2008 12:40:39 +0000</pubDate>
		<dc:creator>Fabian</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[general]]></category>
		<category><![CDATA[utils]]></category>
		<category><![CDATA[pause]]></category>
		<category><![CDATA[Timer]]></category>

		<guid isPermaLink="false">http://blog.fjakobs.com/?p=101</guid>
		<description><![CDATA[hey guys, last week i needed to pause several timers and resume them later on. i ran into a problem which i try to explain in an little example. so let&#8217;s say you start a Timer with 1000 milliseconds delay and stop it after 600 milliseconds. if you call Timer.start() again, it starts with a [...]]]></description>
			<content:encoded><![CDATA[<p>hey guys, last week i needed to pause several timers and resume them later on. i ran into a problem which i try to explain in an little example.</p>
<p>so let&#8217;s say you start a Timer with 1000 milliseconds delay and stop it after 600 milliseconds. if you call Timer.start() again, it starts with a new delay of 1000 milliseconds again. there is no built-in possibility to resume the timer for the remaining 400 milliseconds. i thought &#8220;nothing easier than that, just call Timer.pause()&#8221;. but there was no such method, so i decided to write my own ExtendedTimer class and add the pause functionality. now i like to share it with you&#8230;</p>
<p><a></a></p>
<pre><a class="taggedlink" rel="nofollow" href="http://blog.fjakobs.com/lab/ExtendedTimer.as" target="_blank">&gt; ExtendedTimer.as</a></pre>
<pre name="code" class="java">
package com.fjakobs.utils
{
	import flash.events.TimerEvent;
	import flash.utils.Timer;

	/**
	 * @author fjakobs
	 */
	public class ExtendedTimer extends Timer
	{
		private var _startTime : Number;
		private var _initialDelay : Number;
		private var _paused : Boolean = false;

		public function ExtendedTimer(delay : Number,
									  repeatCount : int = 0)
		{
			super(delay, repeatCount);
			_initialDelay = delay;
			addEventListener(TimerEvent.TIMER,
						    onTimer,false,0,true);
		}

		private function onTimer(event : TimerEvent) : void
		{
			_startTime = new Date().time;
			delay = _initialDelay;
		}

		override public function start() : void
		{
			if(currentCount < repeatCount)
			{
				_paused = false;
				_startTime = new Date().time;
				super.start();
			}
		}

		public function pause() : void
		{
			if(running)
			{
				_paused = true;
				stop();
				delay = delay - (new Date().time - _startTime);
			}
		}

		public function get paused() : Boolean
		{
			return _paused;
		}

		public function get initialDelay() : Number
		{
			return _initialDelay;
		}
	}
}
</pre>
]]></content:encoded>
			<wfw:commentRss>http://blog.fjakobs.com/archives/101/feed</wfw:commentRss>
		<slash:comments>35</slash:comments>
		</item>
		<item>
		<title>use FCSH via ant</title>
		<link>http://blog.fjakobs.com/archives/12</link>
		<comments>http://blog.fjakobs.com/archives/12#comments</comments>
		<pubDate>Fri, 30 May 2008 09:29:50 +0000</pubDate>
		<dc:creator>Fabian</dc:creator>
				<category><![CDATA[ActionScript 3]]></category>
		<category><![CDATA[eclipse]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[utils]]></category>
		<category><![CDATA[ant]]></category>
		<category><![CDATA[fcsh]]></category>
		<category><![CDATA[plugin]]></category>

		<guid isPermaLink="false">http://blog.fjakobs.com/archives/12</guid>
		<description><![CDATA[yesterday two very good buddies from BigSource released their FCSH Wrapper plugin for eclipse. i was one of the first beta testers and i have to say that it&#8217;s a great tool for my daily work. the Flex Compiler Shell (short FCSH) is much more faster than the MXMLC compiler, because only the changes in [...]]]></description>
			<content:encoded><![CDATA[<p>yesterday two very good buddies from <a href="http://www.bigsource.de" target="_blank">BigSource</a> released their FCSH Wrapper plugin for eclipse. i was one of the first beta testers and i have to say that it&#8217;s a great tool for my daily work. the <a href="http://labs.adobe.com/wiki/index.php/Flex_Compiler_Shell" target="_blank">Flex Compiler Shell</a> (short FCSH) is much more faster than the MXMLC compiler, because only the changes in your code and not the whole project is compiled by FCSH.</p>
<p>so get it from <a href="http://blog.bigsource.de/index.php/2008/05/29/eclipse-fcsh-wrapper-plugin/" target="_blank">http://blog.bigsource.de</a>, use it to compile your flash projects and have more fun at work!!!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.fjakobs.com/archives/12/feed</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>

