<?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/"
	xmlns:creativeCommons="http://backend.userland.com/creativeCommonsRssModule"
>

<channel>
	<title>Tiago&#039;s Weblog &#187; Adobe</title>
	<atom:link href="http://blog.six4rty.ch/category/adobe/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.six4rty.ch</link>
	<description>Code &#38; Technology Aficionado - Come for the Flash, stay for more!</description>
	<lastBuildDate>Tue, 01 Nov 2011 14:06:29 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
<creativeCommons:license>http://creativecommons.org/licenses/by/2.5/ch/</creativeCommons:license>
		<item>
		<title>Flex Mobile Tour makes halt in Zurich</title>
		<link>http://blog.six4rty.ch/2011/11/01/flex-mobile-tour-makes-halt-in-zurich/</link>
		<comments>http://blog.six4rty.ch/2011/11/01/flex-mobile-tour-makes-halt-in-zurich/#comments</comments>
		<pubDate>Tue, 01 Nov 2011 14:06:29 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Meetings]]></category>

		<guid isPermaLink="false">http://blog.six4rty.ch/?p=1085</guid>
		<description><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2011%252F11%252F01%252Fflex-mobile-tour-makes-halt-in-zurich%252F&title=Flex+Mobile+Tour+makes+halt+in+Zurich&desc=Do+you+live+in+Switzerland%3F%0D%0AAre+you+up+for+a+great+hands+on+session+with+Ryan+Stewart+and+Mihai+Corlan%3F+Then+you+shouldn%27t+miss+the+Adobe+Flex+Mobile+Tour+2011%0D%0A%0D%0AYou+can+register+here%2C+right+now+for&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div>Do you live in Switzerland? Are you up for a great hands on session with Ryan Stewart and Mihai Corlan? Then you shouldn&#8217;t miss the Adobe Flex Mobile Tour 2011 You can register here, right now for a limited seat, so don&#8217;t miss the chance: Online event registration for Flex Mobile European Tour 2011 &#8211; [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2011%252F11%252F01%252Fflex-mobile-tour-makes-halt-in-zurich%252F&title=Flex+Mobile+Tour+makes+halt+in+Zurich&desc=Do+you+live+in+Switzerland%3F%0D%0AAre+you+up+for+a+great+hands+on+session+with+Ryan+Stewart+and+Mihai+Corlan%3F+Then+you+shouldn%27t+miss+the+Adobe+Flex+Mobile+Tour+2011%0D%0A%0D%0AYou+can+register+here%2C+right+now+for&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div><p>Do you live in Switzerland?<br />
Are you up for a great hands on session with <a href="http://blog.digitalbackcountry.com/" target="_blank">Ryan Stewart</a> and <a href="http://www.corlan.org" target="_blank">Mihai Corlan</a>? <strong>Then you shouldn&#8217;t miss the Adobe Flex Mobile Tour 2011</strong></p>
<p>You can register here, right now for a limited seat, so don&#8217;t miss the chance:</p>
<div style="width: 100%; text-align: left;">
<p><iframe src="http://www.eventbrite.com/tickets-external?eid=2357154312&amp;ref=etckt" frameborder="0" marginwidth="5" marginheight="5" scrolling="auto" width="100%" height="192"></iframe></p>
<div style="font-family: Helvetica, Arial; font-size: 10px; padding: 5px 0 5px; margin: 2px; width: 100%; text-align: left;"><a style="color: #ddd; text-decoration: none;" href="http://www.eventbrite.com/r/etckt" target="_blank">Online event registration</a><span style="color: #ddd;"> for </span><a style="color: #ddd; text-decoration: none;" href="http://mobileflextourzurich.eventbrite.com?ref=etckt" target="_blank">Flex Mobile European Tour 2011 &#8211; Zurich</a><span style="color: #ddd;"> powered by </span><a style="color: #ddd; text-decoration: none;" href="http://www.eventbrite.com?ref=etckt" target="_blank">Eventbrite</a></div>
</div>
<p>Hang on you don&#8217;t live in Switzerland but in another European Country? Don&#8217;t worry Ryan Stewart and Mihai Corlan will be travelling around Europe to show the latest greatest features of Flex for Mobile Devices. Mihai posted a tour list on his blog: <a href="http://corlan.org/2011/10/27/flex-mobile-european-tour-2011/">http://corlan.org/2011/10/27/flex-mobile-european-tour-2011/</a></p>
<p>Don&#8217;t miss the great opportunity!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.six4rty.ch/2011/11/01/flex-mobile-tour-makes-halt-in-zurich/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/2.5/ch/</creativeCommons:license>
	</item>
		<item>
		<title>another blog, more authors</title>
		<link>http://blog.six4rty.ch/2011/03/22/another-blog-more-authors/</link>
		<comments>http://blog.six4rty.ch/2011/03/22/another-blog-more-authors/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 08:08:21 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[actionscript]]></category>
		<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[opensource]]></category>

		<guid isPermaLink="false">http://blog.six4rty.ch/?p=1062</guid>
		<description><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2011%252F03%252F22%252Fanother-blog-more-authors%252F&title=another+blog%2C+more+authors&desc=%0D%0A%0D%0ATwo+weeks+ago+me+and+my+fellow+co-workers+have+started+our+company+blog+which+can+be+reached+at%0D%0Ahttp%3A%2F%2Fblog.publicis-modem.ch+every+open+source+initiative%2C+project+or+library+that+we+create+will+&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div>Two weeks ago me and my fellow co-workers have started our company blog which can be reached at http://blog.publicis-modem.ch every open source initiative, project or library that we create will be published there. I might do a cross link to a blog post or even write a little more about it, but I think you [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2011%252F03%252F22%252Fanother-blog-more-authors%252F&title=another+blog%2C+more+authors&desc=%0D%0A%0D%0ATwo+weeks+ago+me+and+my+fellow+co-workers+have+started+our+company+blog+which+can+be+reached+at%0D%0Ahttp%3A%2F%2Fblog.publicis-modem.ch+every+open+source+initiative%2C+project+or+library+that+we+create+will+&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div><p><a href="http://blog.publicis-modem.ch"><img class="alignnone size-full wp-image-1065" title="blogModem" src="http://blog.six4rty.ch/wp-content/uploads/2011/03/blogModem.jpg" alt="" width="620" height="252" /></a></p>
<p>Two weeks ago me and my fellow co-workers have started our company blog which can be reached at<br />
<a href="http://blog.publicis-modem.ch" target="_blank">http://blog.publicis-modem.ch</a> every open source initiative, project or library that we create will be published there.<br />
I might do a cross link to a blog post or even write a little more about it, but I think you should keep an eye over there aswell, we already released two opensource projects (<a href="http://opensource.publicis-modem.ch/websvn/listing.php?repname=Open+Source+at+Publicis+Modem+Repository&amp;path=%2Fwallago%2Ftrunk%2Fsrc%2F&amp;#a820ba52e91ea86abf879a04967ee2ccc" target="_blank">wallaGo </a>and <a href="http://opensource.publicis-modem.ch/websvn/listing.php?repname=Open+Source+at+Publicis+Modem+Repository&amp;path=%2Fas3square%2Ftrunk%2Fsrc%2F&amp;#a8ac9b707f5b226f9b5e414505c42f451" target="_blank">AS3Square</a>) and there is more to come soon, so stay tuned for some fresh content and don&#8217;t forget to bookmark a new fresh blog.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.six4rty.ch/2011/03/22/another-blog-more-authors/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/2.5/ch/</creativeCommons:license>
	</item>
		<item>
		<title>Vinayaka (win) launched</title>
		<link>http://blog.six4rty.ch/2011/01/09/vinayaka-win-launched/</link>
		<comments>http://blog.six4rty.ch/2011/01/09/vinayaka-win-launched/#comments</comments>
		<pubDate>Sun, 09 Jan 2011 15:46:22 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Utils]]></category>
		<category><![CDATA[AS 3.0]]></category>
		<category><![CDATA[Font]]></category>
		<category><![CDATA[Font Embedding]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Vinayaka]]></category>

		<guid isPermaLink="false">http://blog.six4rty.ch/?p=1006</guid>
		<description><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2011%252F01%252F09%252Fvinayaka-win-launched%252F&title=Vinayaka+%28win%29+launched&desc=%0D%0AYou+can+download+Vinayaka+directly+from+the+projects+page.+Just+follow+this+link%3A%0D%0Ahttp%3A%2F%2Fwiki.six4rty.ch%2Fdoku.php%3Fid%3Dvinayaka%0D%0A%0D%0AIf+you+get+hold+of+any+bugs+or+issues%2C+please+follow+the+issues+link&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div>You can download Vinayaka directly from the projects page. Just follow this link: http://wiki.six4rty.ch/doku.php?id=vinayaka If you get hold of any bugs or issues, please follow the issues link and fill out a bug, I will try to fix it as soon as I can. Feel free to post a comment, if you think this application [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2011%252F01%252F09%252Fvinayaka-win-launched%252F&title=Vinayaka+%28win%29+launched&desc=%0D%0AYou+can+download+Vinayaka+directly+from+the+projects+page.+Just+follow+this+link%3A%0D%0Ahttp%3A%2F%2Fwiki.six4rty.ch%2Fdoku.php%3Fid%3Dvinayaka%0D%0A%0D%0AIf+you+get+hold+of+any+bugs+or+issues%2C+please+follow+the+issues+link&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div><p><a href="http://blog.six4rty.ch/wp-content/uploads/2010/11/vinayaka_128x128.png"></a><a href="http://blog.six4rty.ch/wp-content/uploads/2011/01/vinayaka_winversion.png"><img class="alignleft size-full wp-image-1015" style="margin-left: 10px; margin-right: 10px;" title="vinayaka_winversion" src="http://blog.six4rty.ch/wp-content/uploads/2011/01/vinayaka_winversion.png" alt="" width="128" height="128" /></a><br />
You can download Vinayaka directly from the projects page. Just follow this link:<br />
<a href="http://wiki.six4rty.ch/doku.php?id=vinayaka" target="_blank">http://wiki.six4rty.ch/doku.php?id=vinayaka</a></p>
<p>If you get hold of any bugs or issues, please follow the issues link and fill out a bug, I will try to fix it as soon as I can.<br />
Feel free to post a comment, if you think this application is helpful or could be improved.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.six4rty.ch/2011/01/09/vinayaka-win-launched/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/2.5/ch/</creativeCommons:license>
	</item>
		<item>
		<title>The great search for the last font embedding solution</title>
		<link>http://blog.six4rty.ch/2011/01/04/presenting_vinayaka/</link>
		<comments>http://blog.six4rty.ch/2011/01/04/presenting_vinayaka/#comments</comments>
		<pubDate>Tue, 04 Jan 2011 19:34:24 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Utils]]></category>
		<category><![CDATA[AS 3.0]]></category>
		<category><![CDATA[Font]]></category>
		<category><![CDATA[Font Embedding]]></category>
		<category><![CDATA[Tools]]></category>
		<category><![CDATA[Utilities]]></category>
		<category><![CDATA[Vinayaka]]></category>

		<guid isPermaLink="false">http://blog.six4rty.ch/?p=957</guid>
		<description><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2011%252F01%252F04%252Fpresenting_vinayaka%252F&title=The+great+search+for+the+last+font+embedding+solution&desc=Ok%2C+I%27ve+done+enough+projects+to+be+more+then+fed+up+with+how+the+font+embedding+in+pure+AS3+and+Flex+projects+work.%0D%0ANot+that+long+ago%2C+I+came+up+with+the+idea+of+creating+a+small+utility+that+could+&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div>Ok, I&#8217;ve done enough projects to be more then fed up with how the font embedding in pure AS3 and Flex projects work. Not that long ago, I came up with the idea of creating a small utility that could speed up development time especially during the process of importing fonts for use in our [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2011%252F01%252F04%252Fpresenting_vinayaka%252F&title=The+great+search+for+the+last+font+embedding+solution&desc=Ok%2C+I%27ve+done+enough+projects+to+be+more+then+fed+up+with+how+the+font+embedding+in+pure+AS3+and+Flex+projects+work.%0D%0ANot+that+long+ago%2C+I+came+up+with+the+idea+of+creating+a+small+utility+that+could+&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div><p><a href="http://blog.six4rty.ch/wp-content/uploads/2010/11/vinayaka_128x128.png"><img class="alignleft size-full wp-image-976" style="margin: 10px;" title="vinayaka_128x128" src="http://blog.six4rty.ch/wp-content/uploads/2010/11/vinayaka_128x128.png" alt="" width="128" height="128" /></a>Ok, I&#8217;ve done enough projects to be more then fed up with how the font embedding in pure AS3 and Flex projects work.<br />
Not that long ago, I came up with the idea of creating a small utility that could speed up development time especially during the process of importing fonts for use in our projects. As you may know if you are a FDT4 user, they as well released a similar solution to the one I&#8217;m giving you now, I&#8217;m pretty sure their solution is great and since it&#8217;s integrated it&#8217;s a big plus, but as I&#8217;m not an FDT user (maybe one day) I had to search for another solution.</p>
<p>The first step towards that solution was actually creating the small app posted on my blog called the UnicodeFinder. Parts of the code have also been implemented in this new application. It&#8217;s simple but yet powerful, I present you Vinayaka(), an application that hopefully will solve all your font embedding problems in the future, it&#8217;s currently in an early stage, there is lot of room for improvement. If you have ideas or find any bugs, don&#8217;t forget to visit the <span style="text-decoration: line-through;"><a href="http://getsatisfaction.com/six4rty/products/six4rty_vinayaka" target="_blank">Vinayaka&#8217;s GetSatisfaction</a></span> page and leave your note.<span id="more-957"></span></p>
<p>First of all, the application can be downloaded as it is, I&#8217;m currently not providing any source code, why? Currently it&#8217;s a mess, I first need to clean up, refactor and document the code, until that is done, I would like to keep the code to myself, if you want to help me out extending or improving, then simply let me know by throwing me an email or by filling an issue on the Google Project page.</p>
<p>Currently Vinayaka only runs on Windows Systems, I&#8217;m publishing the OSX version in the course of the next days, so if you are a mac user please bare with me.</p>
<p><span style="text-decoration: line-through;"><strong>Very important:</strong><br />
I&#8217;ll be releasing Vinayaka to the public after my talk tomorrow at the SFUG until then no download version is available.<br />
A specific Product page will also be setup during the next 2 days.</span></p>
<p><strong>Download:</strong><br />
Please follow the <a href="http://blog.six4rty.ch/projects/">Projects page</a> for downloads and issue trackings.</p>
<p>Below some screenshots, so you at least know what is expecting you <img src='http://blog.six4rty.ch/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> .</p>

<a href='' title='vinayaka_1'><img width="290" height="290" src="http://blog.six4rty.ch/wp-content/uploads/2011/01/vinayaka_1-290x290.png" class="attachment-thumbnail" alt="vinayaka_1" title="vinayaka_1" /></a>
<a href='' title='vinayaka_2'><img width="290" height="290" src="http://blog.six4rty.ch/wp-content/uploads/2011/01/vinayaka_2-290x290.png" class="attachment-thumbnail" alt="vinayaka_2" title="vinayaka_2" /></a>
<a href='' title='vinayaka_3'><img width="290" height="290" src="http://blog.six4rty.ch/wp-content/uploads/2011/01/vinayaka_3-290x290.png" class="attachment-thumbnail" alt="vinayaka_3" title="vinayaka_3" /></a>
<a href='' title='vinayaka_4'><img width="290" height="290" src="http://blog.six4rty.ch/wp-content/uploads/2011/01/vinayaka_4-290x290.png" class="attachment-thumbnail" alt="vinayaka_4" title="vinayaka_4" /></a>
<a href='' title='vinayaka_5'><img width="290" height="290" src="http://blog.six4rty.ch/wp-content/uploads/2011/01/vinayaka_5-290x290.png" class="attachment-thumbnail" alt="vinayaka_5" title="vinayaka_5" /></a>
<a href='' title='vinayaka_6'><img width="290" height="290" src="http://blog.six4rty.ch/wp-content/uploads/2011/01/vinayaka_6-290x290.png" class="attachment-thumbnail" alt="vinayaka_6" title="vinayaka_6" /></a>

]]></content:encoded>
			<wfw:commentRss>http://blog.six4rty.ch/2011/01/04/presenting_vinayaka/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/2.5/ch/</creativeCommons:license>
	</item>
		<item>
		<title>Android-AS3: Accelerometer</title>
		<link>http://blog.six4rty.ch/2010/11/21/android-as3-accelerometer/</link>
		<comments>http://blog.six4rty.ch/2010/11/21/android-as3-accelerometer/#comments</comments>
		<pubDate>Sun, 21 Nov 2010 18:04:22 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Android]]></category>
		<category><![CDATA[Flash Builder]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA["burrito"]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[as3]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.six4rty.ch/?p=889</guid>
		<description><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2010%252F11%252F21%252Fandroid-as3-accelerometer%252F&title=Android-AS3%3A+Accelerometer&desc=You+bought+an+Android+phone+because+you+want+to+start+developing+a+cool+flash+or+AIR+App+for+that+device%3F%0D%0AOr+you+just+wondering+how+easy+it+is+to+develop+an+application+for+those+target+devices%3F%0D%0A%0D%0AI&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div>You bought an Android phone because you want to start developing a cool flash or AIR App for that device? Or you just wondering how easy it is to develop an application for those target devices? In the following series, I&#8217;m going to show you how to access those special properties that are available when [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2010%252F11%252F21%252Fandroid-as3-accelerometer%252F&title=Android-AS3%3A+Accelerometer&desc=You+bought+an+Android+phone+because+you+want+to+start+developing+a+cool+flash+or+AIR+App+for+that+device%3F%0D%0AOr+you+just+wondering+how+easy+it+is+to+develop+an+application+for+those+target+devices%3F%0D%0A%0D%0AI&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div><p><a href="http://blog.six4rty.ch/wp-content/uploads/2010/11/as3mobile.jpg"><img class="alignleft size-medium wp-image-890" style="margin: 10px;" title="as3mobile" src="http://blog.six4rty.ch/wp-content/uploads/2010/11/as3mobile-300x270.jpg" alt="" width="168" height="151" /></a>You bought an Android phone because you want to start developing a cool flash or AIR App for that device?<br />
Or you just wondering how easy it is to develop an application for those target devices?</p>
<p>In the following series, I&#8217;m going to show you how to access those special properties that are available when developing for an Android or any other Flash / AIR powered device.</p>
<p>Today, we start with the <strong>Accelerometer API</strong>.</p>
<p>In this article I&#8217;m going to show you how to control a simple ball with the help of the accelerometer API. Clearly you could create a game like the well known <a rel="lightbox" href="http://blog.six4rty.ch/wp-content/uploads/2010/11/labyrinth.jpg">Labyrinth</a> available for the iOS or <a rel="lightbox" href="http://blog.six4rty.ch/wp-content/uploads/2010/11/teeter.jpg">Teeter</a> available on the HTC android devices very easy as soon as you know how to master the Accelerometer API.<br />
<span id="more-889"></span></p>
<p>Before we start just a heads up that you can follow this article even if you work with Flash CS5 although working with Flash Builder &#8220;Burrito&#8221; makes your life much easier.</p>
<p>To start let&#8217;s create a new Flash Builder &#8220;actionscript mobile project&#8221; called: &#8220;<strong>AccelerometerBall</strong>&#8220;.  Setup the project how you like it, just be sure that you enable full screen.</p>
<p>Now that you are ready to go we first check if an accelerometer is available, if none is available then it&#8217;s not worth of continuing the game, but if it&#8217;s available we add the sphere to the stage which we want to control. You can add whatever you want, i&#8217;m just using a simple sphere I created in Photoshop to be my indicator.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> Accelerometer.<span style="color: #006600;">isSupported</span> <span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
    _accelerometer = <span style="color: #000000; font-weight: bold;">new</span> Accelerometer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    _accelerometer.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> AccelerometerEvent.<span style="color: #006600;">UPDATE</span>, onAccelUpdate <span style="color: #66cc66;">&#41;</span>;
&nbsp;
    _sphere = <span style="color: #000000; font-weight: bold;">new</span> sphereClass<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
    _sphere.<span style="color: #006600;">scaleX</span> = _sphere.<span style="color: #006600;">scaleY</span> = .2;
    addChild<span style="color: #66cc66;">&#40;</span> _sphere <span style="color: #66cc66;">&#41;</span>;
&nbsp;
    addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, moveSphere <span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
<span style="color: #b1b100;">else</span>
<span style="color: #66cc66;">&#123;</span>
    <span style="color: #808080; font-style: italic;">//display message to user that accelerometer is not available</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>When you test the application at this point, you will not see your sphere unless your developer machine has an accelerometer in place, which I doubt <img src='http://blog.six4rty.ch/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p>So to properly test it, you should debug your application on your mobile phone, now if you are on Flash CS5 you can use Device Central to simulate the normal behavior of  a mobile phone, Flash Builder &#8220;Burrito&#8221; users can deploy and debug directly from the Flash Builder Interface, to do that, just simply create a new Run configuration and setup as following.<br />
<a rel="lightbox" href="http://blog.six4rty.ch/wp-content/uploads/2010/11/runMobile.jpg"><img title="runMobile" src="http://blog.six4rty.ch/wp-content/uploads/2010/11/runMobile-150x150.jpg" alt="" width="150" height="150" /></a></p>
<p>When debugging the application on your phone you should now be able to see the sphere you placed in stage.</p>
<p>Next on let&#8217;s move on to the usage of the Accelerometer API.</p>
<p>To move our sphere, we simply need to take the accelerometers x &amp; y event, have a look at the code below:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">protected <span style="color: #000000; font-weight: bold;">function</span> onAccelUpdate<span style="color: #66cc66;">&#40;</span> event:AccelerometerEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
     _targetX = event.<span style="color: #006600;">accelerationX</span> <span style="color: #66cc66;">*</span> _factor;
     _targetY = event.<span style="color: #006600;">accelerationY</span> <span style="color: #66cc66;">*</span> _factor;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
protected <span style="color: #000000; font-weight: bold;">function</span> moveSphere<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
      _sphere.<span style="color: #006600;">x</span> -= _targetX;
      _sphere.<span style="color: #006600;">y</span> += _targetY;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>If you now test your applcation on your device or in Device Central you should see your sphere moving around on your screen.<br />
As you see every time an update of accelerometer is being dispatched the new position is being saved in the _targetX &amp; _targetY variable, thanks to the EnterFrame we move our sphere around the stage.</p>
<p>Here the complete code for you to review:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Bitmap</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">StageAlign</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">StageScaleMode</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">AccelerometerEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">sensors</span>.<span style="color: #006600;">Accelerometer</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> AcceleroBall <span style="color: #0066CC;">extends</span> Sprite
	<span style="color: #66cc66;">&#123;</span>
		<span style="color: #66cc66;">&#91;</span>Embed<span style="color: #66cc66;">&#40;</span>source=<span style="color: #ff0000;">&quot;sphere.png&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> sphereClass:<span style="color: #000000; font-weight: bold;">Class</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _sphere			:Bitmap;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _factor			:uint			= <span style="color: #cc66cc;">50</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _accelerometer		:Accelerometer;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _targetX			:<span style="color: #0066CC;">Number</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _targetY			:<span style="color: #0066CC;">Number</span>;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> AcceleroBall<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>
			setup<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">function</span> setup<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span> Accelerometer.<span style="color: #006600;">isSupported</span> <span style="color: #66cc66;">&#41;</span>
			<span style="color: #66cc66;">&#123;</span>
				_accelerometer = <span style="color: #000000; font-weight: bold;">new</span> Accelerometer<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
				_accelerometer.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span> AccelerometerEvent.<span style="color: #006600;">UPDATE</span>, onAccelUpdate <span style="color: #66cc66;">&#41;</span>;
&nbsp;
				_sphere = <span style="color: #000000; font-weight: bold;">new</span> sphereClass<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
				_sphere.<span style="color: #006600;">scaleX</span> = _sphere.<span style="color: #006600;">scaleY</span> = .2;
				addChild<span style="color: #66cc66;">&#40;</span> _sphere <span style="color: #66cc66;">&#41;</span>;
&nbsp;
				addEventListener<span style="color: #66cc66;">&#40;</span>Event.<span style="color: #006600;">ENTER_FRAME</span>, moveSphere <span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #b1b100;">else</span>
			<span style="color: #66cc66;">&#123;</span>
				<span style="color: #808080; font-style: italic;">//display message to user that accelerometer is not available</span>
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">function</span> onAccelUpdate<span style="color: #66cc66;">&#40;</span> event:AccelerometerEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			_targetX = event.<span style="color: #006600;">accelerationX</span> <span style="color: #66cc66;">*</span> _factor;
			_targetY = event.<span style="color: #006600;">accelerationY</span> <span style="color: #66cc66;">*</span> _factor;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">function</span> moveSphere<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
		<span style="color: #66cc66;">&#123;</span>
			_sphere.<span style="color: #006600;">x</span> -= _targetX;
			_sphere.<span style="color: #006600;">y</span> += _targetY;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Now it&#8217;s up on you to create the boundaries, some holes on the floor, and there you go you have your first Flash Game.</p>
<p>If you have questions, don&#8217;t hesitate to comment on this post.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.six4rty.ch/2010/11/21/android-as3-accelerometer/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/2.5/ch/</creativeCommons:license>
	</item>
		<item>
		<title>AIR: Quick Hint: Suppress Keyboard Events</title>
		<link>http://blog.six4rty.ch/2010/11/09/air-quick-hint-suppress-keyboard-events/</link>
		<comments>http://blog.six4rty.ch/2010/11/09/air-quick-hint-suppress-keyboard-events/#comments</comments>
		<pubDate>Tue, 09 Nov 2010 00:18:38 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[AIR]]></category>
		<category><![CDATA[Quick Hints]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[Kiosk]]></category>

		<guid isPermaLink="false">http://blog.six4rty.ch/?p=878</guid>
		<description><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2010%252F11%252F09%252Fair-quick-hint-suppress-keyboard-events%252F&title=AIR%3A+Quick+Hint%3A+Suppress+Keyboard+Events&desc=I%27ve++been+lately+working+on+a+Multitouch+Kiosk+Project%2C+in+the+upcoming++days%2C+I%27ll+be+posting+some+of+the+quick+hints+I+think+they+are+worth++sharing%2C+some+of+them+are+simply+good+to+know%2C+others+ar&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div>I&#8217;ve been lately working on a Multitouch Kiosk Project, in the upcoming days, I&#8217;ll be posting some of the quick hints I think they are worth sharing, some of them are simply good to know, others are braintwisting challenges I faced during the development. Today, I would like to show you how to suppress certain [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2010%252F11%252F09%252Fair-quick-hint-suppress-keyboard-events%252F&title=AIR%3A+Quick+Hint%3A+Suppress+Keyboard+Events&desc=I%27ve++been+lately+working+on+a+Multitouch+Kiosk+Project%2C+in+the+upcoming++days%2C+I%27ll+be+posting+some+of+the+quick+hints+I+think+they+are+worth++sharing%2C+some+of+them+are+simply+good+to+know%2C+others+ar&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div><p><img class="alignleft" style="margin: 10px;" title="airCode" src="../wp-content/uploads/2010/10/airCode-300x270.jpg" alt="" width="137" height="124" />I&#8217;ve  been lately working on a Multitouch Kiosk Project, in the upcoming  days, I&#8217;ll be posting some of the quick hints I think they are worth  sharing, some of them are simply good to know, others are braintwisting  challenges I faced during the development.</p>
<p>Today, I would like to show you how to suppress certain Keyboard Events, let&#8217;s say you setup a kiosk application where the keyboard has to stay attached to the computer and available to the users, there are two ways you can prevent the application to be closed by a kiosk visitor:</p>
<p>A) You take hammer and hit the ESC key out of the keyboard<br />
B) You write a simple small function that will take care of it.</p>
<p>I know I know option A is more fun, but we prefer going with option B.</p>
<p>So let&#8217;s have a look what we need to do:<span id="more-878"></span><br />
1. As soon as our application starts we need to tell our application to go full screen interactive and add an eventlistener for Event.CLOSE and KeyboardEvent.KEYDOWN.<br />
2. When the user tries to exit the application by either trying a key combination or CMD+Q (Win: ALT+F4) these events will popup and do whatever you wrote in the callback, this is how it should look like:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">addEventListener<span style="color: #66cc66;">&#40;</span> KeyboardEvent.<span style="color: #006600;">KEYDOWN</span>, <span style="color: #0066CC;">onKeyDown</span> <span style="color: #66cc66;">&#41;</span>;
addEventListener<span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">CLOSING</span>, <span style="color: #0066CC;">onClose</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">onKeyDown</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">e</span>:KeyboardEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
      <span style="color: #0066CC;">e</span>.<span style="color: #006600;">preventDefault</span><span style="color: #66cc66;">&#40;</span><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> <span style="color: #0066CC;">onClose</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">e</span>:Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span>
<span style="color: #66cc66;">&#123;</span>
      <span style="color: #0066CC;">e</span>.<span style="color: #006600;">preventDefault</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Yep the magic happens with the preventDefault() method, as it says it prevents the default action to happen. Additionally you could assign an if statement to the onKeyDown event where you listen for a specific combination of keys so you can really close the application.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.six4rty.ch/2010/11/09/air-quick-hint-suppress-keyboard-events/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/2.5/ch/</creativeCommons:license>
	</item>
		<item>
		<title>AIR: Quick hint: Going Fullscreen</title>
		<link>http://blog.six4rty.ch/2010/10/16/air-quick-hint-going-fullscreen/</link>
		<comments>http://blog.six4rty.ch/2010/10/16/air-quick-hint-going-fullscreen/#comments</comments>
		<pubDate>Sat, 16 Oct 2010 15:51:12 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[AIR]]></category>
		<category><![CDATA[Quick Hints]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[fullscren]]></category>

		<guid isPermaLink="false">http://blog.six4rty.ch/?p=872</guid>
		<description><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2010%252F10%252F16%252Fair-quick-hint-going-fullscreen%252F&title=AIR%3A+Quick+hint%3A+Going+Fullscreen&desc=I%27ve+been+lately+working+on+a+Multitouch+Kiosk+Project%2C+in+the+upcoming+days%2C+I%27ll+be+posting+some+of+the+quick+hints+I+think+they+are+worth+sharing%2C+some+of+them+are+simply+good+to+know%2C+others+are+b&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div>I&#8217;ve been lately working on a Multitouch Kiosk Project, in the upcoming days, I&#8217;ll be posting some of the quick hints I think they are worth sharing, some of them are simply good to know, others are braintwisting challenges I faced during the development. To start off I would like to show you people how [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2010%252F10%252F16%252Fair-quick-hint-going-fullscreen%252F&title=AIR%3A+Quick+hint%3A+Going+Fullscreen&desc=I%27ve+been+lately+working+on+a+Multitouch+Kiosk+Project%2C+in+the+upcoming+days%2C+I%27ll+be+posting+some+of+the+quick+hints+I+think+they+are+worth+sharing%2C+some+of+them+are+simply+good+to+know%2C+others+are+b&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div><p><img class="alignleft size-medium wp-image-875" style="margin: 10px;" title="airCode" src="http://blog.six4rty.ch/wp-content/uploads/2010/10/airCode-300x270.jpg" alt="" width="137" height="124" />I&#8217;ve been lately working on a Multitouch Kiosk Project, in the upcoming days, I&#8217;ll be posting some of the quick hints I think they are worth sharing, some of them are simply good to know, others are braintwisting challenges I faced during the development.</p>
<p>To start off I would like to show you people how to go FullScreen on Startup of your application, before I show you how that works, let me tell you one very important thing:<br />
Going fullscreen rightaway without any user interaction is ONLY available within Adobe AIR, don&#8217;t try this with a pure AS3 or a Flex Project as this will not work!</p>
<p>Why? Security! People visiting a website shouldn&#8217;t be capped by a website taking over the whole screen without them wanting to do so, in AIR you create an application that a user will need to install to be able to run it, therefore other security aspects.</p>
<p>Enough of gray theory, let&#8217;s have a look how to do this very complicated task <img src='http://blog.six4rty.ch/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">//default fullscreenmode</span>
<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">displayState</span> = StageDisplayState.<span style="color: #006600;">FULL_SCREEN</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">//fullscreen mode with interactivity</span>
<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">displayState</span> = StageDisplayState.<span style="color: #006600;">FULLSCREEN_INTERACTIVE</span>;
&nbsp;
<span style="color: #808080; font-style: italic;">//going back to normal screen</span>
<span style="color: #0066CC;">stage</span>.<span style="color: #006600;">displayState</span> = StageDisplayState.<span style="color: #006600;">NORMAL</span>;</pre></div></div>

<p><span id="more-872"></span><br />
Yep that is all you need, in a typical AIR Application you would add an EventListener to your application where when creation has been completed it should call up the method above.</p>
<p>Example of AS3 application:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> myApp<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>
<span style="color: #66cc66;">&#123;</span>
        <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">displayState</span> = StageDisplayState.<span style="color: #006600;">FULL_SCREEN</span>;
	subs = gridSize-<span style="color: #cc66cc;">1</span>;
&nbsp;
	particles = <span style="color: #000000; font-weight: bold;">new</span> Vector.<span style="color: #66cc66;">&amp;</span>gt;<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
	_attractions = <span style="color: #000000; font-weight: bold;">new</span> Vector.;
	s = <span style="color: #000000; font-weight: bold;">new</span> ParticleSystem<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Vector3D<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0.2</span>, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>, .01<span style="color: #66cc66;">&#41;</span>;
&nbsp;
	_attractor = s.<span style="color: #006600;">makeParticle</span><span style="color: #66cc66;">&#40;</span> .8, <span style="color: #000000; font-weight: bold;">new</span> Vector3D<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">4</span>,-<span style="color: #cc66cc;">0.2</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
	<span style="color: #000000; font-weight: bold;">var</span> tmp_bm:Bitmap = <span style="color: #000000; font-weight: bold;">new</span> Img<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> as Bitmap;
	texture = tmp_bm.<span style="color: #006600;">bitmapData</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://blog.six4rty.ch/2010/10/16/air-quick-hint-going-fullscreen/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/2.5/ch/</creativeCommons:license>
	</item>
		<item>
		<title>AS3: OSMF LightweightElement</title>
		<link>http://blog.six4rty.ch/2010/10/02/as3-osmf-lightweightelement/</link>
		<comments>http://blog.six4rty.ch/2010/10/02/as3-osmf-lightweightelement/#comments</comments>
		<pubDate>Sat, 02 Oct 2010 12:32:41 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[Adobe]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[OSMF]]></category>
		<category><![CDATA[Quick Hints]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[AS 3.0]]></category>
		<category><![CDATA[video]]></category>

		<guid isPermaLink="false">http://blog.six4rty.ch/?p=861</guid>
		<description><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2010%252F10%252F02%252Fas3-osmf-lightweightelement%252F&title=AS3%3A+OSMF+LightweightElement&desc=You+are+in+need+of+a+simple+video+player%2C+iightweight+and+easy+to+use%3F%0D%0AYou+think+OSMF+is+too+complicated%2C+let+me+correct+you+and+present+you+the+LightVideoElement+Class.%0D%0A%0D%0ASimple+to+use%2C+quickly+up+&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div>You are in need of a simple video player, iightweight and easy to use? You think OSMF is too complicated, let me correct you and present you the LightVideoElement Class. Simple to use, quickly up and running and all needed &#8220;basic&#8221; features available. It&#8217;s even a default in OSMF, I actually wonder why no one [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2010%252F10%252F02%252Fas3-osmf-lightweightelement%252F&title=AS3%3A+OSMF+LightweightElement&desc=You+are+in+need+of+a+simple+video+player%2C+iightweight+and+easy+to+use%3F%0D%0AYou+think+OSMF+is+too+complicated%2C+let+me+correct+you+and+present+you+the+LightVideoElement+Class.%0D%0A%0D%0ASimple+to+use%2C+quickly+up+&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div><p><a href="http://blog.six4rty.ch/wp-content/uploads/2010/08/osmfcode.jpg"><img class="alignleft size-medium wp-image-807" style="margin: 10px;" title="osmfcode" src="http://blog.six4rty.ch/wp-content/uploads/2010/08/osmfcode-300x270.jpg" alt="" width="210" height="189" /></a>You are in need of a simple video player, iightweight and easy to use?<br />
You think OSMF is too complicated, let me correct you and present you the LightVideoElement Class.</p>
<p>Simple to use, quickly up and running and all needed &#8220;basic&#8221; features available.<br />
It&#8217;s even a default in OSMF, I actually wonder why no one has written about it yet, it&#8217;s really easy to use and you can do all the basic things with it that a videoplayer needs to support nowadays and on top of it, it&#8217;s only 10k when compiled.</p>
<p>I&#8217;ve been using it for the last 2 projects I&#8217;ve made, and I couldn&#8217;t be happier, let&#8217;s have a quick look on how to use it:<span id="more-861"></span></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">_mediaPlayerSprite		= <span style="color: #000000; font-weight: bold;">new</span> MediaPlayerSprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
_mediaPlayerSprite.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0x000000, <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span>;
_mediaPlayerSprite.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">drawRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">640</span>,<span style="color: #cc66cc;">360</span><span style="color: #66cc66;">&#41;</span>;
_mediaPlayerSprite.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
_videoElement			= <span style="color: #000000; font-weight: bold;">new</span> LightweightVideoElement<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
_videoElement.<span style="color: #006600;">resource</span>		= <span style="color: #000000; font-weight: bold;">new</span> URLResource<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">&quot;pathtoyourvideo.flv&quot;</span> <span style="color: #66cc66;">&#41;</span>;
_videoElement.<span style="color: #0066CC;">smoothing</span>		= <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
addChild<span style="color: #66cc66;">&#40;</span> _mediaPlayerSprite <span style="color: #66cc66;">&#41;</span>;
_mediaPlayerSprite.<span style="color: #006600;">media</span>		= _videoElement;</pre></div></div>

<p>That&#8217;s it, no I&#8217;m not joking this is really it, you don&#8217;t need anything else to simply play a video,  now you might be asking yourself, well that&#8217;s cool but how can I control the playback? It&#8217; easy and very intuitive, basically you only need to access the mediaplayer instance which is integrated into the _mediaPlayerSprite, there all public methods like play, pause, stop, events and so on are available for you to use. take a look at some of the functions i implemented  to be able to control videoplayback.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">play</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>
	_mediaPlayerSprite.<span style="color: #006600;">mediaPlayer</span>.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">pause</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>
	_mediaPlayerSprite.<span style="color: #006600;">mediaPlayer</span>.<span style="color: #0066CC;">pause</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">stop</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>
	_mediaPlayerSprite.<span style="color: #006600;">mediaPlayer</span>.<span style="color: #0066CC;">stop</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> currentTime<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">int</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">return</span> _mediaPlayerSprite.<span style="color: #006600;">mediaPlayer</span>.<span style="color: #006600;">currentTime</span>;
<span style="color: #66cc66;">&#125;</span>
&nbsp;
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> videoDuration<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">int</span>
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #b1b100;">return</span> _mediaPlayerSprite.<span style="color: #006600;">mediaPlayer</span>.<span style="color: #0066CC;">duration</span>;
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>See, simple, easy and lighting fast.<br />
But keep in mind that the LightWeightVideoElement has limited support, you can play every kind of flash supported videos, you can do everything a basic player needs to do, but as soon you start using SerialElements, Parallel elements and so on, then you should switch back to the default setup.<br />
As usual you can get all the information and documentation from the official <a href="http://www.opensourcemediaframework.com">OSMF</a> site.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.six4rty.ch/2010/10/02/as3-osmf-lightweightelement/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/2.5/ch/</creativeCommons:license>
	</item>
		<item>
		<title>AS3: Embed specific characters (part.2)</title>
		<link>http://blog.six4rty.ch/2010/08/23/as3-embed-specific-characters-part-2/</link>
		<comments>http://blog.six4rty.ch/2010/08/23/as3-embed-specific-characters-part-2/#comments</comments>
		<pubDate>Mon, 23 Aug 2010 21:44:38 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Quick Hints]]></category>
		<category><![CDATA[Utils]]></category>
		<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[Font]]></category>

		<guid isPermaLink="false">http://blog.six4rty.ch/?p=840</guid>
		<description><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2010%252F08%252F23%252Fas3-embed-specific-characters-part-2%252F&title=AS3%3A+Embed+specific+characters+%28part.2%29&desc=Just+as+a+quick+update%2C+I%27ve+updated+the+previously+created+unicode+finder+app%2C+to+be+a+bit+more+helpful+for+the+everyday+usage.%0D%0AHere+a+list+of+things+that+have+been+changed%3A%0D%0A%0D%0A%09No+double+unicodes.%0D&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div>Just as a quick update, I&#8217;ve updated the previously created unicode finder app, to be a bit more helpful for the everyday usage. Here a list of things that have been changed: No double unicodes. Automatic generation of embed code, easy for you to copy &#38; paste directly into your application. One thing that I [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2010%252F08%252F23%252Fas3-embed-specific-characters-part-2%252F&title=AS3%3A+Embed+specific+characters+%28part.2%29&desc=Just+as+a+quick+update%2C+I%27ve+updated+the+previously+created+unicode+finder+app%2C+to+be+a+bit+more+helpful+for+the+everyday+usage.%0D%0AHere+a+list+of+things+that+have+been+changed%3A%0D%0A%0D%0A%09No+double+unicodes.%0D&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div><p>Just as a quick update, I&#8217;ve updated the previously created unicode finder app, to be a bit more helpful for the everyday usage.<br />
Here a list of things that have been changed:</p>
<ul>
<li>No double unicodes.</li>
<li>Automatic generation of embed code, easy for you to copy &amp; paste directly into your application.</li>
</ul>
<p>One thing that I can&#8217;t handle for you is to define the source of the font with it&#8217;s according fontname as defined in your system, but hey if I find a way around this, I will update it.</p>
<p>And again if you would like to play around with it, here the app. Have fun!</p>

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="swfobj_0" width="616" height="494">
      <param name="movie" value="http://blog.six4rty.ch/wp-content/uploads/2010/08/UnicodeFinder1.swf" />
      <param name="allowfullscreen" value="true" />
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="http://blog.six4rty.ch/wp-content/uploads/2010/08/UnicodeFinder1.swf" width="616" height="494" allowfullscreen="true">
      <!--<![endif]-->
        
      <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>

]]></content:encoded>
			<wfw:commentRss>http://blog.six4rty.ch/2010/08/23/as3-embed-specific-characters-part-2/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/2.5/ch/</creativeCommons:license>
	</item>
		<item>
		<title>AS3: Embed specific characters</title>
		<link>http://blog.six4rty.ch/2010/08/21/as3-embed-specific-characters/</link>
		<comments>http://blog.six4rty.ch/2010/08/21/as3-embed-specific-characters/#comments</comments>
		<pubDate>Sat, 21 Aug 2010 17:40:31 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Quick Hints]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[Utils]]></category>
		<category><![CDATA[AS 3.0]]></category>
		<category><![CDATA[Font]]></category>

		<guid isPermaLink="false">http://blog.six4rty.ch/?p=820</guid>
		<description><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2010%252F08%252F21%252Fas3-embed-specific-characters%252F&title=AS3%3A+Embed+specific+characters&desc=%0D%0A%0D%0AYou+might+have+read+on+one+of+my+previous+tweets%2C+where+I+was+screaming+about+using+%22special%22+characters+in+Flash%2C+with+%22special%22+I+mean+arabic%2C+cyrillic%2C+hebrew%2C+chinese+simplified+and+traditiona&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div>You might have read on one of my previous tweets, where I was screaming about using &#8220;special&#8221; characters in Flash, with &#8220;special&#8221; I mean arabic, cyrillic, hebrew, chinese simplified and traditional, as well japanese. I know,  I know, there is TLF (Text Layout Framework) that handles the whole text, but I&#8217;m talking about embedding the [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2010%252F08%252F21%252Fas3-embed-specific-characters%252F&title=AS3%3A+Embed+specific+characters&desc=%0D%0A%0D%0AYou+might+have+read+on+one+of+my+previous+tweets%2C+where+I+was+screaming+about+using+%22special%22+characters+in+Flash%2C+with+%22special%22+I+mean+arabic%2C+cyrillic%2C+hebrew%2C+chinese+simplified+and+traditiona&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div><p><img class="alignleft size-medium wp-image-724" style="margin: 10px;" title="as3code" src="http://blog.six4rty.ch/wp-content/uploads/2010/07/as3code-300x270.jpg" alt="" width="210" height="189" /></p>
<p>You might have read on one of my previous tweets, where I was screaming about using &#8220;special&#8221; characters in Flash, with &#8220;special&#8221; I mean arabic, cyrillic, hebrew, chinese simplified and traditional, as well japanese.</p>
<p>I know,  I know, there is TLF (Text Layout Framework) that handles the whole text, but I&#8217;m talking about embedding the font, did you knew that the complete chinese Unicode range helds something around 20&#8217;000 characters? You might think so what? Let me tell you that the complete chinese character range is over 7MB big!!! Do you really want to let your viewers download a 7MB file just for the font? No.</p>
<p>So I&#8217;ve created a quick app that will enable you to read out the UTF code from the text you need to use, with it you can specifically embed only the characters you need and take the file size down to a minimum. Now there is only a downside of this method, if the textual content changes a day, you need to again import the new characters.<br />
Apart from that, I haven&#8217;t seen any bad things about this implementation.</p>
<p>At the end of this post you will find an useful small tool to get all the needed characters.<span id="more-820"></span></p>
<p>As an example below with this line you are embedding a font only containing numerals typing 1234567890 will give you a range from U+0030 to U+0039</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">Embed(source=&quot;font_file_name&quot;, fontName=&quot;font_name&quot;, mimeType=&quot;application/x-font-truetype&quot;, unicodeRange=&quot;U+0030-U+0039,U+002E&quot;)]</pre></div></div>

<p>So let&#8217;s assume you would like to write this: <em>&#8220;Nemusíte oči vidět, musíte vidění&#8221;</em> which means <em>&#8220;You don&#8217;t need eyes to see, you need vision&#8221;</em> and only embed the needed characters, you would embed your font like this</p>

<div class="wp_syntax"><div class="code"><pre class="xml" style="font-family:monospace;">Embed(source=&quot;font_file_name&quot;, fontName=&quot;font_name&quot;,  mimeType=&quot;application/x-font-truetype&quot;,  unicodeRange=&quot;U+004e, U+0065, U+006d, U+0075, U+0073, U+00ed, U+0074, U+0065, U+0020,  U+006f, U+010d, U+0069, U+0020, U+0076, U+0069, U+0064, U+011b, U+0074,  U+002c, U+0020, U+006d, U+0075, U+0073, U+00ed, U+0074, U+0065, U+0020,  U+0076, U+0069, U+0064, U+011b, U+006e, U+00ed&quot;)]</pre></div></div>

<p>If you don&#8217;t know how to use this kind of font embedding, have a read here:<a href="http://soledadpenades.com/2008/10/21/embedding-fonts-in-actionscript-3-using-flex-sdk/" target="_blank"></p>
<p>http://soledadpenades.com/2008/10/21/embedding-fonts-in-actionscript-3-using-flex-sdk/</a></p>
<p>Test ride it your self and have fun <img src='http://blog.six4rty.ch/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>

    <object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" id="swfobj_1" width="616" height="494">
      <param name="movie" value="http://blog.six4rty.ch/wp-content/uploads/2010/08/UnicodeFinder1.swf" />
      <param name="allowfullscreen" value="true" />
      <!--[if !IE]>-->
      <object type="application/x-shockwave-flash" data="http://blog.six4rty.ch/wp-content/uploads/2010/08/UnicodeFinder1.swf" width="616" height="494" allowfullscreen="true">
      <!--<![endif]-->
        
      <!--[if !IE]>-->
      </object>
      <!--<![endif]-->
    </object>

]]></content:encoded>
			<wfw:commentRss>http://blog.six4rty.ch/2010/08/21/as3-embed-specific-characters/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/2.5/ch/</creativeCommons:license>
	</item>
		<item>
		<title>Foundation Flash CS5</title>
		<link>http://blog.six4rty.ch/2010/08/08/foundation-flash-cs5/</link>
		<comments>http://blog.six4rty.ch/2010/08/08/foundation-flash-cs5/#comments</comments>
		<pubDate>Sun, 08 Aug 2010 17:32:04 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[Books]]></category>
		<category><![CDATA[CS5]]></category>
		<category><![CDATA[Flash]]></category>

		<guid isPermaLink="false">http://blog.six4rty.ch/?p=817</guid>
		<description><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2010%252F08%252F08%252Ffoundation-flash-cs5%252F&title=Foundation+Flash+CS5&desc=After+4+years+Tom+Green+and+I+just+published+our+latest+book%2C+this+time+we+are+not+talking+about+Flash+%26amp%3B+After+Effects%2C+rather+the+newest+and+coolest+version+since+the+history+of+Flash%2C+Adobe%27s+Fl&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div>After 4 years Tom Green and I just published our latest book, this time we are not talking about Flash &#38; After Effects, rather the newest and coolest version since the history of Flash, Adobe&#8217;s Flash CS5. If you are just learning the ins and outs of flash, then this is a book you shouldn&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2010%252F08%252F08%252Ffoundation-flash-cs5%252F&title=Foundation+Flash+CS5&desc=After+4+years+Tom+Green+and+I+just+published+our+latest+book%2C+this+time+we+are+not+talking+about+Flash+%26amp%3B+After+Effects%2C+rather+the+newest+and+coolest+version+since+the+history+of+Flash%2C+Adobe%27s+Fl&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div><p><a href="http://blog.six4rty.ch/wp-content/uploads/2010/08/9781430229940.jpg"><img class="alignleft size-full wp-image-818" title="9781430229940" src="http://blog.six4rty.ch/wp-content/uploads/2010/08/9781430229940.jpg" alt="" width="200" height="247" /></a>After 4 years Tom Green and I just published our latest book, this time we are not talking about Flash &amp; After Effects, rather the newest and coolest version since the history of Flash, Adobe&#8217;s Flash CS5. If you are just learning the ins and outs of flash, then this is a book you shouldn&#8217;t miss, lots of examples, code snippets, cool projects and even an Android game is being built.</p>
<p>Flash is one of the most engaging, innovative, and versatile  technologies available—allowing the creation of anything from animated  banners and simple cartoons, to Rich Internet Applications, interactive  videos, and dynamic user interfaces for web sites, kiosks, devices, or  DVDs. The possibilities are endless, and now it just got better.</p>
<p>Flash CS5 boasts a host of new features, including the  much-anticipated iPhone application creation feature, a whole new  animation engine enabling full manipulation of tweens and paths, custom  easing, improved inverse kinematics, a revamped timeline, built-in 3D,  and much more.</p>
<p><span id="more-817"></span></p>
<p>This book is all you&#8217;ll need to learn Flash CS5 from the ground up.  If you already have Flash experience, this book will allow you to  quickly catch up on all the cool new features. Flash experts Tom Green  and Tiago Dias guide you step-by-step through all facets of Flash CS5,  keeping the emphasis firmly on good design techniques that you use in  your own projects.</p>
<ul>
<li>Learn Flash design from the ground up, or just get to grips with the new features, with a series of step-by-step tutorials.</li>
<li>Provides an easy introduction to ActionScript 3.0 coding, but the focus is mainly kept on design.</li>
<li>Learn from the experts—written by renowned Flash designers Tom Green and Tiago Dias.</li>
</ul>
<h3>What You&#8217;ll Learn</h3>
<ul>
<li>How to create an iPhone application.</li>
<li>The ins and outs of the Flash CS5 interface</li>
<li>How to use all of Flash CS5&#8242;s essential features, such as text, graphics, and animation</li>
<li>How to use video and sound effectively in Flash</li>
<li>The fundamentals of Flash CS5’s new animation and timeline features</li>
<li>The basics of ActionScript 3.0</li>
<li>How to populate a Flash movie with dynamic data such as XML.</li>
</ul>
<h3>Who this book is for</h3>
<p>This book is for both beginners who want a solid grounding in Flash  CS5, and designers with previous Flash experience, who want to get up to  speed with the new features.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.six4rty.ch/2010/08/08/foundation-flash-cs5/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/2.5/ch/</creativeCommons:license>
	</item>
		<item>
		<title>AS3: Multiline textfields and Line Metrics</title>
		<link>http://blog.six4rty.ch/2010/07/31/as3-multiline-textfields-and-line-metrics/</link>
		<comments>http://blog.six4rty.ch/2010/07/31/as3-multiline-textfields-and-line-metrics/#comments</comments>
		<pubDate>Sat, 31 Jul 2010 11:25:25 +0000</pubDate>
		<dc:creator>Tiago</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flex]]></category>
		<category><![CDATA[Quick Hints]]></category>
		<category><![CDATA[Tutorials]]></category>
		<category><![CDATA[AS3.0]]></category>
		<category><![CDATA[StringUtil]]></category>
		<category><![CDATA[TextField]]></category>

		<guid isPermaLink="false">http://blog.six4rty.ch/?p=791</guid>
		<description><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2010%252F07%252F31%252Fas3-multiline-textfields-and-line-metrics%252F&title=AS3%3A+Multiline+textfields+and+Line+Metrics&desc=Last+week+I+had+to+do+something+that+I+never+thought+of%2C+let+me+present+you+the+case%3A%0D%0A%0D%0AFirst+of+all+we+have+a+multiline%2C+word-wrapped+textfield+in+AS3%2C+the+text+is+picked+up+from+an+external+XML+fil&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div>Last week I had to do something that I never thought of, let me present you the case: First of all we have a multiline, word-wrapped textfield in AS3, the text is picked up from an external XML file and gets styled with a CSS stylesheet, the textfield CAN have one line or multiple lines [...]]]></description>
			<content:encoded><![CDATA[<div style="padding-top:5px;padding-right:0px;padding-bottom:5px;padding-left:0px;;">
											<iframe
												style="height:25px !important; border:0px solid gray !important; overflow:hidden !important; width:550px !important;" frameborder="0" scrolling="no" allowTransparency="true"
												src="http://www.linksalpha.com/social?blog=Tiago%26%23039%3Bs+Weblog&link=http%253A%252F%252Fblog.six4rty.ch%252F2010%252F07%252F31%252Fas3-multiline-textfields-and-line-metrics%252F&title=AS3%3A+Multiline+textfields+and+Line+Metrics&desc=Last+week+I+had+to+do+something+that+I+never+thought+of%2C+let+me+present+you+the+case%3A%0D%0A%0D%0AFirst+of+all+we+have+a+multiline%2C+word-wrapped+textfield+in+AS3%2C+the+text+is+picked+up+from+an+external+XML+fil&fc=333333&fs=arial&fblname=like&fblref=facebook&fbllang=en_US&fblshow=1&fbsbutton=1&fbsctr=1&fbslang=en&fbsendbutton=1&twbutton=1&twlang=en&twmention=six4rty&twrelated1=&twrelated2=&twctr=1&lnkdshow=show&lnkdctr=1&buzzbutton=1&buzzlang=en&buzzctr=0&diggbutton=1&diggctr=0&stblbutton=1&stblctr=0&g1button=1&g1ctr=1&g1lang=en-US">
											</iframe>
										</div><p><a href="http://blog.six4rty.ch/wp-content/uploads/2010/07/as3code.jpg"><img class="alignleft size-medium wp-image-724" style="margin: 10px;" title="as3code" src="http://blog.six4rty.ch/wp-content/uploads/2010/07/as3code-300x270.jpg" alt="" width="210" height="189" /></a>Last week I had to do something that I never thought of, let me present you the case:</p>
<p>First of all we have a multiline, word-wrapped textfield in AS3, the text is picked up from an external XML file and gets styled with a CSS stylesheet, the textfield CAN have one line or multiple lines (depending on the translation and the language used), if the text is only an one-liner, the graphic (a simple small gray arrow) needs to be placed after the text in the middle of the first line, so you are able to visualize this, think about a standard &lt;li&gt; tag where you get the black dot, in my case just at the other side eg. at the end fo the line. have a look at the <a rel="lightbox" href="http://blog.six4rty.ch/wp-content/uploads/2010/07/lastLine.jpg">Example</a> for a visual clarification what I want to achieve.</p>
<p>Basically a simple task, you grab the textlength add the gutter and margin to it and place the small arrow at that position.. but what do you do when the text goes multine and word wraps automatically?<br />
After doing some experiments, I&#8217;ve came up with a simple yet appropriate solution for this.<br />
<span id="more-791"></span>Let&#8217;s start with a simple text field, containing some text and setup for multiline and wordwrapping.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> tf:<span style="color: #0066CC;">TextField</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">TextField</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
tf.<span style="color: #0066CC;">text</span> = <span style="color: #ff0000;">&quot;Lorem Ipsum is simply dummy text of the printing and typesetting industry.&quot;</span>;
tf.<span style="color: #0066CC;">width</span> = <span style="color: #cc66cc;">100</span>;
tf.<span style="color: #0066CC;">multiline</span> = <span style="color: #000000; font-weight: bold;">true</span>;
tf.<span style="color: #0066CC;">wordWrap</span> = <span style="color: #000000; font-weight: bold;">true</span>;
addChild<span style="color: #66cc66;">&#40;</span> tf <span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>This will display a simple textfield without any formatting with 5 lines of content. Why did I set a width value on my textfield? Well without it, the textfield would just be as wide as the text, resulting in a single line text, and that&#8217;s not what we want.</p>
<p>Now we create a simple square / dot / arrow whatever you like acting as a marker for the end of line, so you can visualize what&#8217;s happening, I&#8217;ve created a small rectangle like this:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> rect:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
rect.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0xff0000<span style="color: #66cc66;">&#41;</span>;
rect.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">drawRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">10</span>, <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
rect.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">endFill</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
addChild<span style="color: #66cc66;">&#40;</span> rect <span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Simple rectangle, doesn&#8217;t need much of an explanation, maybe you asking yourself why I&#8217;ve set it at x &amp; y 0? Although I could position the rectangle right at the proper position I always preferred to use the setters of it so I rather create all my shapes/graphs at 0,0 and move them with myShape.x = 100, it makes things more obvious to read and you find it much quicker then doing directly on the drawRect() method.</p>
<p>Next up let&#8217;s have a look at our class that returns the requested values.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> StringUtil
<span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> _lastChar		:TextLineMetrics;
	<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">_x</span>			:<span style="color: #0066CC;">int</span>;
	<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">_y</span>			:<span style="color: #0066CC;">int</span>;
&nbsp;
	<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> _gutter		:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">2</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> getEndOfLine<span style="color: #66cc66;">&#40;</span> tf:<span style="color: #0066CC;">TextField</span>, line:<span style="color: #0066CC;">int</span> <span style="color: #66cc66;">&#41;</span>:Point
	<span style="color: #66cc66;">&#123;</span>
		_lastChar 	= tf.<span style="color: #006600;">getLineMetrics</span><span style="color: #66cc66;">&#40;</span>line<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #0066CC;">_x</span>		= tf.<span style="color: #006600;">x</span> + _lastChar.<span style="color: #0066CC;">width</span> + _gutter;
		<span style="color: #0066CC;">_y</span>		= _lastChar.<span style="color: #0066CC;">height</span> <span style="color: #66cc66;">*</span> line  + _lastChar.<span style="color: #006600;">ascent</span>;
&nbsp;
		<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">new</span> Point<span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">_x</span>, <span style="color: #0066CC;">_y</span> <span style="color: #66cc66;">&#41;</span>;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>What we are doing here is rather simple then you think. First we pass the textfield and the desired line to our static function, then using the getLineMetrics() method we return the desired line&#8217;s metrics, this can now be used to set an x and y position of the to be returned Point(). as you see at the _x value, I&#8217;m just telling it to add the textfields x position to the width of the requested line, at the end we add the gutter value for the textfield.<br />
The vertical position is another story, here we need to get the height of the desired line and multiply with it. this has the reason that there is no method available to get the proper y position of the line, so by multiplying the textheight with the desired line you get the proper y position of it. After that calculation we add the _lastCahr.ascent property of the line, asking what ascent? Take a look at the image below for more information about it but basically it&#8217;s just the length of the baseline to the top of the line height in pixels, so exactly the middle of our text.</p>
<p>Have a look at the image below for a nice and clean overview about the gutter of a flash textfield as well about the other properties a textfield has.</p>
<p><a href="http://blog.six4rty.ch/wp-content/uploads/2010/07/text-metrics.jpg" rel="lightbox"><img class="size-medium wp-image-800 alignnone" title="text-metrics" src="http://blog.six4rty.ch/wp-content/uploads/2010/07/text-metrics-300x200.jpg" alt="" width="180" height="120" /></a></p>
<p>Something you should also be aware of is that the width of the text line is relative to the textfield width, but you need to subtract the gutter width of 4 pixels (2 pixels on each side ).</p>
<p>Now that our class is available let&#8217;s take a look at how I used it for this example.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> point:Point = StringUtil.<span style="color: #006600;">getEndOfLine</span><span style="color: #66cc66;">&#40;</span> tf, tf.<span style="color: #006600;">numLines</span> - <span style="color: #cc66cc;">1</span> <span style="color: #66cc66;">&#41;</span>;
rect.<span style="color: #006600;">x</span> = point.<span style="color: #006600;">x</span>;
rect.<span style="color: #006600;">y</span> = point.<span style="color: #006600;">y</span>;</pre></div></div>

<p>What we are doing here is nothing else then creating a new Point based on the position returned by our class, passing the textfield and specially since I want to have the rectangle on the LAST line I just ask for the textfields number of lines &#8211; 1.</p>
<p><a href="http://blog.six4rty.ch/wp-content/uploads/2010/07/lastLine.jpg"><img class="size-full wp-image-794 alignnone" title="lastLine" src="http://blog.six4rty.ch/wp-content/uploads/2010/07/lastLine.jpg" alt="" width="199" height="113" /></a><br />
When running this example above you should see the small red rectangle on the last line of our textfield. yay!!!</p>
<p>You can download the StringUtil class here: <a href="http://blog.six4rty.ch/wp-content/uploads/2010/07/StringUtil.as_.zip">StringUtil.as</a><br />
Hope this serves you as well as it served me last week, and don&#8217;t forget to leave a comment if you have any questions about it.</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.six4rty.ch/2010/07/31/as3-multiline-textfields-and-line-metrics/feed/</wfw:commentRss>
		<slash:comments>12</slash:comments>
	<creativeCommons:license>http://creativecommons.org/licenses/by/2.5/ch/</creativeCommons:license>
	</item>
	</channel>
</rss>

