<?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>DanDev.com &#187; admin</title>
	<atom:link href="http://www.dandev.com/author/admin/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.dandev.com</link>
	<description>Daniel&#039;s dev-related-ish blog</description>
	<lastBuildDate>Sat, 17 Jul 2010 18:22:08 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=abc</generator>
		<item>
		<title>VerifyError: Error #1014: Class IIMEClient could not be found.</title>
		<link>http://www.dandev.com/2010/07/verifyerror-error-1014-class-iimeclient-could-not-be-found/</link>
		<comments>http://www.dandev.com/2010/07/verifyerror-error-1014-class-iimeclient-could-not-be-found/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 03:49:55 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.dandev.com/?p=189</guid>
		<description><![CDATA[If you have run across this error recently: VerifyError: Error #1014: Class IIMEClient could not be found. You may be wondering what it means, and more importantly how to fix it. What appears to be the sole cause of this error is your versions not matching up between your Flex/AIR SDK and the AIR application [...]]]></description>
			<content:encoded><![CDATA[<p>If you have run across this error recently: <strong>VerifyError: Error #1014: Class IIMEClient could not be found.</strong></p>
<p>You may be wondering what it means, and more importantly how to fix it. What appears to be the sole cause of this error is your versions not matching up between your Flex/AIR SDK and the AIR application descriptor file. This can happen after you update/reinstall Flash Builder, or the SDK folder manually.</p>
<p>The fix is pretty easy: Just open your AIR descriptor file(generally the only XML file in the project src folder) and change the xmlns to the current version of the SDK you are using(1.5.3 =&gt; 2.0 for instance). See screenshot below for an example(warning: it&#8217;s big):</p>
<p><a href="http://www.dandev.com/wp-content/uploads/2010/07/air-error.png" target="_blank" rel="lightbox[189]"><img class="alignnone size-full wp-image-190" title="air-error" src="http://www.dandev.com/wp-content/uploads/2010/07/air-error.png" alt="" width="400" height="300" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.dandev.com/2010/07/verifyerror-error-1014-class-iimeclient-could-not-be-found/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Windows Installer has stopped working</title>
		<link>http://www.dandev.com/2010/07/windows-installer-has-stopped-working/</link>
		<comments>http://www.dandev.com/2010/07/windows-installer-has-stopped-working/#comments</comments>
		<pubDate>Tue, 06 Jul 2010 01:57:43 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Operating Systems]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://www.dandev.com/?p=184</guid>
		<description><![CDATA[If you have been unfortunate enough to run into this issue, here are a few things you can try to resolve it. These are for Windows 7 only – there are already solutions available for older versions of Windows if you search. You need a physical copy of the DVD to do a manual restore [...]]]></description>
			<content:encoded><![CDATA[<p>If you have been unfortunate enough to run into this issue, here are a few things you can try to resolve it. These are for Windows 7 only – there are already solutions available for older versions of Windows if you search. You need a physical copy of the DVD to do a manual restore of the files.</p>
<ol>
<li>(Re)start the Windows Installer service
<ol type="a">
<li>Right-click on Computer</li>
<li>Click Manage</li>
<li>Expand Services and Applications</li>
<li>Select Services</li>
<li>Scroll down to &#8220;Windows Installer&#8221;</li>
<li>Right-click or double-click on it and make sure it is started and NOT disabled</li>
</ol>
</li>
<li>Run &#8220;sfc /scannow&#8221; from a command prompt as Administrator
<ol type="a">
<li>Should see something like: windows resource protection found some corrupt files but was unable to fix them
<ol type="i">
<li>Check the log to see if the problem is a corrupt file such as &#8220;msi.dll&#8221;
<ol type="1">
<li>Do this by searching for &#8220;cannot repair&#8221;</li>
</ol>
</li>
<li>If that is the case you can restore this file from the Windows DVD by:
<ol type="1">
<li>Insert the Windows DVD in the drive, cancel the autorun if it pops up</li>
<li>Open <a href="http://www.7-zip.org" target="_blank">7-zip</a> and browse to &#8220;install.wim&#8221; in the DVD:\Sources folder (open it)</li>
<li>Inside you will find numbered folders corresponding to the windows version, open yours:
<p>1=Home Basic</p>
<p>2=Home Premium</p>
<p>3=Professional</p>
<p>4=Ultimate</li>
<li>Browse to the folder for the version you have installed, and you can copy/extract the file(s) you need. In my case I needed &#8220;msi.dll&#8221; in the #\Windows\System32 folder</li>
<li>Note that if you are restoring a sensitive file such as this that you have to take ownership of the original file to rename/remove it before you can restore this file from the DVD, and ideally set the restored file back to the original owner and permission.</li>
<li>Also note that the &#8220;msi.dll&#8221; file is owned by &#8220;TrustedInstaller&#8221;, so if you are getting a security error you need to take ownership of the file to replace it and then restore TrustedInstaller as the owner. If you can&#8217;t find it when you &#8220;check&#8221; the name use &#8220;NT SERVICE\TrustedInstaller&#8221;</li>
</ol>
</li>
</ol>
</li>
</ol>
</li>
<li>Restore an earlier restore point(not verified to work but try it..)</li>
<li>Run the repair option from the installer DVD</li>
<li>Reinstall Windows</li>
</ol>
<p>Hope this helps someone. <img src='http://www.dandev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dandev.com/2010/07/windows-installer-has-stopped-working/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex HDividedBox/VDividedBox divider double-click event oddity</title>
		<link>http://www.dandev.com/2009/12/hdividedbox/</link>
		<comments>http://www.dandev.com/2009/12/hdividedbox/#comments</comments>
		<pubDate>Wed, 02 Dec 2009 02:30:05 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Click]]></category>
		<category><![CDATA[DividedBox]]></category>
		<category><![CDATA[Divider]]></category>
		<category><![CDATA[Double-click]]></category>
		<category><![CDATA[DOUBLE_CLICK]]></category>
		<category><![CDATA[Event]]></category>
		<category><![CDATA[HDividedBox]]></category>
		<category><![CDATA[MouseEvent]]></category>
		<category><![CDATA[VDividedBox]]></category>

		<guid isPermaLink="false">http://www.dandev.com/?p=171</guid>
		<description><![CDATA[I ran across an interesting case today while looking into an issue for someone else related to capturing the double-click event on the divider for a HDividedBox. It&#8217;s a little tricky to get the event to be captured by Flex. A quick search of the interwebs turned up nothing but people with the same issue. [...]]]></description>
			<content:encoded><![CDATA[<p>I ran across an interesting case today while looking into an issue for someone else related to capturing the double-click event on the divider for a HDividedBox. It&#8217;s a little tricky to get the event to be captured by Flex. A quick search of the interwebs turned up nothing but people with the same issue. There is even an <a href="http://bugs.adobe.com/jira/browse/SDK-13">open bug in the Adobe Flex bug tracker</a>(you have to login) that seems to be the exact issue, but there is no resolution named. Through some quick experimentation I figured out you can get it to work like so:</p>

<div class="wp_syntax"><table><tr><td class="line_numbers"><pre>1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
</pre></td><td class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #66cc66;">&lt;</span>?<span style="color: #0066CC;">xml</span> <span style="color: #0066CC;">version</span>=<span style="color: #ff0000;">&quot;1.0&quot;</span> encoding=<span style="color: #ff0000;">&quot;utf-8&quot;</span>?<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;</span>mx:Application xmlns:mx=<span style="color: #ff0000;">&quot;http://www.adobe.com/2006/mxml&quot;</span> 
    layout=<span style="color: #ff0000;">&quot;absolute&quot;</span>
    <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;600&quot;</span> <span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;588&quot;</span>
    applicationComplete=<span style="color: #ff0000;">&quot;start()&quot;</span><span style="color: #66cc66;">&gt;</span>
    <span style="color: #66cc66;">&lt;</span>mx:HDividedBox id=<span style="color: #ff0000;">&quot;divBox&quot;</span> 
    	<span style="color: #0066CC;">height</span>=<span style="color: #ff0000;">&quot;100%&quot;</span> <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;99%&quot;</span>
    	liveDragging=<span style="color: #ff0000;">&quot;true&quot;</span>
    	doubleClickEnabled=<span style="color: #ff0000;">&quot;true&quot;</span><span style="color: #66cc66;">&gt;</span>
          <span style="color: #66cc66;">&lt;</span>mx:Canvas <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;50%&quot;</span><span style="color: #66cc66;">&gt;</span>
          		<span style="color: #66cc66;">&lt;</span>mx:<span style="color: #0066CC;">Text</span> <span style="color: #0066CC;">text</span>=<span style="color: #ff0000;">&quot;Some example text&quot;</span> <span style="color: #66cc66;">/&gt;</span>
          <span style="color: #66cc66;">&lt;/</span>mx:Canvas<span style="color: #66cc66;">&gt;</span>
          <span style="color: #66cc66;">&lt;</span>mx:Canvas <span style="color: #0066CC;">width</span>=<span style="color: #ff0000;">&quot;50%&quot;</span><span style="color: #66cc66;">&gt;</span>
          		<span style="color: #66cc66;">&lt;</span>mx:<span style="color: #0066CC;">Text</span> <span style="color: #0066CC;">text</span>=<span style="color: #ff0000;">&quot;Some example text&quot;</span> <span style="color: #66cc66;">/&gt;</span>
	      <span style="color: #66cc66;">&lt;/</span>mx:Canvas<span style="color: #66cc66;">&gt;</span>
     <span style="color: #66cc66;">&lt;/</span>mx:HDividedBox<span style="color: #66cc66;">&gt;</span>
     <span style="color: #66cc66;">&lt;</span>mx:Script<span style="color: #66cc66;">&gt;</span>
          <span style="color: #66cc66;">&lt;!</span><span style="color: #66cc66;">&#91;</span>CDATA<span style="color: #66cc66;">&#91;</span>
               <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
                    divBox.<span style="color: #006600;">getDividerAt</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">DOUBLE_CLICK</span>, handleDoubleClick<span style="color: #66cc66;">&#41;</span>;
               <span style="color: #66cc66;">&#125;</span>
&nbsp;
               <span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> handleDoubleClick<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
                    Alert.<span style="color: #0066CC;">show</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'Event captured!'</span><span style="color: #66cc66;">&#41;</span>;
               <span style="color: #66cc66;">&#125;</span>
          <span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&gt;</span>
     <span style="color: #66cc66;">&lt;/</span>mx:Script<span style="color: #66cc66;">&gt;</span>
<span style="color: #66cc66;">&lt;/</span>mx:Application<span style="color: #66cc66;">&gt;</span></pre></td></tr></table></div>

<p>The specific resolution was to enable liveDragging and add the event to the divider itself(most people try to set it on the doubleClick property of the DividerBox).</p>
<p>Hopefully this post will be helpful to some people out there with the same issue!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dandev.com/2009/12/hdividedbox/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>GAIQ Certified!</title>
		<link>http://www.dandev.com/2009/11/gaiq-certified/</link>
		<comments>http://www.dandev.com/2009/11/gaiq-certified/#comments</comments>
		<pubDate>Sun, 15 Nov 2009 23:39:50 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[certification]]></category>
		<category><![CDATA[gaiq]]></category>
		<category><![CDATA[google analytics]]></category>

		<guid isPermaLink="false">http://www.dandev.com/?p=169</guid>
		<description><![CDATA[So, I took the GAIQ certification test the other day and passed. It was a little harder than I expected, but not too crazy. I definitely recommend you watch all of the Google Conversion University videos about GA and be ready to look things up if you aren&#8217;t sure. A lot of the questions were [...]]]></description>
			<content:encoded><![CDATA[<p>So, I took the GAIQ certification test the other day and passed. It was a little harder than I expected, but not too crazy. I definitely recommend you watch all of the <a href="http://www.google.com/support/conversionuniversity/">Google Conversion University</a> videos about GA and be ready to look things up if you aren&#8217;t sure. A lot of the questions were common sense, but there were a few tricky ones that required some advanced knowledge.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dandev.com/2009/11/gaiq-certified/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flex Tip: Accessing your AS functions/properties from imported classes</title>
		<link>http://www.dandev.com/2009/05/flex-tip-accessing-your-as-functionsproperties-from-imported-classes/</link>
		<comments>http://www.dandev.com/2009/05/flex-tip-accessing-your-as-functionsproperties-from-imported-classes/#comments</comments>
		<pubDate>Mon, 25 May 2009 22:54:10 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[application]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[class]]></category>

		<guid isPermaLink="false">http://www.dandev.com/?p=151</guid>
		<description><![CDATA[Every once in a while you might run across a case where you need to access a property or method from the parent application, and you don&#8217;t have the ability to pass the value you need to the class. Or, for example, you&#8217;re debugging and you don&#8217;t want to write a bunch of code that [...]]]></description>
			<content:encoded><![CDATA[<p>Every once in a while you might run across a case where you need to access a property or method from the parent application, and you don&#8217;t have the ability to pass the value you need to the class. Or, for example, you&#8217;re debugging and you don&#8217;t want to write a bunch of code that you&#8217;ll have to remove later just to test the value of a variable.</p>
<p>So, with that said the process is fairly simple. The following is a hypothetical example of a class you have imported into your application:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #9900cc; font-weight: bold;">package</span> com.example.scope
<span style="color: #000000;">&#123;</span>
    <span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #6699cc; font-weight: bold;">var</span> myVar<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span> = <span style="color: #990000;">'This is NOT the value we'</span>re trying to <span style="color: #0033ff; font-weight: bold;">get</span><span style="color: #990000;">';
&nbsp;
    public class scopeExample
    {
        public function scopeExample()
        {
            import mx.core.Application; // make &quot;Application&quot; available in the current scope
            trace(Application.application.myVar); // outputs the value of myVar in the main application
        }
    }
}</span></pre></div></div>

<p>You could also use:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span>parentDocument.myVar<span style="color: #000000;">&#41;</span>; <span style="color: #009900;">// if the component is a child of the main application</span></pre></div></div>

<p>I ran across a post on Holly Schinsky&#8217;s blog the other day that had good descriptions of the various scope keywords, and a few tips. All of which is good knowledge to possess, so <a title="Flex/AIR Application Scope Tips" href="http://devgirl.wordpress.com/2009/01/27/flexair-application-scope-tips/" target="_blank">check it out</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dandev.com/2009/05/flex-tip-accessing-your-as-functionsproperties-from-imported-classes/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>PunkBuster Invalid O/S Error on Vista</title>
		<link>http://www.dandev.com/2009/03/punkbuster-invalid-os-error-on-vista/</link>
		<comments>http://www.dandev.com/2009/03/punkbuster-invalid-os-error-on-vista/#comments</comments>
		<pubDate>Sat, 21 Mar 2009 00:30:41 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Games]]></category>
		<category><![CDATA[Life]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[Error]]></category>
		<category><![CDATA[Invalid O/S]]></category>
		<category><![CDATA[PunkBuster]]></category>
		<category><![CDATA[Vista]]></category>
		<category><![CDATA[Windows]]></category>

		<guid isPermaLink="false">http://www.dandev.com/?p=144</guid>
		<description><![CDATA[Just a quick note, for anyone having trouble playing games that have Punkbuster integrated with it. If you&#8217;re getting an &#8220;Invalid O/S Error&#8221; when you try to join a server, this is related to the game not having enough permissions to  open/alter certain files. There have been several fixes suggested, and some work for some [...]]]></description>
			<content:encoded><![CDATA[<p>Just a quick note, for anyone having trouble playing games that have Punkbuster integrated with it. If you&#8217;re getting an &#8220;Invalid O/S Error&#8221; when you try to join a server, this is related to the game not having enough permissions to  open/alter certain files. There have been several fixes suggested, and some work for some people&#8230; some work for others. The one that seems to solve most people&#8217;s problem is running the game as an administrator. Simply being logged in as an administrator isn&#8217;t enough because your programs are still executed with limited privileges. You just have to confirm it when they&#8217;re needed(if you have UAC enabled).</p>
<p>To run as administrator you have a couple of options.. if you&#8217;re running a home version of Vista, you might not have some of them:</p>
<ol>
<li>Right-click on the Shortcut or game executable and click Run as Administrator</li>
<li>Right-click on the game executable and Click Properties-&gt;Compatibility-&gt;Check the &#8220;Run as Administrator&#8221; box, Apply</li>
<li>Right-click on the Shortcut, Click the &#8220;Shortcut&#8221; tab-&gt;Advanced, Check the &#8220;Run as Administrator&#8221; box, Apply</li>
</ol>
<p>Now, with that said, none of these would work properly for me. The only solution I could find that would work is downloading <a href="http://www.evenbalance.com/index.php?page=pbsetup.php" target="_blank">this update from PunkBuster</a>, adding my game, and hitting Update. Once updated the game ran fine without giving it extra privileges.</p>
<p>Good luck!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dandev.com/2009/03/punkbuster-invalid-os-error-on-vista/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Flex Tips: Keyboard Codes</title>
		<link>http://www.dandev.com/2009/03/flex-tips-keyboard-codes/</link>
		<comments>http://www.dandev.com/2009/03/flex-tips-keyboard-codes/#comments</comments>
		<pubDate>Tue, 10 Mar 2009 09:40:22 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[charcode]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[keyboard]]></category>
		<category><![CDATA[keyboardevent]]></category>
		<category><![CDATA[keycode]]></category>

		<guid isPermaLink="false">http://www.dandev.com/?p=132</guid>
		<description><![CDATA[If you ever have the urge to capture a specific key pressed in Flex or AS3 in general, there is an excellent list of the keycodes, and costants you can use to represent them in your code here: http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/ui/Keyboard.html You can use them statically(without instantiating an object) like so: trace&#40;Keyboard.TAB&#41;; // 9]]></description>
			<content:encoded><![CDATA[<p>If you ever have the urge to capture a specific key pressed in Flex or AS3 in general, there is an excellent list of the keycodes, and costants you can use to represent them in your code here: <a href="http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/ui/Keyboard.html" target="_blank">http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/ui/Keyboard.html</a></p>
<p><img class="alignnone size-medium wp-image-133" title="3-10-2009-5-36-24-am" src="http://www.dandev.com/wp-content/uploads/2009/03/3-10-2009-5-36-24-am-300x300.png" alt="3-10-2009-5-36-24-am" width="300" height="300" /></p>
<p>You can use them statically(without instantiating an object) like so:</p>
<div style="background-color:#222">

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #004993;">trace</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">Keyboard</span>.<span style="color: #004993;">TAB</span><span style="color: #000000;">&#41;</span>; <span style="color: #009900;">// 9</span></pre></div></div>

</div>
]]></content:encoded>
			<wfw:commentRss>http://www.dandev.com/2009/03/flex-tips-keyboard-codes/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Optimizing the SWF filesize for your Flex App</title>
		<link>http://www.dandev.com/2009/03/optimizing-the-swf-filesize-for-your-flex-app/</link>
		<comments>http://www.dandev.com/2009/03/optimizing-the-swf-filesize-for-your-flex-app/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 14:32:20 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Pics]]></category>
		<category><![CDATA[adobe]]></category>
		<category><![CDATA[filesize]]></category>
		<category><![CDATA[flashdevelop]]></category>
		<category><![CDATA[flex builder]]></category>
		<category><![CDATA[hueristics]]></category>
		<category><![CDATA[optimize]]></category>
		<category><![CDATA[rsl]]></category>
		<category><![CDATA[sdk]]></category>
		<category><![CDATA[size]]></category>
		<category><![CDATA[swf]]></category>

		<guid isPermaLink="false">http://www.dandev.com/?p=118</guid>
		<description><![CDATA[While wandering through the ginormous forest that is Flex I&#8217;ve noticed how the filesize grows exponentially when you start to add a lot of content, or some external libraries. This is annoying, especially when the app I&#8217;m making is supposed to be used by a large group of people at the company I work for. [...]]]></description>
			<content:encoded><![CDATA[<p>While wandering through the ginormous forest that is Flex I&#8217;ve noticed how the filesize grows exponentially when you start to add a lot of content, or some external libraries. This is annoying, especially when the app I&#8217;m making is supposed to be used by a large group of people at the company I work for. So, I went looking for ways to slim it down, and I have found a couple of gems that work really well. First of all there is an excellent video posted by Serge Jespers of the Adobe Platform Evangelism &#8211; European team that gives some detailed tips with an example of how to make your application smaller with Flex Builder.</p>
<p>Namely:</p>
<ol>
<li>Use &#8220;Release&#8221; build &#8212; by default the SWF is built with Debug mode and has debug &amp; profiler code in it that your application doesn&#8217;t need.</li>
<li>Move your panels into modules(see movie)</li>
<li>Use the RSLs instead of compiling the Flex framework into your SWF</li>
</ol>
<p>Using these suggestions has removed over 500K from my app.</p>
<p>The video shows you how to do all of these in <strong>Flex Builder</strong>.</p>
<hr />
<h2>Here is how you can perform the same optimizations in <strong>FlashDevelop</strong>:</h2>
<p>Number 1 is fairly easy: Just find the only drop-down menu in the main interface, and change it from &#8220;Debug&#8221; to &#8220;Release&#8221;.</p>
<p><img class="alignnone size-medium wp-image-119" title="tip1" src="http://www.dandev.com/wp-content/uploads/2009/03/tip1-300x45.png" alt="tip1" width="300" height="45" /></p>
<p>With number 2 you follow the same instructions, but you can get to the menu to add an item by right-clicking on your project in the &#8220;Project&#8221; pane of the right column, or by going to &#8220;File&#8221;-&gt;&#8221;New&#8221;.</p>
<p><img class="alignnone size-medium wp-image-120" title="tip2" src="http://www.dandev.com/wp-content/uploads/2009/03/tip2-244x300.png" alt="tip2" width="244" height="300" /></p>
<p>Number 3 is slightly more complicated. First you need to get to your project&#8217;s properties menu, which you can do one of several ways. Here is a screenshot of going through the &#8220;Project&#8221; menu:</p>
<p><img class="alignnone size-full wp-image-121" title="tip3-1" src="http://www.dandev.com/wp-content/uploads/2009/03/tip3-1.png" alt="tip3-1" width="156" height="190" /></p>
<p>Then, click on the &#8220;Compiler Options&#8221; tab, and select the &#8220;Advanced Compiler Options&#8221; by clicking on it and clicking the &#8220;&#8230;&#8221; button. Then add the line &#8220;-static-rsls=false&#8221; to it as shown(or append it on a new line if you have other options set already).</p>
<p><img class="alignnone size-medium wp-image-122" title="tip3-3" src="http://www.dandev.com/wp-content/uploads/2009/03/tip3-3-300x193.png" alt="tip3-3" width="300" height="193" /></p>
<p>Now, you have to copy the &#8220;framework_3.2.*.swf&#8221; and &#8220;framework_3.2.*.swz&#8221; files to the &#8220;bin&#8221; directory in your project, and upload them to your site when you upload your app. These contain the Flex framework that will be cached by the Flash Player when you run your app. They are located in &#8220;flex_sdk_3\frameworks\rsls&#8221; in the Flex 3 SDK folder. Note that whatever version of the SDK you compiled your app with is the version you have to use the RSLs from. If you compile your app on on build, and then try to use the RSLs from another one(ie. you switched machines/reinstalled the sdk/use another ide that uses a different sdk version, etc.) you will get a message when your app loads about RSL 1 loading(but it never will). So, if you reinstall the SDK, or any of the things I mentioned recompile your app with the new version. *phew*</p>
<p>I hope these tips are helpful to you!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dandev.com/2009/03/optimizing-the-swf-filesize-for-your-flex-app/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flex: getType() schmettype</title>
		<link>http://www.dandev.com/2009/03/flex-gettype-schmettype/</link>
		<comments>http://www.dandev.com/2009/03/flex-gettype-schmettype/#comments</comments>
		<pubDate>Sun, 08 Mar 2009 00:31:54 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[Alert]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[describeType()]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[getType()]]></category>

		<guid isPermaLink="false">http://www.dandev.com/?p=112</guid>
		<description><![CDATA[I&#8217;ve started dabbling in Flex recently, and something that was apparent(and annoying at times) to me  early on was it&#8217;s strongly-typed nature. Not type as in a keyboard, but variable types. Flex cares very much whether your variable is an Array, or ArrayCollection as it&#8217;s knowledge of types is key to it&#8217;s processing. This is [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve started dabbling in Flex recently, and something that was apparent(and annoying at times) to me  early on was it&#8217;s strongly-typed nature. Not type as in a keyboard, but variable types. Flex cares very much whether your variable is an Array, or ArrayCollection as it&#8217;s knowledge of types is key to it&#8217;s processing. This is quite the converse to a language like PHP, which is loosely-typed to say the least.</p>
<p>Anyway, I came upon a case where I needed to know the type a variable was so I could cast it properly(and for debugging), and I found that Flex doesn&#8217;t have a function to simply return a variable&#8217;s type. There is describeType(), but this returns an XML object with all of the information about the variable &#8212; not just the type. Plus you have to import the proper class to use it. So, I threw together this function quickly that will perform the import, and return/alert the type as needed:</p>
<div style="background-color: #222">

<div class="wp_syntax"><div class="code"><pre class="actionscript3" style="font-family:monospace;"><span style="color: #0033ff; font-weight: bold;">private</span> <span style="color: #339966; font-weight: bold;">function</span> getType<span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span><span style="color: #000000; font-weight: bold;">:*</span>, alert<span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">Boolean</span> = <span style="color: #0033ff; font-weight: bold;">false</span><span style="color: #000000;">&#41;</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">String</span>
<span style="color: #000000;">&#123;</span>
	<span style="color: #0033ff; font-weight: bold;">import</span> <span style="color: #004993;">flash.utils</span>.<span style="color: #000000; font-weight: bold;">*</span>;
	<span style="color: #6699cc; font-weight: bold;">var</span> <span style="color: #004993;">description</span><span style="color: #000000; font-weight: bold;">:</span><span style="color: #004993;">XML</span> = <span style="color: #004993;">describeType</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">value</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #0033ff; font-weight: bold;">if</span><span style="color: #000000;">&#40;</span>alert<span style="color: #000000;">&#41;</span>
		Alert.<span style="color: #004993;">show</span><span style="color: #000000;">&#40;</span><span style="color: #004993;">description</span><span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span>.@<span style="color: #004993;">name</span><span style="color: #000000;">&#41;</span>;
	<span style="color: #0033ff; font-weight: bold;">return</span> <span style="color: #004993;">description</span><span style="color: #000000;">&#91;</span><span style="color: #000000; font-weight:bold;">0</span><span style="color: #000000;">&#93;</span>.@<span style="color: #004993;">name</span>;
<span style="color: #000000;">&#125;</span></pre></div></div>

</div>
<p>I hope someone else can find it useful. <img src='http://www.dandev.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.dandev.com/2009/03/flex-gettype-schmettype/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Fatal error: Cannot redeclare pclziputilpathreduction()</title>
		<link>http://www.dandev.com/2009/01/cannon-redeclare-pclziputilpathreduction/</link>
		<comments>http://www.dandev.com/2009/01/cannon-redeclare-pclziputilpathreduction/#comments</comments>
		<pubDate>Sun, 25 Jan 2009 14:39:23 +0000</pubDate>
		<dc:creator>admin</dc:creator>
				<category><![CDATA[Development]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[WordPress]]></category>
		<category><![CDATA[fatal error]]></category>
		<category><![CDATA[pclziputilpathreduction]]></category>
		<category><![CDATA[wpau]]></category>

		<guid isPermaLink="false">http://www.dandev.com/?p=104</guid>
		<description><![CDATA[I&#8217;ve seen this in a couple of places already, so I&#8217;ll go ahead an post it: If you&#8217;re getting an error with your WordPress install similar to: &#8220;Fatal error: Cannot redeclare pclziputilpathreduction()&#8221; and you&#8217;re using WP 2.7+, disable your WPAU &#8211; WordPress Automatic Upgrade plugin. This error is caused because in version 2.7 WordPress added [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve seen this in a couple of places already, so I&#8217;ll go ahead an post it: If you&#8217;re getting an error with your WordPress install similar to: &#8220;Fatal error: Cannot redeclare pclziputilpathreduction()&#8221; and you&#8217;re using WP 2.7+, disable your WPAU &#8211; WordPress Automatic Upgrade plugin. This error is caused because in version 2.7 WordPress added the ability to update itself, so this plugin is no longer needed. Here is an image of what the deactivated plugin should look like on the plugins page:<br />
<img class="alignnone size-full wp-image-105" title="wpau-deactivated" src="http://www.dandev.com/wp-content/uploads/2009/01/wpau-deactivated.png" alt="wpau-deactivated" width="585" height="167" /></p>
<p>Update: This appears to be fixed in the latest version of the plugin. I was able to enable the plugin and browse around without getting errors. But I don&#8217;t see the need for this plugin in WP installs newer than 2.6 anyway.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.dandev.com/2009/01/cannon-redeclare-pclziputilpathreduction/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
	</channel>
</rss>
