<?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>yourpalmark &#187; Flash</title>
	<atom:link href="http://yourpalmark.com/category/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://yourpalmark.com</link>
	<description>lulz</description>
	<lastBuildDate>Thu, 29 Dec 2011 02:34:14 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	
		<item>
		<title>Updated Solution: AS3 Security Error #2122 with 300 Redirects</title>
		<link>http://yourpalmark.com/2011/12/28/updated-solution-as3-security-error-2122-with-300-redirects/</link>
		<comments>http://yourpalmark.com/2011/12/28/updated-solution-as3-security-error-2122-with-300-redirects/#comments</comments>
		<pubDate>Thu, 29 Dec 2011 02:32:59 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://yourpalmark.com/?p=600</guid>
		<description><![CDATA[Quite a while ago Steven Sacks posted a solution to 300 redirects when loading images in Flash.
This seemed to work most of the time but the solution does not work every time (at least anymore).]]></description>
			<content:encoded><![CDATA[<p>Quite a while ago Steven Sacks <a href="http://www.stevensacks.net/2008/12/23/solution-as3-security-error-2122-with-300-redirects/">posted a solution</a> to 300 redirects when loading images in Flash.<br />
This seemed to work most of the time but the solution does not work every time (at least anymore).<br />
One thing I noticed with Facebook in particular is that the contentLoaderInfo.url (the redirected url) was not a complete url with profile images. So loading that url would not work.</p>
<p>Started looking into other possible solutions and low-and-behold, the language reference actually tells you <a href="http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/flash/system/LoaderContext.html#checkPolicyFile">what to do</a>.<br />
At the bottom of the checkPolicyFile section, Adobe mentions steps to take with redirects:</p>
<ol>
<li>Examine the value of LoaderInfo.url after you have received a ProgressEvent.PROGRESS or Event.COMPLETE event, which tells you the object&#8217;s final URL.</li>
<li>Call the Security.loadPolicyFile() method with a policy file URL based on the object&#8217;s final URL.</li>
<li>Poll the value of LoaderInfo.childAllowsParent until it becomes true.</li>
</ol>
<p>I put together some example source code below to walk you through the steps.</p>
<pre class="brush: as3">
private var loader:Loader;
private var accessChildTimer:Timer;
private var url:String;

private function init():void
{
	accessChildTimer = new Timer( 100, 100 );
	accessChildTimer.addEventListener( TimerEvent.TIMER, onAccessChildTimer );
}

public function loadImage():void
{
	loader = new Loader();
	loader.contentLoaderInfo.addEventListener( Event.COMPLETE, onLoaderComplete );

	var context:LoaderContext = new LoaderContext();
	context.checkPolicyFile = true;

	var request:URLRequest = new URLRequest( url );
	loader.load( request, context );
}

protected function onLoaderComplete( event:Event ):void
{
	var loaderInfo:LoaderInfo = loader.contentLoaderInfo;
	if( loaderInfo.childAllowsParent )
	{
		displayImage();
	}
	else if( loaderInfo.url != this.url )
	{
		var redirectURL:String = loaderInfo.url + &quot;crossdomain.xml&quot;; //Might want to write a method to append a &#039;/&#039; if necessary.
		Security.loadPolicyFile( redirectURL );
		accessChildTimer.reset();
		accessChildTimer.start();
	}
}

protected function onAccessChildTimer( event:TimerEvent ):void
{
	var loaderInfo:LoaderInfo = loader.contentLoaderInfo;
	if( loaderInfo.childAllowsParent )
	{
		accessChildTimer.stop();
		displayImage();
	}
}

private function displayImage():void
{
	//Access BitmapData here
}
</pre>
<p>Hopefully that helps you out!</p>
]]></content:encoded>
			<wfw:commentRss>http://yourpalmark.com/2011/12/28/updated-solution-as3-security-error-2122-with-300-redirects/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>AS3 Facebook Graph API Branch</title>
		<link>http://yourpalmark.com/2011/03/06/as3-facebook-graph-api-branch/</link>
		<comments>http://yourpalmark.com/2011/03/06/as3-facebook-graph-api-branch/#comments</comments>
		<pubDate>Mon, 07 Mar 2011 03:04:19 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Featured]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://yourpalmark.com/?p=569</guid>
		<description><![CDATA[If you’re using the officially supported AS3 Facebook library, you might want to check out my branch...]]></description>
			<content:encoded><![CDATA[<p><img src="http://yourpalmark.com/blog/wp-content/uploads/2011/03/facebook_platform_logo-300x300.png" alt="" title="facebook_platform_logo" width="300" height="300" class="alignleft size-medium wp-image-574" />Back in May of last year, I was getting frustrated with the lack of support in Adobe&#8217;s official Facebook ActionScript library. In fact at that time, the library that claimed it was &#8220;fully supported by Facebook and Adobe&#8221; had not been updated since December 1, 2009. At the same time, Facebook was fully pushing their new Graph API.</p>
<p>At my job, I was starting to do a lot of Facebook work and was constantly seeing posts about Graph. Instead of waiting on Adobe, I started to edit their library locally to add support for Graph. I mentioned this on the issue tracker of Adobe&#8217;s library to see if anyone would be interested, and several people responded favorably&#8230; but no one from Adobe responded at all.</p>
<p>At first, I was pulling in the new Graph JS SDK on our site, initializing the user with it directly, and had just made a few line changes in the library to make the same old REST calls using it instead. This was just a bridge to start working with Graph. Once I had the user initialized with it, I was able to start taking advantage of the new calls. I then started making more changes, next supporting the JS SDK&#8217;s UI methods and then the actual API. After a few months of writing and working with the library in a production environment, I decided to upload my branch of the library to GitHub.</p>
<p>I did this at the beginning of September. Between May and September, several people were complaining about the complete lack of support of the official Adobe library with no response at all. In fact, Jason Crist the original author of the library who handed over control to Adobe was getting frustrated with the lack of support as well and reached out to me about joining forces on the new library. But within a week of just talking about it, Adobe comes out of the blue and says that a new library with Graph support was coming. They were obviously working on it for a while, because the day after they announced that, it was uploaded. Thanks for the head&#8217;s up Adobe!</p>
<p>So if you&#8217;re keeping tabs, the officially supported library didn&#8217;t see an update from December 1, 2009 through September 30, 2010. That&#8217;s almost 10 months. So you&#8217;ll forgive me if I didn&#8217;t believe this new library would be supported any better. I did however like what they had done with the library, most of it that is. I decided to rewrite my library again, but this time based on the new Adobe library. I continued to maintain my branch for several reasons: support being the biggest, a few issues I was noticing with the new library, and lack of typed value objects for the returned data.</p>
<p>As I find issues with the core library, I update them in my branch. Most of these changes in turn get implemented into the core library. In fact, I was annoyed that the new library required an external JS file and a special way of embedding the swf, so I rewrote the JS in an ActionScript class that gets injected into the HTML at runtime, and Adobe now uses that class directly with no modification. I reached out to Adobe to see if I could become a committer on the library, they responded, but unfortunately didn&#8217;t seem too interested. So instead I continue to maintain my branch.</p>
<p>Long story short, if you&#8217;re using the officially supported AS3 Facebook library, you might want to check out my branch too. You might just find that your issues and suggestions get taken into account faster, if Adobe does make any updates to their library, I make those updates as soon as I notice, and you might like having typed objects for the returned data (like FacebookUser instead of just a generic object with the user&#8217;s info).</p>
<p>Get it here: <a href="https://github.com/yourpalmark/facebook-actionscript-api">https://github.com/yourpalmark/facebook-actionscript-api</a><br />
Docs: <a href="http://yourpalmark.github.com/facebook-actionscript-api/docs/">http://yourpalmark.github.com/facebook-actionscript-api/docs/</a></p>
<p>I also maintain an AIR branch as well: <a href="https://github.com/yourpalmark/facebook-air-api">https://github.com/yourpalmark/facebook-air-api</a><br />
Docs: <a href="http://yourpalmark.github.com/facebook-air-api/docs/">http://yourpalmark.github.com/facebook-air-api/docs/</a></p>
]]></content:encoded>
			<wfw:commentRss>http://yourpalmark.com/2011/03/06/as3-facebook-graph-api-branch/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>OMGPOP is Hiring!</title>
		<link>http://yourpalmark.com/2010/03/12/omgpop-is-hiring/</link>
		<comments>http://yourpalmark.com/2010/03/12/omgpop-is-hiring/#comments</comments>
		<pubDate>Fri, 12 Mar 2010 23:19:42 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://yourpalmark.com/?p=549</guid>
		<description><![CDATA[Yay! Come join me!]]></description>
			<content:encoded><![CDATA[<p>Yay! Come join me!</p>
<p><a href="http://www.omgpop.com">OMGPOP</a> is a great place to work with an amazing team of developers building a cutting-edge multiplayer gaming site.</p>
<p>Following are the job details.<br />
If you feel like you fit the qualifications and want to come in and visit, email us at <a href="mailto:jobs@omgpop.com?subject=FRONT END DEVELOPER&#038;cc=mark@omgpop.com">jobs@omgpop.com</a>.<br />
Make sure you mention that you found out about it here!</p>
<p><code><br />
FRONT END DEVELOPER</p>
<p>Primary Responsibilities:</p>
<p>Architect and develop the omgpop social platform and website. ( <-- with me! )</p>
<p>Required Skills:</p>
<p>3+ years of solid software development experience.<br />
Expertise in Flash Development: AS3, CPU/Memory optimization,  JavaScript/Flash bridging.<br />
Experience with Flex, design patterns, frameworks (cairngorm, puremvc, etc).<br />
Experience managing large AS3 libraries.</p>
<p>Pluses:</p>
<p>Experience with product development relating to social media, advertising and commerce driven businesses.<br />
Deep understanding of consumer behavior and what drives usage, acquisition and retention of users.<br />
Start-up experience (not just agency experience).</p>
<p>Please include examples of your work when applying.<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://yourpalmark.com/2010/03/12/omgpop-is-hiring/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Geocoding with Papervision3D Update</title>
		<link>http://yourpalmark.com/2009/09/06/geocoding-with-papervision3d-update/</link>
		<comments>http://yourpalmark.com/2009/09/06/geocoding-with-papervision3d-update/#comments</comments>
		<pubDate>Sun, 06 Sep 2009 21:29:08 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://yourpalmark.com/?p=528</guid>
		<description><![CDATA[A little over a year ago, I wrote an article for Adobe Edge on how to geocode with Papervision3D. I have updated this project to work with the latest Papervision3D library and made the markers interactive.]]></description>
			<content:encoded><![CDATA[<p><div class="wp-caption alignnone" style="width: 425px"><a href="http://yourpalmark.com/blog/wp-content/uploads/2009/09/GeoGlobe.swf" rel="shadowbox;width=836;height=600" title="GeoGlobe"><img src="http://yourpalmark.com/blog/wp-content/uploads/2009/09/geoglobe.jpg" alt="GeoGlobe" title="GeoGlobe" width="415" height="164" class="alignnone size-full wp-image-530" /></a><p class="wp-caption-text">Click image to view demo</p></div><br />
A little over a year ago, I wrote an article for Adobe Edge on how to geocode with Papervision3D.<br />
<br />
<a href="http://www.adobe.com/newsletters/edge/june2008/articles/article2/index.html?trackingid=DEKYF">You can check that article out here.</a><br />
<br />
Since then, however, Papervision3D has been making continual updates and the source code in my article no longer works.<br />
This has been an issue for a while, as several people have noted in the comments on <a href="http://yourpalmark.com/2008/06/11/adobe-edge-article-geocoding-with-papervision3d/">my post about the article</a>.<br />
I finally got around to updating it.<br />
<br />
This new version works with the following library versions (both are the latest swcs at the time of this writing):</p>
<ul>
<li>Papervision3D 2.1.920</li>
<li>Tweener 1.33.74</li>
</ul>
<p>
Here are the list of changes that needed to be made to work with the latest Papervision3D:</p>
<ul>
<li>The 15 degree longitude offset no longer needs to be there. Set the offset to 0.</li>
<li>The default viewportHeight on GlobeView changed to match BasicView&#8217;s default of 480.</li>
<li>The default cameraType value needed to change from &#8220;FREECAMERA3D&#8221; to &#8220;Free&#8221;.</li>
<li>Added a default camera pitch of -30 to go along with the default yaw of 180.</li>
<li>The camera reference is now cameraAsCamera3D.</li>
<li>Changed the focus and zoom of the camera to match the new defaults of 10 and 40 respectively.</li>
<li>The rotation values and min/max rotation values in onRenderTick needed to be adjusted.</li>
<li>The camera needed to be adjusted further back in onRenderTick but not as far down.</li>
<li>The mouse values needed to be adjusted in the onMouseDown.</li>
</ul>
<p>
Here are a list of new additions made to the project:</p>
<ul>
<li>GlobeView set to interactive to allow the markers to be selectable.</li>
<li>Earth material did not need to be interactive.</li>
<li>Added background to GlobeView to fix globe rotation issues introduced when interactive was set to true on the view.</li>
<li>Added default markers.</li>
<li>New method to add markers by latitude and longitude.</li>
<li>Display of selected marker.</li>
<li>Added clone and toString methods to event.</li>
<li>To fix a small bug, the defaultButton in GeoGlobe.mxml has been moved to the topmost VBox instead of the internal HBox.</li>
<li>The license has been changed to MIT.</li>
<li>The domain digitalflipbook has been updated to yourpalmark.</li>
<li>Updated the code to follow better standards.</li>
<li>The html-template now uses swfobject.</li>
</ul>
<p>
I think that about covers all of the changes. I know many people have been asking for the markers to be interactive, so enjoy!<br />
<br />
And without further ado, here&#8217;s the new source (make sure you grab the latest Papervision3D and Tweener libraries as well):<br />
<a href="http://yourpalmark.com/downloads/flash/GeoGlobe_2.0.zip">Download GeoGlobe</a></p>
]]></content:encoded>
			<wfw:commentRss>http://yourpalmark.com/2009/09/06/geocoding-with-papervision3d-update/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Writing XIFF Extensions To Pass Custom Data Over XMPP</title>
		<link>http://yourpalmark.com/2009/07/30/writing-xiff-extensions-to-pass-custom-data-over-xmpp/</link>
		<comments>http://yourpalmark.com/2009/07/30/writing-xiff-extensions-to-pass-custom-data-over-xmpp/#comments</comments>
		<pubDate>Thu, 30 Jul 2009 15:54:05 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://yourpalmark.com/?p=522</guid>
		<description><![CDATA[Learn how to write your own XIFF extensions with custom data that can be sent over XMPP.]]></description>
			<content:encoded><![CDATA[<p>As I mentioned in an earlier <a href="http://yourpalmark.com/2009/02/23/xiff-gui-as3-xmpp-demo/">post</a>, I was working on building a chat room using <a href="http://xmpp.org/">XMPP (Jabber)</a> and the <a href="http://www.igniterealtime.org/projects/xiff/index.jsp">XIFF AS3 API</a>.<br />
If you aren&#8217;t sure how to get started with XMPP and XIFF, make sure to check out that <a href="http://yourpalmark.com/2009/02/23/xiff-gui-as3-xmpp-demo/">post</a> to get you up and running.</p>
<p>Once I had successfully worked out using XIFF to connect with XMPP and pass data back and forth between the server and the client, I soon realized that I wanted to associate custom data with each user in the chat rooms.<br />
The core protocol used in XMPP to express a user&#8217;s current network availability (offline or online, etc) is Presence.<br />
On IM, you know when your buddies come online and become unavailable, etc because you subscribe to their presence.<br />
The user&#8217;s presence is also sent to a chat room when he/she joins the room.</p>
<p>The default presence data typically only incorporates information about the user&#8217;s status (away, busy, available, etc).</p>
<p>The issue that I soon ran into with my chat rooms, was that our site already had a large collection of users with data associated with each user (id, username, picture, etc) and I wanted to associate this data with the chat users without duplicating the data.<br />
The best place seemed to be their presence since its already linked directly with each user. The only issue I had was figuring out how to do that.</p>
<p>As I soon realized, the XMPP spec is extremely extensible and well thought through and XIFF has tried to manage this extensibility in its library as well.</p>
<p>In XIFF, extensions can be added to any <code>XMPPStanza</code> that is sent to the XMPP server.<br />
By default, there are three core XMPP stanzas, <code>IQ</code>, <code>Message</code> and <code>Presence</code>.<br />
Each of these stanza classes has an <code>addExtension()</code> method.</p>
<p>What I needed to do was write a custom extension class that I could pass into the Presence&#8217;s <code>addExtension()</code> method.</p>
<p>Digging in to the code, all XIFF extensions need to extend the <code>Extension</code> class and implement <code>IExtension</code> and <code>ISerializable</code>.</p>
<p>To implement <code>IExtension</code>, you will need to add <code>getNS()</code> and <code>getElementName()</code> methods.</p>
<p><code>getNS()</code> will return the custom unique namespace that you will need to create and associate with this extension.<br />
eg: http://yourdomain.com/extensionname</p>
<p><code>getElementName()</code> will return the base XML element name to associate with this extension.<br />
eg: extension_name</p>
<p>To implement <code>ISerializable</code>, you will need to add <code>serialize()</code> and <code>deserialize()</code> methods.<br />
<code>serialize()</code> will convert the typed extension into XML data to be passed to the server while <code>deserialize()</code> will do the opposite and convert the received XML data into the typed extension.<br />
For more detailed information on this, make sure to look at some of the existing extensions in XIFF&#8217;s library.</p>
<p>Once the class is complete, you will need to register the extension with XIFF. This registration process informs XIFF of the particular extension so that it knows how to handle it when it is received over the network.<br />
This can be done by calling <code>ExtensionClassRegistry.register( CustomExtension )</code> anytime before you try to pass the extension over XMPP.<br />
Most extensions provide a static <code>enable()</code> method with the above code in it to handle this registration process.</p>
<p>At this point, you can create an instance of any of the core XMPP stanzas (IQ, Message, or Presence) and an instance of your new extension and then use the <code>addExtension()</code> method of the core stanza to pass in your extension.</p>
<p>The last step is to call the <code>send()</code> method on your XMPP connection passing in the XMPP stanza.</p>
<p>To finish up my particular example, I created a custom user extension that had the user&#8217;s id, name, picture, etc and attached it to the user&#8217;s presence.<br />
This as mentioned above could be passed with the send method on the XMPP connection and anyone subscribed to my user&#8217;s presence would receive the custom extension as well.</p>
<p>One thing that I wanted to do was join a chat room and have this custom data associated with the presence information of all of the existing users in the room that gets broadcast out.<br />
It took me a little bit to realize that the Room class has a feature for this already. Like I said, XMPP has thought of everything already.<br />
When you join a chat room, you call the Room&#8217;s <code>join()</code> method and the second parameter allows you to add an array of Presence extensions. Just instantiate your custom Presence extension and wrap it in an array and pass it into the <code>join()</code> call.</p>
<p>Hopefully this helps out others that got stuck on sending custom data over XMPP with XIFF.<br />
Let me know if you have any questions or want any other XIFF/XMPP tutorials.</p>
]]></content:encoded>
			<wfw:commentRss>http://yourpalmark.com/2009/07/30/writing-xiff-extensions-to-pass-custom-data-over-xmpp/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Embedding Fonts Using External SWF Files</title>
		<link>http://yourpalmark.com/2009/04/05/embedding-fonts-using-external-swf-files/</link>
		<comments>http://yourpalmark.com/2009/04/05/embedding-fonts-using-external-swf-files/#comments</comments>
		<pubDate>Sun, 05 Apr 2009 06:47:48 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://yourpalmark.com/?p=516</guid>
		<description><![CDATA[Learn how to embed fonts in external SWF files, using Flash's character embedding panel, for use in Flex and ActionScript projects.]]></description>
			<content:encoded><![CDATA[<p>There are several ways to embed fonts for use in Flash projects. One of the most common ways in Flex (that is now supported in Flash with CS4) is using the Embed metadata tag with unicode ranges. <a href="http://www.gotoandlearn.com/play?id=102">Lee has a good example of using this technique with Flash CS4 on gotoAndLearn().</a> This seems to be the suggested best-practice technique, but I still don&#8217;t find it the easiest.<br />
Instead, I like to use Flash&#8217;s character embedding options when possible:</p>
<div class="steps">
<ol>
<li>Create a new Flash file and add a dynamic text field on stage (I usually like to enter in the name of the font I&#8217;ll be embedding as the field&#8217;s text).</li>
<li>Select the text field&#8217;s font (family and style in CS4).</li>
<li>Now open the Character Embedding panel and select the range of characters you would like to embed. You don&#8217;t want to embed the entire font or else your SWF will be very bloated.</li>
<li>Now to be able to use this font you need to be able to reference it. Before Flash CS4, this was typically the font name that you selected from the font list. In CS4 however this doesn&#8217;t work. With CS4, Flash has finally updated their font list to match how other Adobe products list fonts (by family with styles grouped under the family). This is much better when looking for a specific font and trying to match fonts used in Photoshop, etc but it does make it more confusing when trying to determine the name of the font to reference for our purposes. To confirm what font name to reference add the following script to the Flash file to iterate over the embedded fonts:
<pre class="brush: as3">
var fontList:Array = Font.enumerateFonts();
for( var i:int=0; i&lt;fontList.length; i++ )
{
    trace( &quot;font: &quot; + fontList[ i ].fontName );
}
</pre>
<p>This will list out all of the embedded fonts in the Flash file by the name you should use to reference them.</li>
<li>Compile the Flash file and your external font SWF is ready for embedding.</li>
<li>Now create a Flex or ActionScript project in Flex Builder and create a property to reference your font like this:
<pre class="brush: as3">
[Embed( source=&quot;/assets/swf/fonts.swf&quot;, fontFamily=&quot;Helvetica Neue LT Std 95 Black&quot; )]
public static var HelveticaNeueLTStd95Black:Class;
</pre>
<p>In the Embed metadata, set the source parameter to point to the SWF we created and set the fontFamily parameter to the font reference we discovered above using enumerateFonts(). The actual property name of the Class can be anything you want.
</li>
<li>Add a TextField in your project and set its embedFonts property to true. There are two ways to use the embedded font with this TextField:
<ul>
<li>Create a TextFormat object and set the font property to the fontFamily name you used in the Embed tag above. Now set the defaultTextFormat of the TextField to this TextFormat object.</li>
<li>Create a CSS file and set the font-family property of a selector to the fontFamily name you used in the Embed tag above. Load and parse the CSS into a StyleSheet object and set the styleSheet property of the TextField to this StyleSheet object. Make sure your text is using the selector from the CSS file.</li>
</ul>
</li>
</ol>
</div>
<p>That&#8217;s it!<br />
No need to figure out the unicode range of the characters you want to embed. Just use Flash&#8217;s Character Embedding panel that you&#8217;ve probably been using forever.<br />
It should be noted that Lee&#8217;s technique referenced at the top of this post is probably still the best way to do runtime font loading.</p>
]]></content:encoded>
			<wfw:commentRss>http://yourpalmark.com/2009/04/05/embedding-fonts-using-external-swf-files/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>XIFF GUI (AS3 XMPP Demo)</title>
		<link>http://yourpalmark.com/2009/02/23/xiff-gui-as3-xmpp-demo/</link>
		<comments>http://yourpalmark.com/2009/02/23/xiff-gui-as3-xmpp-demo/#comments</comments>
		<pubDate>Mon, 23 Feb 2009 07:03:42 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>

		<guid isPermaLink="false">http://yourpalmark.com/?p=496</guid>
		<description><![CDATA[I've been working on building a chat room using XMPP (Jabber) and the XIFF AS3 API and have released a full-featured XIFF overview demo with source code.]]></description>
			<content:encoded><![CDATA[<p><div class="wp-caption alignnone" style="width: 425px"><a href="http://yourpalmark.com/blog/wp-content/uploads/2009/02/xiffgui/XIFFGUI.swf" rel="shadowbox;width=836;height=598" title="XIFF GUI"><img src="http://yourpalmark.com/blog/wp-content/uploads/2009/02/xiffgui.jpg" alt="XIFF GUI" title="XIFF GUI" width="415" height="164" class="alignnone size-full wp-image-498" /></a><p class="wp-caption-text">Click image to view demo (Right-click demo to view source)</p></div><br />
I&#8217;ve been working on building a chat room using <a href="http://xmpp.org/">XMPP (Jabber)</a> and the <a href="http://www.igniterealtime.org/projects/xiff/index.jsp">XIFF AS3 API</a>.<br />
As <a href="http://www.mikechambers.com/blog/2008/08/14/connecting-to-an-xmpp-jabber-server-with-the-xiff-as3-library/">Mike Chambers mentioned back in August</a>, unfortunately there&#8217;s not a lot of documentation or tutorials out there for getting up and running with this library.<br />
If you do want to get started, hopefully this will help you out.<br />
<br />
First things first, you&#8217;ll need an XMPP server running. I&#8217;ve setup <a href="http://www.igniterealtime.org/projects/openfire/index.jsp">Openfire</a> which is an open source, cross-platform, easy to setup XMPP server.<br />
Next you&#8217;ll need the actual <a href="http://www.igniterealtime.org/projects/xiff/index.jsp">XIFF library</a>.<br />
Once you have the server installed and setup and the library downloaded, you can follow along with Mike Chambers tutorial up above for establishing an initial connection using the XIFF library.<br />
Now at this point, you&#8217;ve managed to connect to an XMPP / Jabber server, join a room, and send a message to the room. This was great when I was jumping in and just trying to figure out how to get started. After you get your head wrapped around this, you&#8217;ll probably ask yourself the same thing I asked myself&#8230; &#8220;sweet&#8230; but now what?&#8221;<br />
At this point you&#8217;re kind of on your own&#8230; or at least I was. I searched and searched but couldn&#8217;t find much more than a couple of simple tutorials very similar to Mike&#8217;s.<br />
The one exception to this was a <a href="http://www.velloff.com/?p=38">demo that I found from Nick Velloff</a> that included source.<br />
The demo shows examples of connecting to an XMPP server, logging in, registering, adding buddies, removing buddies, displaying the logged in user&#8217;s roster (list of buddies), changing a buddy&#8217;s group, changing the logged in user&#8217;s presence, messaging your buddies, and creating a multi user chat room. Shew&#8230; what a God-send right?<br />
Well, once you download the source code and try to get it running locally you&#8217;ll soon realize that its not the immediate help you were hoping for. This demo was released back in October of 2007 and since then the XIFF library has been overhauled quite significantly.<br />
Trying to alter the demo&#8217;s source to fit the new code was not an immediately simple fix either.<br />
So anyway, I decided to sit down last week and go through every line of the demo code and update it to work with the latest XIFF library.<br />
I also groomed the code a bit to make it take advantage of the Flex layout engine, separate the connection logic from the view, and fix some things that weren&#8217;t completely working in Nick&#8217;s original.<br />
One other important thing to note is that the source code of my demo includes the current XIFF library for two reasons: 1) In case the library changes again and I haven&#8217;t updated the demo, you&#8217;ll still be able to download a completely functioning sample, and 2) I had to make some minor tweaks to the library to remove the voids from the constructors and add clone and toString methods to all of the events. I have submitted bug reports for both of those issues and hopefully they will be fixed soon, but until then I made the tweaks myself.<br />
If the team over at Jive Software does not want me to include the source I will remove it and then explain what needs to be tweaked.</p>
<p>Hopefully this demo will help you as much as it helped me, although I have to say rewriting it probably helped me learn XIFF a lot more than just downloading a completely working sample, so definitely take your time with it, there&#8217;s quite a lot under the hood.</p>
<p>To download the source, click on the image above to view the demo and then right-click on the demo to view and download the source.<br />
Please note that my host is not setup with a working XMPP server so the demo is not functional above, you must download it and connect it to your own XMPP server to see it fully functioning.</p>
<p>As the XIFF library changes, I will try and keep this demo updated.</p>
]]></content:encoded>
			<wfw:commentRss>http://yourpalmark.com/2009/02/23/xiff-gui-as3-xmpp-demo/feed/</wfw:commentRss>
		<slash:comments>23</slash:comments>
		</item>
		<item>
		<title>AS3 Syntax Highlighting (with SyntaxHighlighter 2.0)</title>
		<link>http://yourpalmark.com/2009/02/17/as3-syntax-highlighting-with-syntaxhighlighter-20/</link>
		<comments>http://yourpalmark.com/2009/02/17/as3-syntax-highlighting-with-syntaxhighlighter-20/#comments</comments>
		<pubDate>Tue, 17 Feb 2009 06:50:05 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://yourpalmark.com/?p=492</guid>
		<description><![CDATA[SyntaxHighlighter was recently updated to 2.0 so I updated my AS3 brush to be compatible.]]></description>
			<content:encoded><![CDATA[<p><a href="http://alexgorbatchev.com/wiki/SyntaxHighlighter">SyntaxHighlighter</a> was recently updated to 2.0 and with it there have been quite a few nice additions, but unfortunately it also kills all of the custom brushes. I realized this when I upgraded to the latest version and all of my AS3 syntax highlighting stopped working.<br />
I decided to go ahead and update my AS3 brush to be compatible (and make my blog&#8217;s highlighting work again).<br />
One of SyntaxHighlighter 2.0&#8242;s new features is support for multiple styles. I&#8217;ve included a Flex Builder style that you can use to have the AS3 syntax look the way Flex Builder styles it by default.</p>
<p><a href="http://yourpalmark.com/downloads/flash/shBrushAS3.zip">You can download my AS3 extension here.</a></p>
]]></content:encoded>
			<wfw:commentRss>http://yourpalmark.com/2009/02/17/as3-syntax-highlighting-with-syntaxhighlighter-20/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Language Reference Updates</title>
		<link>http://yourpalmark.com/2008/10/21/language-reference-updates-2/</link>
		<comments>http://yourpalmark.com/2008/10/21/language-reference-updates-2/#comments</comments>
		<pubDate>Wed, 22 Oct 2008 07:02:59 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://yourpalmark.com/2008/10/21/language-reference-updates-2/</guid>
		<description><![CDATA[Language References updated for the release of Flash 10.]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve updated my <a href="http://yourpalmark.com/2007/07/05/language-references/">Language References post</a> for the release of Flash 10.</p>
<p>I&#8217;ve also added a subheading for beta language references and added Flex Gumbo to the list.</p>
<p>I&#8217;ll continue to try and update the post.</p>
]]></content:encoded>
			<wfw:commentRss>http://yourpalmark.com/2008/10/21/language-reference-updates-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Color Name Class (SVG 1.0 &#8211; X11 and VGA)</title>
		<link>http://yourpalmark.com/2008/06/20/color-name-class-svg-10-x11-and-vga/</link>
		<comments>http://yourpalmark.com/2008/06/20/color-name-class-svg-10-x11-and-vga/#comments</comments>
		<pubDate>Fri, 20 Jun 2008 09:20:50 +0000</pubDate>
		<dc:creator>Mark</dc:creator>
				<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://yourpalmark.com/2008/06/20/color-name-class-svg-10-x11-and-vga/</guid>
		<description><![CDATA[Here's a class for you that defines the names and hexadecimal values of all the colors in SVG 1.0, including the X11 colors and the HTML4 colors, based on the VGA colors.]]></description>
			<content:encoded><![CDATA[<div class="update">
<div class="steps">
<div class="title">UPDATE (2009-05-17):</div>
<ol>
<li>Renamed class from Color to ColorName</li>
<li>Changed package to yourpalmark</li>
<li>hexValue property has been renamed to color</li>
<li>Added a toString method to trace out the properties of the ColorName object</li>
<li>Changed license from New BSD to MIT</li>
</ol></div>
</div>
<p>One small thing I&#8217;ve always found a bit handy with CSS in XHTML is the ability to type familiar names for colors rather than the hex value.</p>
<p>Unfortunately, Flash&#8217;s StyleSheet does not support color names at all and Flex&#8217;s StyleManager only supports the 16 basic VGA color names.</p>
<p>I decided to write a class that adds static properties for all of the color names defined by <a href="http://www.w3.org/TR/css3-color/#svg-color">SVG 1.0</a> (The colors in SVG 1.0 include the X11 colors with the addition of gray/grey variants. X11 includes the 16 basic <a href="http://www.w3.org/TR/css3-color/#html4">VGA, or HTML4</a>, colors as well). This class also adds two static convenience methods for returning a ColorName object by passing in the color name or hexadecimal color value.</p>
<p>While this class does not extend the CSS parsing capabilities of Flash, it could be used by an advanced StyleSheet class that overwrites the parseCSS method using this class as a lookup.<br />
This class could also be extended to add (or overwrite) color values specific to a project you are working on. By setting up static properties for a project color set, the project team could be assured that the colors being used are consistent between team members.</p>
<p><strong>Description:</strong><br />
The ColorName class defines the names and hexadecimal values of the colors defined in SVG 1.0.</p>
<p><strong>Documentation:</strong><br />
<a href="http://yourpalmark.com/downloads/flash/classes/ColorName/docs/">ColorName Class Documentation</a></p>
<p><a href="http://yourpalmark.com/downloads/flash/classes/ColorName/ColorName.zip">Download ColorName Class</a></p>
]]></content:encoded>
			<wfw:commentRss>http://yourpalmark.com/2008/06/20/color-name-class-svg-10-x11-and-vga/feed/</wfw:commentRss>
		<slash:comments>10</slash:comments>
		</item>
	</channel>
</rss>

