<?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>Flassari.is</title>
	<atom:link href="http://flassari.is/feed/" rel="self" type="application/rss+xml" />
	<link>http://flassari.is</link>
	<description>Just another WordPress weblog</description>
	<lastBuildDate>Mon, 19 Jul 2010 16:09:38 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Re-dispatch an event</title>
		<link>http://flassari.is/2010/07/re-dispatch-an-event/</link>
		<comments>http://flassari.is/2010/07/re-dispatch-an-event/#comments</comments>
		<pubDate>Mon, 19 Jul 2010 16:09:38 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[dispatch]]></category>
		<category><![CDATA[event]]></category>
		<category><![CDATA[re-dispatch]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=331</guid>
		<description><![CDATA[I just stumbled upon a sexy and simple way to forward an Event that I wanted to share with you:
myEventDispatcher.addEventListener("someEvent", dispatchEvent);
]]></description>
			<content:encoded><![CDATA[<p>I just stumbled upon a sexy and simple way to forward an Event that I wanted to share with you:</p>
<pre class="brush: as3">myEventDispatcher.addEventListener("someEvent", dispatchEvent);</pre>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2010/07/re-dispatch-an-event/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 &#8220;with&#8221; keyword and casting</title>
		<link>http://flassari.is/2010/07/as3-with-keyword-and-casting/</link>
		<comments>http://flassari.is/2010/07/as3-with-keyword-and-casting/#comments</comments>
		<pubDate>Mon, 12 Jul 2010 13:40:40 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[as]]></category>
		<category><![CDATA[cast]]></category>
		<category><![CDATA[casting]]></category>
		<category><![CDATA[keyword]]></category>
		<category><![CDATA[with]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=321</guid>
		<description><![CDATA[I&#8217;ve rarely (if ever) used the &#8220;with&#8221; keyword in as3, but I recently found a neat trick to use it with.
When I quickly need to cast an object to access a few methods/properties I don&#8217;t always want to
create a new casted variable:
var child:DisplayObject = getChildThatMightBeMovieClip();

if (child is MovieClip) {
	var childAsMc:MovieClip = child as MovieClip;
	trace(childAsMc.numChildren);
	trace(childAsMc.currentFrame);
}
or cast [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve rarely (if ever) used the <a href="http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/statements.html#with">&#8220;with&#8221; keyword</a> in as3, but I recently found a neat trick to use it with.</p>
<p>When I quickly need to cast an object to access a few methods/properties I don&#8217;t always want to<br />
create a new casted variable:</p>
<pre class="brush: as3">var child:DisplayObject = getChildThatMightBeMovieClip();

if (child is MovieClip) {
	var childAsMc:MovieClip = child as MovieClip;
	trace(childAsMc.numChildren);
	trace(childAsMc.currentFrame);
}</pre>
<p>or cast it every single time:</p>
<pre class="brush: as3">var child:DisplayObject = getChildThatMightBeMovieClip();

if (child is MovieClip) {
	trace((child as MovieClip).numChildren);
	trace((child as MovieClip).currentFrame);
}</pre>
<p>Using the &#8220;with&#8221; keyword, we can temporarily cast it without creating a temporary casted variable or casting it again and again:</p>
<pre class="brush: as3">var child:DisplayObject = getChildThatMightBeMovieClip();

if (child is MovieClip) {
	with (child as MovieClip) {
		trace(numChildren);
		trace(currentFrame);
	}
}</pre>
<p>Elegant =)</p>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2010/07/as3-with-keyword-and-casting/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Global error handling with Flash Player 10.1</title>
		<link>http://flassari.is/2010/06/global-error-handling-with-flash-player-10-1/</link>
		<comments>http://flassari.is/2010/06/global-error-handling-with-flash-player-10-1/#comments</comments>
		<pubDate>Wed, 23 Jun 2010 12:25:44 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[10.1]]></category>
		<category><![CDATA[4.1]]></category>
		<category><![CDATA[as]]></category>
		<category><![CDATA[error]]></category>
		<category><![CDATA[exception]]></category>
		<category><![CDATA[global]]></category>
		<category><![CDATA[handler]]></category>
		<category><![CDATA[handling]]></category>
		<category><![CDATA[player]]></category>
		<category><![CDATA[SDK]]></category>
		<category><![CDATA[uncaught]]></category>
		<category><![CDATA[uncaughtError]]></category>
		<category><![CDATA[uncaughterrorhandler]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=303</guid>
		<description><![CDATA[Since the official release of Flash Player 10.1 is out, now might be a good time to start implementing the global error handler.

When this is written, flash builder 4 doesn't have a native way that lets you use it, so we have to do a little mix.
The global error handler works by adding an event to the uncaughtErrorEvents property of the loaderInfo of the application.
There are currently two methods of getting it to work [...]]]></description>
			<content:encoded><![CDATA[<p>Since the official release of Flash Player 10.1 is out, now might be a good time to start implementing the global error handler.</p>
<p>When this is written, flash builder 4 doesn&#8217;t have a native way that lets you use it, so we have to do a little mix.<strong> (Update: The update is out.)</strong><br />
The global error handler works by adding an event to the uncaughtErrorEvents property of the loaderInfo of the application.<br />
There are currently two methods of getting it to work.</p>
<h3>Method 1 - The backwards compatible one:</h3>
<p>Here the code doesn&#8217;t crash in flash player 9/10, but the error handling will only work in 10.1.</p>
<pre class="brush: as3">if(loaderInfo.hasOwnProperty("uncaughtErrorEvents")){
	IEventDispatcher(loaderInfo["uncaughtErrorEvents"]) .addEventListener("uncaughtError", uncaughtErrorHandler);
}</pre>
<pre class="brush: as3">private function uncaughtErrorHandler(e:Event):void {
	trace("Global error:", e);
}</pre>
<h3>Method 2 - The type safe one:</h3>
<p>Get the <a href="http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+4">Flex 4.1 SDK</a> if you haven&#8217;t already and choose that one as your project&#8217;s SDK.</p>
<p>Now you can use the new global error handling like it was meant to be used:</p>
<pre class="brush: as3">import flash.events.UncaughtErrorEvent;

loaderInfo.uncaughtErrorEvents.addEventListener( UncaughtErrorEvent.UNCAUGHT_ERROR, uncaughtErrorHandler);

private function uncaughtErrorHandler( e:UncaughtErrorEvent):void {
	trace("Global error:", e);
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2010/06/global-error-handling-with-flash-player-10-1/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Flv and f4v files not found on IIS</title>
		<link>http://flassari.is/2010/05/flv-and-f4v-files-not-found-on-iis/</link>
		<comments>http://flassari.is/2010/05/flv-and-f4v-files-not-found-on-iis/#comments</comments>
		<pubDate>Wed, 05 May 2010 11:51:39 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[404]]></category>
		<category><![CDATA[f4v]]></category>
		<category><![CDATA[flv]]></category>
		<category><![CDATA[IIS]]></category>
		<category><![CDATA[MIME]]></category>
		<category><![CDATA[not found]]></category>
		<category><![CDATA[server]]></category>
		<category><![CDATA[type]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=291</guid>
		<description><![CDATA[If your IIS server throws a "404 not found" page every time you try to fetch a flash video file (flv or f4v), your server might be missing the MIME type declaration.
In the Internet Information Services Manager [...]]]></description>
			<content:encoded><![CDATA[<p>If your IIS server throws a &#8220;404 not found&#8221; page every time you try to fetch a flash video file (flv or f4v), your server might be missing the MIME type declaration.<br />
In the Internet Information Services Manager, right click the local computer server and select Properties, open MIME types, click New and enter the following for flv <a href="http://kb2.adobe.com/cps/194/tn_19439.html">(technote)</a>:</p>
<pre>Associated Extension box: .FLV
MIME Type box: flv-application/octet-stream</pre>
<p>and for f4v <a href="http://kb2.adobe.com/cps/402/kb402865.html">(technote)</a>:</p>
<pre>Associated Extension box: .F4V
MIME Type box: video/mp4</pre>
<p>Digging around the internet, I&#8217;ve found people reporting these MIME types working too;<br />
video/x-flv for .flv files, and<br />
video/f4v for .f4v files.</p>
<p>Be advised that you may have to restart IIS for the changes to work.</p>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2010/05/flv-and-f4v-files-not-found-on-iis/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash focus border in Firefox</title>
		<link>http://flassari.is/2010/03/flash-focus-border-in-firefox/</link>
		<comments>http://flassari.is/2010/03/flash-focus-border-in-firefox/#comments</comments>
		<pubDate>Mon, 22 Mar 2010 23:44:23 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[1 pixel]]></category>
		<category><![CDATA[active]]></category>
		<category><![CDATA[border]]></category>
		<category><![CDATA[dotted]]></category>
		<category><![CDATA[firefox]]></category>
		<category><![CDATA[flashcomguru]]></category>
		<category><![CDATA[focus]]></category>
		<category><![CDATA[swf]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=280</guid>
		<description><![CDATA[I've noticed recently that Firefox has started showing a 1px dotted border around flash objects when I click on them. It didn't bother me enough to look for a solution, but today the solution found me [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve noticed recently that Firefox has started showing a 1px dotted border around flash objects when I click on them. It didn&#8217;t bother me enough to look for a solution, but today the solution found me.<br />
In my rss reader a <a href="http://www.flashcomguru.com/index.cfm/2010/3/22/prevent-swf-border-firefox">blog post</a> from <a href="http://www.flashcomguru.com">FlashComGuru</a> pops up, showing how to get rid of this annoyance, pasted here for your convenience:</p>
<p><i>Simply add this to your page&#8217;s stylesheet:</i></p>
<pre class="brush: html">
a:focus, object:focus { outline: none; -moz-outline-style: none; }
</pre>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2010/03/flash-focus-border-in-firefox/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Windows Mobile not showing contacts</title>
		<link>http://flassari.is/2010/03/windows-mobile-not-showing-contacts/</link>
		<comments>http://flassari.is/2010/03/windows-mobile-not-showing-contacts/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 15:32:45 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[Windows Mobile]]></category>
		<category><![CDATA[call]]></category>
		<category><![CDATA[contacts]]></category>
		<category><![CDATA[europe]]></category>
		<category><![CDATA[mobile]]></category>
		<category><![CDATA[number]]></category>
		<category><![CDATA[phone]]></category>
		<category><![CDATA[receive]]></category>
		<category><![CDATA[registry]]></category>
		<category><![CDATA[windows]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=272</guid>
		<description><![CDATA[I had a problem with my windows mobile phone not showing me the name of who was calling me (it only showed the number). [Read full post for my solution]]]></description>
			<content:encoded><![CDATA[<p>I had a problem with my windows mobile phone not showing me the name of who was calling me (it only showed the number).<br />
The deal is that I store every contact in my phone in this format:<br />
+354 xxx xxxx<br />
That is, first the country code, and then the phone number. When I receive a sms, my phone service provider sends the number in the same format, but when I get a phone call it omits the country code.</p>
<p>I couldn&#8217;t believe that WM couldn&#8217;t figure this out, so after a little searching around I found out that WM actually does figure the numbers out, but only for 8 digit local numbers. Nothing a little registry hack can&#8217;t fix.</p>
<p>To fix this, first download <a href="http://www.smartphonefreeware.org/download/phm-registry-editor-0.70">PHM Registry Editor</a> (works for WM 6.0-6.5).<br />
Then, edit the registry value</p>
<pre>HKCU\ControlPanel\Phone\CallIDMatch</pre>
<p>to be 7 instead of the default 8.</p>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2010/03/windows-mobile-not-showing-contacts/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Color.setTint() alternative (AS3)</title>
		<link>http://flassari.is/2010/02/color-settint-alternative/</link>
		<comments>http://flassari.is/2010/02/color-settint-alternative/#comments</comments>
		<pubDate>Mon, 01 Feb 2010 15:49:24 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[alternative]]></category>
		<category><![CDATA[class]]></category>
		<category><![CDATA[color]]></category>
		<category><![CDATA[colortransform]]></category>
		<category><![CDATA[multiplier]]></category>
		<category><![CDATA[setTint]]></category>
		<category><![CDATA[source]]></category>
		<category><![CDATA[tint]]></category>
		<category><![CDATA[transform]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=266</guid>
		<description><![CDATA[I once discovered a really cool feature of the color class that lets you set the tint of an object via its color transform object using the setTint function.
The bad news though is that it is in the fl namespace, so if you're developing outside of the Flash IDE you have no access to that class natively, so here is how to replicate that functionality without the Color class [...]]]></description>
			<content:encoded><![CDATA[<p>I once discovered a really cool feature of the color class that lets you set the tint of an object via its color transform object using the setTint function.<br />
The bad news though is that the Color class is in the <strong>fl</strong> namespace, so if you&#8217;re developing outside of the Flash IDE you have no access to that class natively, so here is how to replicate that functionality without the Color class:</p>
<p>Tinting with the color class:</p>
<pre class="brush: as3">import fl.motion.Color;
// Tint the movie clip 50% with the color 0xFF9933
var c:Color = new Color();
c.setTint(0xFF9933, 0.5);
myMovieClip.transform.colorTransform = c;</pre>
<p>Tinting without the color class:</p>
<pre class="brush: as3">import flash.geom.ColorTransform;

// Tint the movie clip 50% with the color 0xFF9933
var tintColor:uint = 0xFF9933;
var tintMultiplier:Number = 0.5;
setTint(myMovieClip, tintColor, tintMultiplier);

function setTint(displayObject:DisplayObject, tintColor:uint, tintMultiplier:Number):void {
	var colTransform:ColorTransform = new ColorTransform();
	colTransform.redMultiplier = colTransform.greenMultiplier = colTransform.blueMultiplier = 1-tintMultiplier;
	colTransform.redOffset = Math.round(((tintColor &#038; 0xFF0000) >> 16) * tintMultiplier);
	colTransform.greenOffset = Math.round(((tintColor &#038; 0x00FF00) >> 8) * tintMultiplier);
	colTransform.blueOffset = Math.round(((tintColor &#038; 0x0000FF)) * tintMultiplier);
	displayObject.transform.colorTransform = colTransform;
}</pre>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2010/02/color-settint-alternative/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pie mask in AS3</title>
		<link>http://flassari.is/2009/11/pie-mask-in-as3/</link>
		<comments>http://flassari.is/2009/11/pie-mask-in-as3/#comments</comments>
		<pubDate>Fri, 13 Nov 2009 17:02:17 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Math]]></category>
		<category><![CDATA[mask]]></category>
		<category><![CDATA[percentage]]></category>
		<category><![CDATA[pie]]></category>
		<category><![CDATA[progress]]></category>
		<category><![CDATA[timer]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=240</guid>
		<description><![CDATA[Sometimes I have the need for a rotational progress bar that acts like a pie growing bigger (or smaller if that strikes your fancy). As usual, I made my own =) [...]]]></description>
			<content:encoded><![CDATA[<p>Sometimes I have the need for a rotational progress bar that acts like a pie growing bigger (or smaller if that strikes your fancy). As usual, I made my own =)<br />
The function drawPieMask takes first the <strong>graphics</strong> object of the displayObject instance and draws a part of pie on it, <strong>percentage</strong> set&#8217;s how big the part is.<br />
If you want to offset the rotation of the pie (it starts to the right by default) you can set the <strong>rotation</strong> parameter. Note that rotation is in radians, not degrees, but you can multiply your degrees by (Math.PI/180) to convert to radians.<br />
Lastly, the <strong>sides</strong> property determines how many sides the circle drawn in the mask has. You can see an example of different pie masks after the code.</p>
<p>To make the code as customizable as possible, it does not make a call to beginFill in case you want to set your own fill (or gradientfill even?).<br />
If you just want to use it as a basic mask, just call beginFill(0) before and endFill() after the call to drawPieMask.</p>
<pre class="brush: as3">function drawPieMask(graphics:Graphics, percentage:Number, radius:Number = 50, x:Number = 0, y:Number = 0, rotation:Number = 0, sides:int = 6):void {
	// graphics should have its beginFill function already called by now
	graphics.moveTo(x, y);
	if (sides < 3) sides = 3; // 3 sides minimum
	// Increase the length of the radius to cover the whole target
	radius /= Math.cos(1/sides * Math.PI);
	// Shortcut function
	var lineToRadians:Function = function(rads:Number):void {
		graphics.lineTo(Math.cos(rads) * radius + x, Math.sin(rads) * radius + y);
	};
	// Find how many sides we have to draw
	var sidesToDraw:int = Math.floor(percentage * sides);
	for (var i:int = 0; i <= sidesToDraw; i++)
		lineToRadians((i / sides) * (Math.PI * 2) + rotation);
	// Draw the last fractioned side
	if (percentage * sides != sidesToDraw)
		lineToRadians(percentage * (Math.PI * 2) + rotation);
}</pre>
<p>Example of different sides values. The last circle has a pie with 3 sides as a mask.<br />
<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="450" height="310"><param name="movie" value="/wp-content/uploads/2009/11/PieMaskExample.swf" /><!--[if !IE]>--><object type="application/x-shockwave-flash" data="/wp-content/uploads/2009/11/PieMaskExample.swf" width="450" height="310"><!--<![endif]-->
<div>
<p><a href="http://www.adobe.com/go/getflashplayer"><img src="http://www.adobe.com/images/shared/download_buttons/get_flash_player.gif" alt="Get Adobe Flash player" /></a></p>
<p><!--[if !IE]>--></object><!--<![endif]--></object></p>
<p>You can get the <a href='http://flassari.is/wp-content/uploads/2009/11/PieMaskExample.zip'>example fla here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2009/11/pie-mask-in-as3/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Wordpress replaces -- with –</title>
		<link>http://flassari.is/2009/11/wordpress-replaces-two-hyphens-with-one/</link>
		<comments>http://flassari.is/2009/11/wordpress-replaces-two-hyphens-with-one/#comments</comments>
		<pubDate>Thu, 05 Nov 2009 08:57:37 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[HTML]]></category>
		<category><![CDATA[PHP]]></category>
		<category><![CDATA[--]]></category>
		<category><![CDATA[arrow]]></category>
		<category><![CDATA[edit]]></category>
		<category><![CDATA[formatting]]></category>
		<category><![CDATA[formatting.php]]></category>
		<category><![CDATA[hyphen]]></category>
		<category><![CDATA[hyphens]]></category>
		<category><![CDATA[line]]></category>
		<category><![CDATA[lines]]></category>
		<category><![CDATA[replace]]></category>
		<category><![CDATA[swfobject]]></category>
		<category><![CDATA[upgrade]]></category>
		<category><![CDATA[wordpress]]></category>
		<category><![CDATA[–]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=202</guid>
		<description><![CDATA[I just recently upgraded my wordpress system, and now it does not show my embedded flash at all. I would be surprised, but this isn't the first time this happens.
The last time I upgraded I found a blog post on how to fix it, but it's been a while and I just can't find that post any more, so I'm writing my own. [...]]]></description>
			<content:encoded><![CDATA[<p>I just recently upgraded my wordpress system, and now it does not show my embedded flash at all. I would be surprised, but this isn&#8217;t the first time this happens.<br />
The last time I upgraded I found a blog post on how to fix it, but it&#8217;s been a while and I just can&#8217;t find that post any more, so I&#8217;m writing my own.</p>
<p>So this is the deal: I always embed my flash using the html code that <a href="http://code.google.com/p/swfobject/wiki/documentation#How_to_embed_Flash_Player_content_using_SWFObject_static_publish">SWFobject recommends</a>:</p>
<pre class="brush: html">
&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="780" height="420"&gt;
  &lt;param name="movie" value="myContent.swf" /&gt;
  &lt;!--[if !IE]&gt;--&gt;
  &lt;object type="application/x-shockwave-flash" data="myContent.swf" width="780" height="420"&gt;
  &lt;!--&lt;![endif]--&gt;
    &lt;p>Alternative content&lt;/p&gt;
  &lt;!--[if !IE]&gt;--&gt;
  &lt;/object&gt;
  &lt;!--&lt;![endif]--&gt;
&lt;/object&gt;
</pre>
<p>After the upgrade, instead of my pretty flash objects I get this funky arrow in my posts:</p>
<pre>
–&gt;
</pre>
<p>And if I look at the source, it now looks like this:</p>
<pre class="brush: html">
&lt;object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" width="780" height="420"&gt;
  &lt;param name="movie" value="myContent.swf" /&gt;
  &lt;!--[if !IE]&gt;&amp;#8211;&gt;
  &lt;object type="application/x-shockwave-flash" data="myContent.swf" width="780" height="420"&gt;
  &lt;!--&lt;![endif]--&gt;
    &lt;p>Alternative content&lt;/p&gt;
  &lt;!--[if !IE]&gt;&amp;#8211;&gt;
  &lt;/object&gt;
  &lt;!--&lt;![endif]--&gt;
&lt;/object&gt;
</pre>
<p>Apparently wordpress replaces<br />
&lt;!--[if !IE]&gt;<span style="color: #006600; font-weight: bold;">--</span>&gt;<br />
with<br />
&lt;!--[if !IE]&gt;<span style="color: red; font-weight: bold;">&amp;#8211;</span>&gt;, but when I look into my post to edit it, it still looks fine there.</p>
<p>The reason is that wordpress is trying to make your writing prettier, even if you don&#8217;t use the wysiwyg editor. To stop wordpress from doing that, go into your wordpress directory and edit the file wp-includes/formatting.php. On lines 55 and 56 (for version 2.8.5) you should see this text:</p>
<pre class="brush: php">
$static_characters = array_merge(array('---', ' -- ', '--', ' - ', 'xn&amp;#8211;', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney);
$static_replacements = array_merge(array('&amp;#8212;', ' &amp;#8212; ', '&amp;#8211;', ' &amp;#8211; ', 'xn--', '&amp;#8230;', $opening_quote, '&amp;#8217;s', $closing_quote, ' &amp;#8482;'),
</pre>
<p>If not, just look for it, it should be in the top page or two.<br />
Now all you have to do is comment out the array elements you don&#8217;t want wordpress to replace. My lines look like this:</p>
<pre class="brush: php">
$static_characters = array_merge(array(/*'---', ' -- ', '--', ' - ', */'xn&amp;#8211;', '...', '``', '\'s', '\'\'', ' (tm)'), $cockney);
$static_replacements = array_merge(array(/*'&amp;#8212;', ' &amp;#8212; ', '&amp;#8211;', ' &amp;#8211; ', */'xn--', '&amp;#8230;', $opening_quote, '&amp;#8217;s', $closing_quote, ' &amp;#8482;'),
</pre>
<p>Hope this helps.</p>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2009/11/wordpress-replaces-two-hyphens-with-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Profiling AS3/Flex applications</title>
		<link>http://flassari.is/2009/10/profiling-as3flex-applications/</link>
		<comments>http://flassari.is/2009/10/profiling-as3flex-applications/#comments</comments>
		<pubDate>Tue, 06 Oct 2009 12:22:14 +0000</pubDate>
		<dc:creator>Flassari</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Adobe TV]]></category>
		<category><![CDATA[builder]]></category>
		<category><![CDATA[Jun Heider]]></category>
		<category><![CDATA[memory]]></category>
		<category><![CDATA[performance]]></category>
		<category><![CDATA[profiler]]></category>
		<category><![CDATA[profiling]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://flassari.is/?p=185</guid>
		<description><![CDATA[I'm working on a big project and had some problems with memory leaks. After some google-ing around I found this great video on AdobeTV by Jun Heider where he shows you how to profile memory and performance [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;m working on a big project and was having some problems with memory leaks. After some google-ing around I found this great video on <a href="http://tv.adobe.com/watch/360flex-conference/using-the-flex-builder-3-profiler-by-jun-heider/">AdobeTV</a> by <a href="http://www.iheartair.com/">Jun Heider</a> where he shows you how to profile both the memory and performance of your AS3 or Flex application.<br />
It&#8217;s pretty thorough and it is little over one hour in length.</p>
<p><object width="425" height="256"><param name="movie" value="http://images.tv.adobe.com//swf/player.swf"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><param name="FlashVars" value="fileID=2165&#038;context=141&#038;embeded=true&#038;environment=production"></param><embed src="http://images.tv.adobe.com//swf/player.swf" flashvars="fileID=2165&#038;context=141&#038;embeded=true&#038;environment=production" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="425" height="256"></embed></object></p>
]]></content:encoded>
			<wfw:commentRss>http://flassari.is/2009/10/profiling-as3flex-applications/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
