<?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>danielbunte.de - the actionscripter</title>
	<atom:link href="http://danielbunte.de/feed/" rel="self" type="application/rss+xml" />
	<link>http://danielbunte.de</link>
	<description>ActionScript, 3D Flash, AIR</description>
	<lastBuildDate>Wed, 16 Nov 2011 18:44:37 +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>Embed Bitmaps, Fonts, BinaryData, etc. without using the Flex framework at all</title>
		<link>http://danielbunte.de/2011/07/24/embed-bitmaps-fonts-binarydata-etc-without-using-the-flex-framework-at-all/</link>
		<comments>http://danielbunte.de/2011/07/24/embed-bitmaps-fonts-binarydata-etc-without-using-the-flex-framework-at-all/#comments</comments>
		<pubDate>Sun, 24 Jul 2011 21:59:44 +0000</pubDate>
		<dc:creator>Daniel Bunte</dc:creator>
				<category><![CDATA[ActionScript]]></category>

		<guid isPermaLink="false">http://danielbunte.de/?p=288</guid>
		<description><![CDATA[As a matter of fact, I don&#8217;t like the Flex framework very much. To be honest, I don&#8217;t like it at all. IMO it&#8217;s totally overloaded, slow and grows your SWF&#8217;s filesize a lot. Why I&#8217;m writing this post, is because I spend approximately 3-4 hours on searching for a solution and now that I&#8217;ve [...]]]></description>
			<content:encoded><![CDATA[<p>As a matter of fact, I don&#8217;t like the Flex framework very much. To be honest, I don&#8217;t like it at all. IMO it&#8217;s totally overloaded, slow and grows your SWF&#8217;s filesize a lot.<br />
Why I&#8217;m writing this post, is because I spend approximately 3-4 hours on searching for a solution and now that I&#8217;ve got this solution, I want to share this with you.</p>
<p>At the moment I build an application that loads our <a href="http://www.noob3D.com" title="noob3D" target="_blank">noob3D-Library</a> dynamically. While developing I need syntax completion, to do fast coding without having to read the docs again and again <img src='http://danielbunte.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
For a normal project it would just be fine to include the lib into your SWF, but I want to load it seperately. To get mxmlc to &#8220;exclude&#8221; the noob3D-Library from my SWF, I can use the &#8220;external-library-path&#8221; compiler argument (in my case it&#8217;s a custom-flex-config.xml).<br />
This works just fine and the noob3D-Library isn&#8217;t linked to my SWF. But this is where my journey begun on yesterday evening: If I use the &#8220;external-library-path&#8221; argument with mxmlc, also the Flex framework isn&#8217;t linked to the SWF anymore. I don&#8217;t know if this is a bug or if someone at Adobe smoked too much of whatever kind of plants grow in California <img src='http://danielbunte.de/wp-includes/images/smilies/icon_wink.gif' alt=';-)' class='wp-smiley' /> </p>
<p>You might probably also got the nice Error message &#8220;VerifyError: Error #1014: Class IFlexAsset could not be found&#8221; or something similar in your language. This is what I got. I tried lots of things to &#8220;re-include&#8221; these Flex files, but nothing worked for me.<br />
Somewhere during my research, I found out that you can also use the Embed tag on classes, rather than variables or consts. I read this concerning Font embedding, but it was mentioned that you can only embed one Font in one class with this. Since this was not what I wanted, I closed the page and continued searching.</p>
<p>However, I finally tried the solution to use Embed in another way <img src='http://danielbunte.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /><br />
You may know how to use the Embed tag with consts and vars, like this</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> final <span style="color: #000000; font-weight: bold;">class</span> GeneralCursor
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">''</span>D:<span style="color: #66cc66;">/</span>Morpheus<span style="color: #66cc66;">/</span>src<span style="color: #66cc66;">/</span>assets<span style="color: #66cc66;">/</span>AwesayCursorArrow.<span style="color: #006600;">png</span><span style="color: #ff0000;">')]
    private static const AWESAY_CURSOR_ARROW_DATA:Class;
[...]</span></pre></div></div>

<p>This includes the specified file as a Symbol into the SWF and works just fine for most of us. But this way uses the Flex framework. If you explore your SWF with your favorite tool of choice, you might see that classes like IFlexAsset, BitmapAsset, ByteArrayAsset, NameUtil, etc. are included in your SWF. But this is not the case if you use &#8220;external-library-path&#8221;, as I already mentioned above. So, now you may know why I was talking about smoking <img src='http://danielbunte.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>OK, what we can do instead is embedding our Symbols, Fonts, Bitmaps, XMLs, or any other data without using the Flex framework at all. It&#8217;s pretty simple!<br />
For every file you want to include, you&#8217;ll have to create an own class. This class must inherit from the type of file you want to embed. For embedding Pictures, the class should inherit from Bitmap, if you want to include binary data, it should inherit from ByteArray.<br />
Please NOTE: You can&#8217;t include XMLs as a subclass of XML, because the compiler isn&#8217;t able to transcode this. See the example code below.</p>
<p>Embedding XML files:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package com.<span style="color: #006600;">badnoob</span>.<span style="color: #006600;">awesay</span>.<span style="color: #006600;">morpheus</span>.<span style="color: #006600;">embeds</span> 
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">ByteArray</span>;
&nbsp;
    <span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">'D:/Morpheus/src/assets/xml/i18n/de-DE.xml'</span>, mimeType=<span style="color: #ff0000;">'application/octet-stream'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
    <span style="color: #0066CC;">public</span> final <span style="color: #000000; font-weight: bold;">class</span> FailSafeLanguageData <span style="color: #0066CC;">extends</span> ByteArray 
    <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> FailSafeLanguageData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span>	
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Embedding Pictures:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package com.<span style="color: #006600;">badnoob</span>.<span style="color: #006600;">awesay</span>.<span style="color: #006600;">morpheus</span>.<span style="color: #006600;">embeds</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Bitmap</span>;
&nbsp;
    <span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">'D:/Morpheus/src/assets/AwesayCursorArrow.png'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
    <span style="color: #0066CC;">public</span> final <span style="color: #000000; font-weight: bold;">class</span> AwesayGeneralCursorData <span style="color: #0066CC;">extends</span> Bitmap 
    <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> AwesayGeneralCursorData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span>	
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<hr style="noshade"/>
<p>Using XML data:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package foo
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">badnoob</span>.<span style="color: #006600;">awesay</span>.<span style="color: #006600;">morpheus</span>.<span style="color: #006600;">embeds</span>.<span style="color: #006600;">FailSafeLanguageData</span>;
&nbsp;
    <span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">ByteArray</span>
&nbsp;
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> EmdeddedXMLLoader
    <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> loadEmbeddedXMLData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">XML</span>
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> baFileData  :ByteArray = <span style="color: #000000; font-weight: bold;">new</span> FailSafeLanguageData,
                strFileData :<span style="color: #0066CC;">String</span>    = objFileData.<span style="color: #006600;">readUTFBytes</span><span style="color: #66cc66;">&#40;</span>objFileData.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
            <span style="color: #b1b100;">return</span> <span style="color: #0066CC;">XML</span><span style="color: #66cc66;">&#40;</span>strFileData<span style="color: #66cc66;">&#41;</span>;
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Using Pictures:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package foo
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #0066CC;">import</span> com.<span style="color: #006600;">badnoob</span>.<span style="color: #006600;">awesay</span>.<span style="color: #006600;">morpheus</span>.<span style="color: #006600;">embeds</span>.<span style="color: #006600;">AwesayGeneralCursorData</span>;
&nbsp;
    <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> EmbeddedPictureLoader
    <span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> loadEmbeddedPicture<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:Bitmap
        <span style="color: #66cc66;">&#123;</span>
            <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">new</span> AwesayGeneralCursorData;
        <span style="color: #66cc66;">&#125;</span>
    <span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>I hope this helps!</p>
]]></content:encoded>
			<wfw:commentRss>http://danielbunte.de/2011/07/24/embed-bitmaps-fonts-binarydata-etc-without-using-the-flex-framework-at-all/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>noob3D &#8211; high quality 3D-Engine for Flash released</title>
		<link>http://danielbunte.de/2011/05/19/noob3d-high-quality-3d-engine-for-flash-released/</link>
		<comments>http://danielbunte.de/2011/05/19/noob3d-high-quality-3d-engine-for-flash-released/#comments</comments>
		<pubDate>Thu, 19 May 2011 20:17:18 +0000</pubDate>
		<dc:creator>Daniel Bunte</dc:creator>
				<category><![CDATA[ActionScript]]></category>

		<guid isPermaLink="false">http://danielbunte.de/?p=285</guid>
		<description><![CDATA[I&#8217;m proud to announce that badnoob.com&#8217;s 3D-Engine, called noob3D, is finally released. Check it out: http://www.noob3D.com]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m proud to announce that badnoob.com&#8217;s 3D-Engine, called noob3D, is finally released.<br />
Check it out: <a href="http://www.noob3D.com">http://www.noob3D.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://danielbunte.de/2011/05/19/noob3d-high-quality-3d-engine-for-flash-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>XMLParser :: save XML.hasOwnProperty as local variable</title>
		<link>http://danielbunte.de/2011/05/02/xmlparser-save-xml-hasownproperty-as-local-variable/</link>
		<comments>http://danielbunte.de/2011/05/02/xmlparser-save-xml-hasownproperty-as-local-variable/#comments</comments>
		<pubDate>Mon, 02 May 2011 10:00:01 +0000</pubDate>
		<dc:creator>Daniel Bunte</dc:creator>
				<category><![CDATA[ActionScript]]></category>

		<guid isPermaLink="false">http://danielbunte.de/?p=279</guid>
		<description><![CDATA[hi there, at the moment, I&#8217;m writing a XML parser to parse a config file. I always try to keep the calls of &#8220;findproperty&#8221; low, because it&#8217;s very time-consuming. &#8220;findproperty&#8221; is called everytime you access a method or a property, like &#8220;objMyClass.myFunction()&#8221;. the AVM searches for the given property every time you use this syntax. [...]]]></description>
			<content:encoded><![CDATA[<p>hi there,<br />
at the moment, I&#8217;m writing a XML parser to parse a config file. I always try to keep the calls of <strong>&#8220;findproperty&#8221;</strong> low, because it&#8217;s very time-consuming. <strong>&#8220;findproperty&#8221;</strong> is called everytime you access a method or a property, like <strong>&#8220;objMyClass.myFunction()&#8221;</strong>. the AVM searches for the given property every time you use this syntax. if I need a property or method more than once, I always save it to a local variable.</p>
<p>I also tried this with <strong>XML.hasOwnProperty</strong>, what didn&#8217;t work for me. I got runtime errors, but no compilation errors. the used variable was always null.<br />
this is the code I used:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span>
<span style="color: #000000; font-weight: bold;">var</span> funcHasOwnProperty:<span style="color: #000000; font-weight: bold;">Function</span> = xmlFileData.<span style="color: #006600;">hasOwnProperty</span>;
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span></pre></div></div>

<p>as one would expect, this should be working without any problems. but you&#8217;re wrong, because <strong>funcHasOwnProperty</strong> will always be null. don&#8217;t ask me why and what adobe thought when designing this. maybe I should report a bug&#8230;</p>
<p>I still didn&#8217;t want to call the <strong>&#8220;findproperty&#8221;</strong> OP-Code for every XMLNode and every XMLAttribute, so I tried different things like coerce via</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span>
<span style="color: #000000; font-weight: bold;">var</span> funcHasOwnProperty:<span style="color: #000000; font-weight: bold;">Function</span> = <span style="color: #66cc66;">&#40;</span>xmlFileData.<span style="color: #006600;">hasOwnProperty</span> as <span style="color: #000000; font-weight: bold;">Function</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span></pre></div></div>

<p>but that also didn&#8217;t work.<br />
please note: if you call <strong>&#8220;xmlFileData.hasOwnProperty(&#8216;foo&#8217;)&#8221;</strong> directly, everything is fine, but it seems that you can&#8217;t save it to a local variable.</p>
<p>finally, after different approaches, I found the solution by first coercing <strong>xmlFileData</strong> to <strong>Object</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span>
<span style="color: #000000; font-weight: bold;">var</span> funcHasOwnProperty:<span style="color: #000000; font-weight: bold;">Function</span> = <span style="color: #66cc66;">&#40;</span>xmlFileData as <span style="color: #0066CC;">Object</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">hasOwnProperty</span>;
<span style="color: #66cc66;">&#91;</span>...<span style="color: #66cc66;">&#93;</span></pre></div></div>

<p>this is crazy, isn&#8217;t it?<br />
this workaround may also work for other fields of application, but I didn&#8217;t test it yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://danielbunte.de/2011/05/02/xmlparser-save-xml-hasownproperty-as-local-variable/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Receiving Event.COPY, Event.PASTE and Event.SELECT_ALL events on Sprites</title>
		<link>http://danielbunte.de/2011/04/28/receiving-event-copy-event-paste-and-event-select_all-events-on-sprites/</link>
		<comments>http://danielbunte.de/2011/04/28/receiving-event-copy-event-paste-and-event-select_all-events-on-sprites/#comments</comments>
		<pubDate>Thu, 28 Apr 2011 14:22:20 +0000</pubDate>
		<dc:creator>Daniel Bunte</dc:creator>
				<category><![CDATA[ActionScript]]></category>

		<guid isPermaLink="false">http://danielbunte.de/?p=272</guid>
		<description><![CDATA[According to my work on http://www.awesay.com, I needed to create my own TextField. One could argument to use the TextLayoutFramework (TLF) created by Adobe, but for our uses it&#8217;s overloaded. We don&#8217;t want our users to need to download ~ 0.5 MB to just be able to read one line of text. In addition to [...]]]></description>
			<content:encoded><![CDATA[<p>According to my work on <a href="http://www.awesay.com">http://www.awesay.com</a>, I needed to create my own TextField. One could argument to use the TextLayoutFramework (TLF) created by Adobe, but for our uses it&#8217;s overloaded. We don&#8217;t want our users to need to download ~ 0.5 MB to just be able to read one line of text. In addition to this, we may need other parts of the FlexSDK to be downloaded, so we easily end up with a download of 1 MB or more. The Spark SWC has a size of 1.3 MB, what&#8217;s just too much.<br />
So I started to create my own TextInputField with not more than 650 lines of code. I also want the user to be able to copy and paste text from and to his Clipboard, so I&#8217;ve had a look at the Event.PASTE, etc. events that I needed to listen for.</p>
<p>My first problem with this was that my TextInputField didn&#8217;t receive any of these events, so I double checked the listeners, but everything was fine. After some research I found out that I need to set stage.focus to the current TextInputField. I thought it should be easy by just doing</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">focus</span> = <span style="color: #0066CC;">this</span>;</pre></div></div>

<p>The TextInputField still didn&#8217;t receive any events though&#8230;<br />
So I traced the actual value of stage.focus after setting and I got &#8220;null&#8221; in my trace. Just wonderful&#8230;<br />
After some more research, I actually found a solution at stackoverflow.com.<br />
What you need to do to keep stage.focus on your InteractiveObject is to listen for the FocusEvent.FOCUS_OUT event and reset the stage.focus property.<br />
Finally I got the copy and paste functionality to work as expected by first setting stage.focus to this and then listen for the focusOut event to reset it once:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&#91;</span> ... <span style="color: #66cc66;">&#93;</span>
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> setStageFocus<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
  <span style="color: #0066CC;">this</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FocusEvent.<span style="color: #006600;">FOCUS_OUT</span>, <span style="color: #0066CC;">this</span>.<span style="color: #006600;">focusOutHandler</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">focus</span> = <span style="color: #0066CC;">this</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> focusOutHandler<span style="color: #66cc66;">&#40;</span>evt:FocusEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
  <span style="color: #0066CC;">this</span>.<span style="color: #006600;">removeEventListener</span><span style="color: #66cc66;">&#40;</span>FocusEvent.<span style="color: #006600;">FOCUS_OUT</span>, <span style="color: #0066CC;">this</span>.<span style="color: #006600;">focusOutHandler</span><span style="color: #66cc66;">&#41;</span>;
  <span style="color: #0066CC;">this</span>.<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">focus</span> = <span style="color: #0066CC;">this</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #66cc66;">&#91;</span> ... <span style="color: #66cc66;">&#93;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://danielbunte.de/2011/04/28/receiving-event-copy-event-paste-and-event-select_all-events-on-sprites/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>noobFuscator released</title>
		<link>http://danielbunte.de/2011/01/21/noobfuscator-released/</link>
		<comments>http://danielbunte.de/2011/01/21/noobfuscator-released/#comments</comments>
		<pubDate>Fri, 21 Jan 2011 21:29:54 +0000</pubDate>
		<dc:creator>Daniel Bunte</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Code]]></category>
		<category><![CDATA[Decompilation]]></category>
		<category><![CDATA[Decompiler]]></category>
		<category><![CDATA[Decompiling]]></category>
		<category><![CDATA[Distribution]]></category>
		<category><![CDATA[Encrypt]]></category>
		<category><![CDATA[Encryption]]></category>
		<category><![CDATA[Obfuscation]]></category>
		<category><![CDATA[Obfuscator]]></category>
		<category><![CDATA[Optimization]]></category>
		<category><![CDATA[Piracy]]></category>
		<category><![CDATA[Prevent illegal redistribution]]></category>
		<category><![CDATA[Protect]]></category>
		<category><![CDATA[Protection]]></category>
		<category><![CDATA[Renaming]]></category>
		<category><![CDATA[Reverse Engineering]]></category>
		<category><![CDATA[Secure]]></category>
		<category><![CDATA[Security]]></category>
		<category><![CDATA[SWF]]></category>

		<guid isPermaLink="false">http://danielbunte.de/?p=265</guid>
		<description><![CDATA[Our Flash / ActionScript 3.0 obfuscator is being shipped right now. It&#8217;s available on the Adobe Marketplace: noobFuscator Download You need an AdobeID (free Adobe Account). It&#8217;s a 14 day Try and Buy offer. Find a Roadmap and Feature overview on our blog.badnoob.com Reviews, opinions and feature request are welcome!]]></description>
			<content:encoded><![CDATA[<p>Our Flash / ActionScript 3.0 obfuscator is being shipped right now.<br />
It&#8217;s available on the Adobe Marketplace:<br />
<h1><a href="http://www.adobe.com/cfusion/marketplace/index.cfm?event=marketplace.offering&amp;offeringid=20705&amp;marketplaceid=1">noobFuscator Download</a></h1>
<p>You need an AdobeID (free Adobe Account).<br />
It&#8217;s a 14 day Try and Buy offer.</p>
<p>Find a Roadmap and Feature overview on our <a href="http://blog.badnoob.com/index.php/topic,16.0.html">blog.badnoob.com</a></p>
<p>Reviews, opinions and feature request are welcome!</p>
]]></content:encoded>
			<wfw:commentRss>http://danielbunte.de/2011/01/21/noobfuscator-released/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Getter/Setter best practices</title>
		<link>http://danielbunte.de/2010/12/01/gettersetter-best-practices/</link>
		<comments>http://danielbunte.de/2010/12/01/gettersetter-best-practices/#comments</comments>
		<pubDate>Wed, 01 Dec 2010 11:06:11 +0000</pubDate>
		<dc:creator>Daniel Bunte</dc:creator>
				<category><![CDATA[ActionScript]]></category>

		<guid isPermaLink="false">http://danielbunte.de/?p=260</guid>
		<description><![CDATA[In the german flashforum.de, there was a recent discussion about getters and setters. Some of the developers always use getter and setter-methods instead of just using public variables. They believe it&#8217;s good OOP-practice. In my opinion, everybody can do what he/she wants to do, but should always keep something in mind: speed. Since the moste [...]]]></description>
			<content:encoded><![CDATA[<p>In the german flashforum.de, there was a recent discussion about getters and setters. Some of the developers always use getter and setter-methods instead of just using public variables. They believe it&#8217;s good OOP-practice.<br />
In my opinion, everybody can do what he/she wants to do, but should always keep something in mind: speed.</p>
<p>Since the moste ActionScripting is done for the Flash Player rather than other applications, we need to keep track of speed. The AVM itself can be very very fast. What&#8217;s slowing down there is the FP (my very own experience).</p>
<p>So, OK you want to use get/set because of good OOP or the advanced ASDoc functionality for it &#8211; that&#8217;s fine! But don&#8217;t tell me your code is slow! NAARP&#8230; <img src='http://danielbunte.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I really wanted to know, if there are any losings in performance when using getters and setters instead of public variables, or the other way around.<br />
Yes, there are losings! In my tests, reading public variables was almost 3 times faster than doing the same with getter-methods. But writing a public variable was more than 4 times faster than writing via setter. I didn&#8217;t think that it would be that huge difference&#8230;</p>
<p>So my best practices for using getters/setters:<br />
Use getters only if<br />
1. Your getter returns more than only the requested value, e. g. you have a getter to read the full name and it will give you a String of firstName +&#8217; &#8216;+ lastName.<br />
2. You want a property to be read-only (only makes sense, if you&#8217;re creating an API for other developers, because you should know your own code <img src='http://danielbunte.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> ).</p>
<p>Use setters only if<br />
1. You want to validate the given value.<br />
2. When a property is changed, something else needs to be changed too, e. g. you change the labelString of a button, so the TextField&#8217;s text of that button should change accordingly.</p>
<p>You may want to download my test-case and share your results: <a href='http://danielbunte.de/wp-content/uploads/2010/12/BenchmarkTests.7z'>BenchmarkTests</a></p>
]]></content:encoded>
			<wfw:commentRss>http://danielbunte.de/2010/12/01/gettersetter-best-practices/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Molehill news</title>
		<link>http://danielbunte.de/2010/11/21/252/</link>
		<comments>http://danielbunte.de/2010/11/21/252/#comments</comments>
		<pubDate>Sun, 21 Nov 2010 10:15:03 +0000</pubDate>
		<dc:creator>Daniel Bunte</dc:creator>
				<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[3D]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Molehill]]></category>

		<guid isPermaLink="false">http://danielbunte.de/?p=252</guid>
		<description><![CDATA[I&#8217;m happy to inform you about some news concerning molehill. However it&#8217;s not the news I wanted to provide. We are in the prerelease team of molehill for a few weeks now. When joining the team, we had to sign a contract that does not allow me to talk about molehill in details. But don&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m happy to inform you about some news concerning molehill. However it&#8217;s not the news I wanted to provide. We are in the prerelease team of molehill for a few weeks now. When joining the team, we had to sign a contract that does not allow me to talk about molehill in details.<br />
But don&#8217;t be frustrated &#8211; there&#8217;s not much more detail than Sebastian Marketsmueller provided in his talk at Adobe MAX. If you really want to code an engine with molehill, you may want to drop an email to Thibault Imbert and tell him about what you&#8217;re doing right now and why you should get access to the API.<br />
You also won&#8217;t benefit from the news I might be able to give you, because Molehill is still in alpha and a lot of methods may change til the final release.<br />
For using molehill I didn&#8217;t took our Alchemy-based engine &#8220;noob3D with BlackCat core&#8221;, but I rebuild it from scratch. Building the main part of the engine took me about two or three days and it does handle 3k objects with ease. But at this state of development, I haven&#8217;t implemented features like Frustum- and Octree-Culling yet, so this number will change.<br />
You may want to study the Assembler-Codes, presented in Marketsmueller&#8217;s video on AdobeTV.<br />
I&#8217;m sorry, but I&#8217;m not able to provide any further details on this.</p>
]]></content:encoded>
			<wfw:commentRss>http://danielbunte.de/2010/11/21/252/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Why programmers can&#8217;t program</title>
		<link>http://danielbunte.de/2010/11/03/why-programmers-cant-program/</link>
		<comments>http://danielbunte.de/2010/11/03/why-programmers-cant-program/#comments</comments>
		<pubDate>Wed, 03 Nov 2010 13:39:45 +0000</pubDate>
		<dc:creator>Daniel Bunte</dc:creator>
				<category><![CDATA[General]]></category>

		<guid isPermaLink="false">http://danielbunte.de/?p=249</guid>
		<description><![CDATA[Got this nice link from my colleague and just wanted to share it with you. It&#8217;s very funny and also horrible&#8230; http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html]]></description>
			<content:encoded><![CDATA[<p>Got this nice link from my colleague and just wanted to share it with you. It&#8217;s very funny and also horrible&#8230;</p>
<p><a href="http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html">http://www.codinghorror.com/blog/2007/02/why-cant-programmers-program.html</a></p>
]]></content:encoded>
			<wfw:commentRss>http://danielbunte.de/2010/11/03/why-programmers-cant-program/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>3D Software pricing</title>
		<link>http://danielbunte.de/2010/11/01/3d-software-pricing/</link>
		<comments>http://danielbunte.de/2010/11/01/3d-software-pricing/#comments</comments>
		<pubDate>Mon, 01 Nov 2010 10:23:28 +0000</pubDate>
		<dc:creator>Daniel Bunte</dc:creator>
				<category><![CDATA[ActionScript]]></category>

		<guid isPermaLink="false">http://danielbunte.de/?p=223</guid>
		<description><![CDATA[I just thought about getting a copy of Autodesk 3DS Max 2011 or Maya, but I didn&#8217;t believe the pricing! 3DS Max is about 3.9K $ and Maya is about 4.9k $! w00t? So, I&#8217;ll continue using LightWave that was just 795 $. I have to say that I&#8217;m really really happy with LightWave &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>I just thought about getting a copy of Autodesk 3DS Max 2011 or Maya, but I didn&#8217;t believe the pricing! 3DS Max is about 3.9K $ and Maya is about 4.9k $! w00t?<br />
So, I&#8217;ll continue using LightWave that was just 795 $. I have to say that I&#8217;m really really happy with LightWave &#8211; it&#8217;s a great modeling and animation software. I just thought about getting Autodesk software, because we want to support their fileformats, specialities and probably write a plugin for it. Maybe I can do it within the 30 day tryout&#8230; <img src='http://danielbunte.de/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p><a href="http://www.lightwave3d.com">http://www.lightwave3d.com</a></p>
]]></content:encoded>
			<wfw:commentRss>http://danielbunte.de/2010/11/01/3d-software-pricing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Molehill API-Details</title>
		<link>http://danielbunte.de/2010/10/29/molehill-api-details/</link>
		<comments>http://danielbunte.de/2010/10/29/molehill-api-details/#comments</comments>
		<pubDate>Fri, 29 Oct 2010 16:26:34 +0000</pubDate>
		<dc:creator>Daniel Bunte</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[ActionScript]]></category>
		<category><![CDATA[API]]></category>
		<category><![CDATA[Details]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Molehill]]></category>

		<guid isPermaLink="false">http://danielbunte.de/?p=236</guid>
		<description><![CDATA[I just finished watching the new video about API-Design of Molehill on AdobeTV, hosted by Sebastian Marketsmueller. I&#8217;d like to give you conclusion here: First thing I have to tell, is that most developers won&#8217;t even want to &#8220;put their hands on Molehill&#8221;. Why? That&#8217;s quite simple. Most developers want to display 3D-content with ease [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished watching the new video about API-Design of Molehill on AdobeTV, hosted by Sebastian Marketsmueller.<br />
I&#8217;d like to give you conclusion here:<br />
First thing I have to tell, is that most developers won&#8217;t even want to &#8220;put their hands on Molehill&#8221;. Why? That&#8217;s quite simple. Most developers want to display 3D-content with ease and without having to read a bunch of books before they can use the technology. It is so that Molehill really requires not only advanced or professional programming skills &#8211; you&#8217;ll have to have coding in your veins! I for myself will really enjoy coding with Molehill &#8211; coding has just embedded in my DNA <img src='http://danielbunte.de/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>So what is this guy talking all about?<br />
There&#8217;s still a drawTriangles-method in Molehill, but as you will have expected, it&#8217;s not as easy as the old one. As a matter of fact, there will only be a few calculations that will have to be done inside AS3, like building trees if you like them. All calculations concerning transformation, rotation, scaling, etc. is performed directly in the graphics hardware.<br />
I thought they built a big wrapper around everything, so you&#8217;d only have a few options, but my thoughts were fortunately wrong. You have all the controls over the graphics device that a C++-Developer has (or nearly). The object-data won&#8217;t be saved in Flash&#8217;s memory, &#8217;cause everything is being hold in the graphic cards RAM.<br />
To actually work with the Molehill API, you&#8217;ll have to write Assembler-Code. Yes, that&#8217;s what I wrote: Assembler-Code. Some of you might have seen those codes like</p>

<div class="wp_syntax"><div class="code"><pre class="assembler" style="font-family:monospace;">mov eax, ecx
jmp 0x475927</pre></div></div>

<p>If you want to learn this, you&#8217;ll probably figure out that it&#8217;s not as difficult as it seems to be. The asm you write for Molehill is being compiled to byteCode, then stored as byteArray and will finally be uploaded to the graphics card via the graphics pipeline.<br />
The API contains only 20 OP-Codes that you should be familar with. If you&#8217;ve done 3D-mathematics on your own, it should be self-explanatory.<br />
What will be delivered to the graphics adapter is called TokenStream. Each Token inside that stream is of fixed size: 192 Bits.<br />
It starts with the OP-Code [32 Bits], followed by the Destination [32 Bits], then followed by SourceA and SourceB, each of 64 Bits. Are you still with me? If you answered no, just forget about reading any further&#8230; <img src='http://danielbunte.de/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>Do you like matrices? I hate them! However, most engines use them and the API has a native OP-Code to do matrix transformations. There are m44, m34 and m33. These are OP-Codes used for matrices 4&#215;4, 3&#215;4 or 3&#215;3.<br />
Let&#8217;s say we wan&#8217;t to transform <strong>mtx2 onto mtx1</strong> and we want to save the equation in <strong>output</strong>. What we need to do is just simply write Assembler-Code:</p>

<div class="wp_syntax"><div class="code"><pre class="assembler" style="font-family:monospace;">m44 output, mtx1, mtx2</pre></div></div>

<p>Quite simple, eh?<br />
I think about all the possibilities with this API. I&#8217;ll have to do a lot of benchmarking when I&#8217;ve access to the API. I don&#8217;t have any answer from Adobe yet, but even if the alternativa-people have a big head-start, we will be able to get close to them, also if we have to wait for the beta. With the new API, it&#8217;s sooo easy and fast to create an engine, I just can&#8217;t believe it <img src='http://danielbunte.de/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  You might think different.</p>
<p>The manner in which objects are hold in the graphics card is totally different than that of every 3D-Engine, including noob3D. I know this hierarchy:<br />
Object -> faceList -> Face -> vertices<br />
so every face has it&#8217;s own vertices directly in that class. the graphics hardware just has a buffer with all vertices in it. if you want to know a vertex, you&#8217;ll have to know it&#8217;s index position.</p>
<p>The readers that have not closed the page yet, may be interested in the session by Sebastian Marketsmueller:<br />
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" width="637" height="384" codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=6,0,40,0"><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="FlashVars" value="fileID=8215&amp;context=648&amp;embeded=true&amp;environment=production"></param><param name="src" value="http://images.tv.adobe.com/swf/player.swf"></param><param name="flashvars" value="fileID=8215&amp;context=648&amp;embeded=true&amp;environment=production"></param><param name="allowfullscreen" value="true"><embed type="application/x-shockwave-flash" width="637" height="384" src="http://images.tv.adobe.com/swf/player.swf" flashvars="fileID=8215&amp;context=648&amp;embeded=true&amp;environment=production" allowscriptaccess="always" allowfullscreen="true"></embed></param></object></p>
<p>Still wanna put your hands on it? Questions and discussion are welcome.</p>
<p>More information will be made public here, when I&#8217;ve seen the other movies. They will also be available at <a href="http://www.bytearray.org/?p=2346">bytearray.org</a>. Maybe Thibault writes some more info on this.</p>
]]></content:encoded>
			<wfw:commentRss>http://danielbunte.de/2010/10/29/molehill-api-details/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>

<!-- Dynamic page generated in 1.390 seconds. -->
<!-- Cached page generated by WP-Super-Cache on 2012-02-06 18:18:07 -->
<!-- Compression = gzip -->
