<?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>dx0ne's devlog &#187; ActionScript3.0</title>
	<atom:link href="https://dx0ne.laislacorporation.com/category/actionscript30/feed/" rel="self" type="application/rss+xml" />
	<link>https://dx0ne.laislacorporation.com</link>
	<description>i'm not crazy. i'm helicopter.</description>
	<lastBuildDate>Sat, 28 Apr 2012 11:59:33 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.4.2</generator>
		<item>
		<title>Programmer&#8217;s day that is not</title>
		<link>https://dx0ne.laislacorporation.com/2008/09/12/programmers-day-that-is-not/</link>
		<comments>https://dx0ne.laislacorporation.com/2008/09/12/programmers-day-that-is-not/#comments</comments>
		<pubDate>Fri, 12 Sep 2008 13:49:02 +0000</pubDate>
		<dc:creator>dx0ne</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[actionscript3]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://dx0ne.laislacorporation.com/?p=22</guid>
		<description><![CDATA[Well I don&#8217;t feel much like a programmer, but writing this was proposed by my laziness. Anyway it&#8217;s good opportunity to write small code that could be actually useful: function getYearDay():int { var n:int = 0; var td:Date = new Date(); var d:Date = new Date (td.getFullYear(), 0, 1); while ( d.getTime() < td.getTime() ) [...]]]></description>
			<content:encoded><![CDATA[<p>Well I don&#8217;t feel much like a programmer, but writing this was proposed by my laziness. Anyway it&#8217;s good opportunity to write small code that could be actually useful:</p>
<blockquote><p>function getYearDay():int {<br />
	var n:int = 0;<br />
	var td:Date = new Date();<br />
	var d:Date = new Date (td.getFullYear(), 0, 1);<br />
	while ( d.getTime() < td.getTime() ) {<br />
		d.setDate( d.getDate() + 1 );<br />
		++n;<br />
	}<br />
	return n;<br />
}<br />
if ( getYearDay() != 2 >> 8 ) {<br />
	trace(&#8220;WTF?!&#8221;);<br />
}</p></blockquote>
<p><strong>getYearDay()</strong>  function was highly based on <a href="http://www.actionscript.org/forums/showthread.php3?t=159876">this stuff by tvmiller</a></p>
<p>Another thing around this is Wikipedia article or rather lack of it. It was deleted by some Wikipedia Nazis ;] <a href="http://en.wikipedia.org/wiki/Wikipedia:Articles_for_deletion/Programmer%27s_day">Read the discussion</a>. I have no idea why they are so pushy towards deleting it since, as someone mentioned, there is place on Wikipedia for such things as Pi Day, Mole Day, Square root day, Towel Day, System Administrator Appreciation Day.</p>
<p>Anyway I better get back to work.</p>
]]></content:encoded>
			<wfw:commentRss>https://dx0ne.laislacorporation.com/2008/09/12/programmers-day-that-is-not/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Domain Lock in AS3, kind of</title>
		<link>https://dx0ne.laislacorporation.com/2007/12/15/domain-lock-in-as3-kind-of/</link>
		<comments>https://dx0ne.laislacorporation.com/2007/12/15/domain-lock-in-as3-kind-of/#comments</comments>
		<pubDate>Sat, 15 Dec 2007 15:20:44 +0000</pubDate>
		<dc:creator>dx0ne</dc:creator>
				<category><![CDATA[ActionScript3.0]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[code]]></category>

		<guid isPermaLink="false">http://dx0ne.laislacorporation.com/actionscript30/domain-lock-in-as3-kind-of/</guid>
		<description><![CDATA[Urkel asked at the Kongregate forums if anyone could help him with the domain lock in AS3. Well I donât know AS3, as for me itâs still âIâll dig into it tomorrowâ, but with help from Google and Flash Help Iâve modified the first example from Flash Rightsâ Domain Control page so that itâsâŚ well, [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.kongregate.com/forums/4/topics/4032">Urkel asked</a> at the Kongregate forums if anyone could help him with the domain lock in AS3. Well I donât know AS3, as for me itâs still <em>âIâll dig into it tomorrowâ</em>, but with help from Google and Flash Help Iâve modified the first example from <a href="http://www.flashrights.com/domaincontrol.htm">Flash Rightsâ Domain Control</a> page so that itâsâŚ well, maybe not pure AS3 but compiles as if it were. Anyway maybe someone will use it or will rewrite it so that it fits standards and stuff. For now it works and thatâs a start.</p>
<p><a href="http://dx0ne.laislacorporation.com/files/domainLockInAS3.swf">Here&#8217;s a live swf</a>. It doesn&#8217;t lock anything &#8211; it just shows domain.</p>
<p><a href="http://dx0ne.laislacorporation.com/files/domainLockInAS3.fla">Here&#8217;s the fla</a>.</p>
<p>Source:</p>
<blockquote><p><code lang="actionscript3">import flash.events.*;<br />
import flash.display.LoaderInfo;</code></p>
<p>function enterFrameHandler(event:Event):void {<br />
var url:String=stage.loaderInfo.url; //this is the magic _url successor<br />
var urlStart:Number = url.indexOf(&#8220;://&#8221;)+3;<br />
var urlEnd:Number = url.indexOf(&#8220;/&#8221;, urlStart);<br />
var domain:String = url.substring(urlStart, urlEnd);<br />
var LastDot:Number = domain.lastIndexOf(&#8220;.&#8221;)-1;<br />
var domEnd:Number = domain.lastIndexOf(&#8220;.&#8221;, LastDot)+1;<br />
domain = domain.substring(domEnd, domain.length);<br />
txt.text=domain;</p>
<p>if (domain != &#8220;mywebsite.com&#8221;) {<br />
// do nasty things to thief <img src='https://dx0ne.laislacorporation.com/wp/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
}<br />
}</p>
<p>addEventListener(Event.ENTER_FRAME, enterFrameHandler);</p></blockquote>
<p>Sidenote: I need some good AS source formatting wp plugin and sth like lighbox with swf support. Anyone?</p>
]]></content:encoded>
			<wfw:commentRss>https://dx0ne.laislacorporation.com/2007/12/15/domain-lock-in-as3-kind-of/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
