<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>Mark Ledford&#039;s Web Dev Blog</title>
	<atom:link href="http://www.markledford.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.markledford.com/blog</link>
	<description>Documenting the trials and triumphs of a mobile / front end web developer</description>
	<lastBuildDate>Fri, 03 Feb 2012 19:16:15 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
		<item>
		<title>iOS5 mobile safari changes and additions developers should be aware about</title>
		<link>http://www.markledford.com/blog/2011/10/14/ios5-mobile-safari-changes-and-additions-developers-should-be-aware-about/</link>
		<comments>http://www.markledford.com/blog/2011/10/14/ios5-mobile-safari-changes-and-additions-developers-should-be-aware-about/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 19:41:27 +0000</pubDate>
		<dc:creator>markledford</dc:creator>
				<category><![CDATA[html5]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iOS5]]></category>
		<category><![CDATA[mobile development]]></category>

		<guid isPermaLink="false">http://www.markledford.com/blog/?p=194</guid>
		<description><![CDATA[Mainly some notes for myself: * utilizes HTTP Pipelining (Sends multiple requests on the same connection) to avoid round trip delays on servers that support them * GPU accelerated rendering (for CSS transitions and such) * &#8220;async&#8221; attribute for scripts now supported * Loading of CSS scripts are now blocking * HTML5 Web workers support [...]]]></description>
			<content:encoded><![CDATA[<p>Mainly some notes for myself:<br />
* utilizes HTTP Pipelining (Sends multiple requests on the same connection) to avoid round trip delays on servers that support them<br />
* GPU accelerated rendering (for CSS transitions and such)<br />
* &#8220;async&#8221; attribute for scripts now supported<br />
* Loading of CSS scripts are now blocking<br />
* HTML5 Web workers support<br />
* CSS position: fixed<br />
* CSS overflow: scroll (-webkit-overflow-scrolling: touch;)<br />
* Still no browser based file upload (input type=&#8221;file&#8221;)<br />
* new input types: date, datetime, month, time, range<br />
* new EcmaScript 5 stuff</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markledford.com/blog/2011/10/14/ios5-mobile-safari-changes-and-additions-developers-should-be-aware-about/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Web app http request errors in iOS5 mobile safari caused by HTTP Pipelining?</title>
		<link>http://www.markledford.com/blog/2011/10/14/web-app-http-request-errors-in-ios5-mobile-safari-caused-by-http-pipelining/</link>
		<comments>http://www.markledford.com/blog/2011/10/14/web-app-http-request-errors-in-ios5-mobile-safari-caused-by-http-pipelining/#comments</comments>
		<pubDate>Fri, 14 Oct 2011 17:56:14 +0000</pubDate>
		<dc:creator>markledford</dc:creator>
				<category><![CDATA[html5]]></category>
		<category><![CDATA[iOS]]></category>
		<category><![CDATA[iOS5]]></category>
		<category><![CDATA[mobile development]]></category>

		<guid isPermaLink="false">http://www.markledford.com/blog/?p=165</guid>
		<description><![CDATA[iOS5 seams to have broken functionality in our HTML5 mobile webapp. Requesting audio media assets are currently failing 1 out of 2 times with one of two errors: The operation couldn&#8217;t be completed. (NSURLErrorDomain error &#8211; 1013.) The operation could not be completed After much research I&#8217;ve come to the conclusion that our authenticated media [...]]]></description>
			<content:encoded><![CDATA[<p>iOS5 seams to have broken functionality in our HTML5 mobile webapp. Requesting audio media assets are currently failing 1 out of 2 times with one of two errors:</p>
<p>The operation couldn&#8217;t be completed. (NSURLErrorDomain error &#8211; 1013.)<br />
The operation could not be completed</p>
<p>After much research I&#8217;ve come to the conclusion that our authenticated media host is having issues with the updated HTTP Request behavior in iOS5&#8242;s version of mobile Safari. iOS5 now uses its own flavor of HTTP Pipelining to speed up data transfer and my theory is somewhere along the line our host&#8217;s web server is disagreeing with it.</p>
<p>Since mobile networks usually have very high latency HTTP Pipelining allows the HTTP client to avoid round trips to the server by send multiple requests on the same connection without waiting for the server to respond. You can read up on iOS5&#8242;s version of HTTP Pipelining and the concept in general here:<br />
<a href="http://www.blaze.io/mobile/ios5-top10-performance-changes/" target="_blank">http://www.blaze.io/mobile/ios5-top10-performance-changes/</a><br />
<a href="http://www.blaze.io/mobile/http-pipelining-big-in-mobile/" target="_blank">http://www.blaze.io/mobile/http-pipelining-big-in-mobile/</a></p>
<p>We&#8217;ll be reaching out to our media content provider today to validate but I figured I would throw up a place for others experiencing the same issue to discuss as I am not seeing other posts about it yet.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markledford.com/blog/2011/10/14/web-app-http-request-errors-in-ios5-mobile-safari-caused-by-http-pipelining/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>The IE6 silver bullet for HTML5 CSS3 Webapp development: Chrome Frame</title>
		<link>http://www.markledford.com/blog/2011/10/11/the-ie-silver-bullet-chrome-frame/</link>
		<comments>http://www.markledford.com/blog/2011/10/11/the-ie-silver-bullet-chrome-frame/#comments</comments>
		<pubDate>Tue, 11 Oct 2011 19:30:34 +0000</pubDate>
		<dc:creator>markledford</dc:creator>
				<category><![CDATA[html5]]></category>
		<category><![CDATA[mobile development]]></category>

		<guid isPermaLink="false">http://www.markledford.com/blog/?p=160</guid>
		<description><![CDATA[Building javascript heavy webapps using html5 and css3 is tough when you have old but still stubbornly popular Internet Explorer browsers to support. The solution: Chrome Frame In Google&#8217;s words: Google Chrome Frame is an open source plug-in that seamlessly brings Google Chrome&#8217;s open web technologies and speedy JavaScript engine to Internet Explorer. In my [...]]]></description>
			<content:encoded><![CDATA[<p>Building javascript heavy webapps using html5 and css3 is tough when you have old but still stubbornly popular Internet Explorer browsers to support. The solution: <a href="http://code.google.com/chrome/chromeframe/">Chrome Frame</a></p>
<p>In Google&#8217;s words:</p>
<blockquote><p>Google Chrome Frame is an open source plug-in that seamlessly brings Google Chrome&#8217;s open web technologies and speedy JavaScript engine to Internet Explorer.</p></blockquote>
<p>In my words: Hello IE 6 render my shit automagically using Chrome.</p>
<p>Once installed, this meta tag in your html will tell IE to use Chrome&#8217;s engine to render the document:</p>
<div class="codecolorer-container html4strict default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="html4strict codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #009900;">&lt;<a href="http://december.com/html/4/element/meta.html"><span style="color: #000000; font-weight: bold;">meta</span></a> <span style="color: #000066;">http-equiv</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;X-UA-Compatible&quot;</span> <span style="color: #000066;">content</span><span style="color: #66cc66;">=</span><span style="color: #ff0000;">&quot;chrome=1&quot;</span>&gt;</span></div></div>
<p>Don&#8217;t have Chrome Frame installed yet? These few lines of condition IE logic will check and prompt:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;height:300px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #339933;">&lt;!--</span><span style="color: #009900;">&#91;</span><span style="color: #000066; font-weight: bold;">if</span> IE<span style="color: #009900;">&#93;</span><span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;</span>script type<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;text/javascript&quot;</span> src<span style="color: #339933;">=</span><span style="color: #3366CC;">&quot;http://ajax.googleapis.com/ajax/libs/chrome-frame/1/CFInstall.min.js&quot;</span><span style="color: #339933;">&gt;&lt;/</span>script<span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;</span>style<span style="color: #339933;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;.<span style="color: #660066;">chromeFrameInstallDefaultStyle</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;width<span style="color: #339933;">:</span> 800px<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;border<span style="color: #339933;">:</span> 5px solid blue<span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;z<span style="color: #339933;">-</span>index<span style="color: #339933;">:</span> <span style="color: #CC0000;">99999</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">&lt;/</span>style<span style="color: #339933;">&gt;</span><br />
<br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">&lt;</span>script<span style="color: #339933;">&gt;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #006600; font-style: italic;">// The conditional ensures that this code will only execute in IE,</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #006600; font-style: italic;">// Therefore we can use the IE-specific attachEvent without worry</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;window.<span style="color: #660066;">attachEvent</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;onload&quot;</span><span style="color: #339933;">,</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;CFInstall.<span style="color: #660066;">check</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;mode<span style="color: #339933;">:</span> <span style="color: #3366CC;">&quot;inline&quot;</span><span style="color: #339933;">,</span> <span style="color: #006600; font-style: italic;">// the default</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;oninstall<span style="color: #339933;">:</span> <span style="color: #003366; font-weight: bold;">function</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #000066;">alert</span><span style="color: #009900;">&#40;</span><span style="color: #3366CC;">&quot;Chrome Frame is now installed. You may need to restart your browser.&quot;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#125;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; &nbsp;<span style="color: #009900;">&#125;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span><br />
&nbsp; &nbsp; &nbsp; &nbsp; <span style="color: #339933;">&lt;/</span>script<span style="color: #339933;">&gt;</span><br />
<span style="color: #339933;">&lt;!</span><span style="color: #009900;">&#91;</span>endif<span style="color: #009900;">&#93;</span><span style="color: #339933;">--&gt;</span></div></div>
<p>Chrome Frame is installed at the user level if the user does not have admin access (Win!). The documentation states a restart isn&#8217;t even necessary once installed but I&#8217;ve found in my tests that the browser does need to be fully restarted so I&#8217;ve included a post-install alert specifying so in my code.</p>
<p>Forcing a user to install a plug-in to see content is usually a no-no but when it comes to all-or-nothing HTML5 CSS3 webapps that need to span all browsers an devices with a single codebase sometimes those IE6 users can use a little prodding. To clarify, Chrome the web browser does not have to be installed beforehand and installing the plug-in does not install the Chrome browser. Chrome Frame&#8217;s name is a bit of a misnomer as the structure of your document is not modified and no DOM frame is used&#8211;everything is just rendered beautifully even in IE6 using Chrome’s versions of the WebKit layout engine and V8 JavaScript engine via the IE plugin.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markledford.com/blog/2011/10/11/the-ie-silver-bullet-chrome-frame/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Fix self hosted ogg and webm videos not loading in Firefox html5 tags</title>
		<link>http://www.markledford.com/blog/2011/08/13/fix-self-hosted-ogg-and-webm-videos-not-loading-in-firefox-html5-tags/</link>
		<comments>http://www.markledford.com/blog/2011/08/13/fix-self-hosted-ogg-and-webm-videos-not-loading-in-firefox-html5-tags/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 22:41:14 +0000</pubDate>
		<dc:creator>markledford</dc:creator>
				<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://www.markledford.com/blog/?p=152</guid>
		<description><![CDATA[If your videos are not loading in Firefox with a 206 Partial Content check the Content Type returned in the response header for the file. If it reads text/plain your server isn&#8217;t passing the MIME type of the video. You should be able to create a .htaccess file in your video directory to fill in [...]]]></description>
			<content:encoded><![CDATA[<p>If your videos are not loading in Firefox with a 206 Partial Content check the Content Type returned in the response header for the file. If it reads text/plain your server isn&#8217;t passing the MIME type of the video. You should be able to create a .htaccess file in your video directory to fill in the missing MIME types. For example include this:</p>
<p>AddType video/ogg ogg<br />
AddType video/webm webm</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markledford.com/blog/2011/08/13/fix-self-hosted-ogg-and-webm-videos-not-loading-in-firefox-html5-tags/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Add webm and ogg export options to Mac Quicktime</title>
		<link>http://www.markledford.com/blog/2011/08/13/add-webm-and-ogg-export-options-to-mac-quicktime/</link>
		<comments>http://www.markledford.com/blog/2011/08/13/add-webm-and-ogg-export-options-to-mac-quicktime/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 20:47:12 +0000</pubDate>
		<dc:creator>markledford</dc:creator>
				<category><![CDATA[html5]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.markledford.com/blog/?p=155</guid>
		<description><![CDATA[For WebM support you can download the installer here. For OGG dowload XiphQT.component from here and put it in your /Library/Components folder Its worth noting that this will also add Webm and Ogg support to the html5 video tag in Safari.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.markledford.com/blog/wp-content/uploads/2011/08/exportscreenshot.gif"><img class="alignleft size-full wp-image-156" title="exportscreenshot" src="http://www.markledford.com/blog/wp-content/uploads/2011/08/exportscreenshot.gif" alt="" width="585" height="454" /></a></p>
<p>For WebM support you can download the installer <a href="http://code.google.com/p/webm/downloads/detail?name=WebM%20Component%20Installer.pkg" target="_blank">here</a>.</p>
<p>For OGG dowload XiphQT.component from <a href="http://www.macupdate.com/app/mac/20014/xiph-quicktime-components" target="_blank">here</a> and put it in your /Library/Components folder</p>
<p>Its worth noting that this will also add Webm and Ogg support to the html5 video tag in Safari.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markledford.com/blog/2011/08/13/add-webm-and-ogg-export-options-to-mac-quicktime/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Mac OS Lion breaks Flash&#8217;s internal settings prompts (and some other stuff)</title>
		<link>http://www.markledford.com/blog/2011/08/12/mac-os-lion-breaks-flashs-internal-settings-prompts-and-some-other-stuff/</link>
		<comments>http://www.markledford.com/blog/2011/08/12/mac-os-lion-breaks-flashs-internal-settings-prompts-and-some-other-stuff/#comments</comments>
		<pubDate>Sat, 13 Aug 2011 05:30:48 +0000</pubDate>
		<dc:creator>markledford</dc:creator>
				<category><![CDATA[bugs]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[mac]]></category>

		<guid isPermaLink="false">http://www.markledford.com/blog/?p=153</guid>
		<description><![CDATA[If you haven&#8217;t installed Mac OSX Lion yet I would probably wait. So far I&#8217;m finding it: - Breaks encoded audio over hdmi (Can&#8217;t listen to movies with AC3 Audio through HDMI when using as a HTPC via VLC) - Gets stuck in a mode where it won&#8217;t let me copy and paste files in [...]]]></description>
			<content:encoded><![CDATA[<p>If you haven&#8217;t installed Mac OSX Lion yet I would probably wait. So far I&#8217;m finding it:<br />
- Breaks encoded audio over hdmi (Can&#8217;t listen to movies with AC3 Audio through HDMI when using as a HTPC via VLC)<br />
- Gets stuck in a mode where it won&#8217;t let me copy and paste files in Finder until I restart Finder (file is pasted then immediately disappears)<br />
- and now I find out its even made the Flash Settings menu unclickable effectively breaking every site utilizing flash&#8217;s camera permission dialogue among other things (https://bugbase.adobe.com/index.cfm?event=bug&amp;id=2918693)<br />
Luckily its been fixed in an update that just came out, Flash Player 10.3.183.5. Its interesting to note that Flash Player now has its own icon in the OS System Preferences.</p>
<p>Other things I&#8217;m not a fan of:<br />
- Minimizes the use of scrollbars to the point where you can&#8217;t tell if you have scrollable content unless you try to scroll<br />
- Greyscales all Finder&#8217;s color icons in the left side toolbox so you can&#8217;t tell them apart without looking at them closely<br />
- Puts your hard drives last in the order stuff on the left hand so its often not even on the screen (apparently you can&#8217;t even change this)<br />
- never closes files automatically in Quicktime, so as you open videos and command-q the app they just pile up forever.<br />
For the quicktime weirdness, you can type this in Terminal to permanently disable the &#8220;resume&#8221; feature:<br />
defaults write com.apple.QuickTimePlayerX NSQuitAlwaysKeepsWindows -bool false</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markledford.com/blog/2011/08/12/mac-os-lion-breaks-flashs-internal-settings-prompts-and-some-other-stuff/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>convert gradient rotation into webkit&#8217;s css3 -webkit-gradient percentage based x and y pairs</title>
		<link>http://www.markledford.com/blog/2011/03/28/convert-css3-gradient-rotation-into-webkit-gradient-percentage-x-and-y-values-via-javascript-and-some-trigonometry/</link>
		<comments>http://www.markledford.com/blog/2011/03/28/convert-css3-gradient-rotation-into-webkit-gradient-percentage-x-and-y-values-via-javascript-and-some-trigonometry/#comments</comments>
		<pubDate>Mon, 28 Mar 2011 15:08:24 +0000</pubDate>
		<dc:creator>markledford</dc:creator>
				<category><![CDATA[html5]]></category>

		<guid isPermaLink="false">http://www.markledford.com/blog/?p=141</guid>
		<description><![CDATA[Webkit has extended their css3 gradient options with -webkit-linear-gradient which uses the standard &#8220;gradient rotation&#8221; value found in Mozilla&#8217;s -moz-linear-gradient but unfortunately this is only supported in Safari 5.1+ and Chrome 10+. Until Safari 5.1 becomes the norm any programmatic references to gradient rotation have to be converted from the typical 360 based rotation value [...]]]></description>
			<content:encoded><![CDATA[<p>Webkit has extended their css3 gradient options with -webkit-linear-gradient which uses the standard &#8220;gradient rotation&#8221; value found in Mozilla&#8217;s -moz-linear-gradient but unfortunately this is only supported in Safari 5.1+ and Chrome 10+. Until Safari 5.1 becomes the norm any programmatic references to gradient rotation have to be converted from the typical 360 based rotation value to Webkit&#8217;s powerful but awkward (powerfully akward?)  -webkit-gradient point syntax where your linear gradient&#8217;s start and end values have to be defined as X,Y value pairs that explicitly state at what point the gradient starts and ends.</p>
<p>For a linear right-to-left gradient you could define percentage points like so:<br />
-webkit-gradient(linear, 0% 50%, 100% 50%, color-stop(0, rgba(80,80,80,1)), color-stop(1, rgba(80,80,80,0.5)));<br />
Which reads &#8220;start the gradient at wherever &#8220;0% width and 50% height&#8221; is and end the gradient at &#8220;100% width and 50% height&#8221;.</p>
<p>This is easy enough to calculate by hand but if you have a project with a ton of regular gradient rotation styles already defined you&#8217;re going to need to convert via javascript and some Trigonometry which is the situation I was in. A bit of googling turned up no clear cut method of converting a gradient rotation value to a pair of percentage based X and Y values so here is what I came up with. First the code:</p>
<div class="codecolorer-container javascript default" style="overflow:auto;white-space:nowrap;border: 1px solid #9F9F9F;width:435px;"><div class="javascript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap"><span style="color: #003366; font-weight: bold;">function</span> pointOnCircle<span style="color: #009900;">&#40;</span>radius<span style="color: #339933;">,</span> angleInDegrees<span style="color: #339933;">,</span> origin<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#123;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> x <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>radius <span style="color: #339933;">*</span> Math.<span style="color: #660066;">cos</span><span style="color: #009900;">&#40;</span>angleInDegrees <span style="color: #339933;">*</span> Math.<span style="color: #660066;">PI</span> <span style="color: #339933;">/</span> 180<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> origin.<span style="color: #660066;">x</span><span style="color: #339933;">;</span><br />
<span style="color: #003366; font-weight: bold;">var</span> y <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>radius <span style="color: #339933;">*</span> Math.<span style="color: #660066;">sin</span><span style="color: #009900;">&#40;</span>angleInDegrees <span style="color: #339933;">*</span> Math.<span style="color: #660066;">PI</span> <span style="color: #339933;">/</span> 180<span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span> <span style="color: #339933;">+</span> origin.<span style="color: #660066;">y</span><span style="color: #339933;">;</span><br />
<span style="color: #000066; font-weight: bold;">return</span> <span style="color: #009900;">&#123;</span>x<span style="color: #339933;">:</span>x<span style="color: #339933;">,</span> y<span style="color: #339933;">:</span>y<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span><br />
<span style="color: #009900;">&#125;</span></div></div>
<p>//webkit has updated syntax from -webkit-gradient to a much more sensible -webkit-linear-gradient with angle but<br />
//this is only supported in Safari 5.1+ nd Chrome 10+ so we&#8217;ll have to do the math to convert gradient rotation to<br />
//start and end points on a circle<br />
var gradientRotation = 0 &#8211; (node.gradientRotation%360);<br />
var centerPoint = {x:0, y:0};<br />
var rotatedStartPoint = KickUtils.pointOnCircle(50, 180-gradientRotation, centerPoint);<br />
var rotatedEndPoint = KickUtils.pointOnCircle(50, 360-gradientRotation, centerPoint);<br />
rotatedStartPoint.x = Math.round(rotatedStartPoint.x+50);<br />
rotatedStartPoint.y = Math.round(rotatedStartPoint.y+50);<br />
rotatedEndPoint.x = Math.round(rotatedEndPoint.x+50);<br />
rotatedEndPoint.y = Math.round(rotatedEndPoint.y+50);<br />
return &#8216;background-image: -webkit-gradient(linear, &#8216; + rotatedStartPoint.x+&#8217;% &#8216;+rotatedStartPoint.y+&#8217;%, &#8216;+rotatedEndPoint.x+&#8221;% &#8220;+rotatedEndPoint.y+&#8217;%, color-stop(0, &#8230;</p>
<p>Since a numeric gradient rotation value defines a gradient that passes through the center of a circle, you can use the trig function above to calculate the 2 points that line intersects the radius of the circle. Defining the center of the circle at 50, 50 you can get values returned in the -50 to +50 range. Add 50 to that value and tack on a % and voila your 2 percentage based points start and end values are defined.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markledford.com/blog/2011/03/28/convert-css3-gradient-rotation-into-webkit-gradient-percentage-x-and-y-values-via-javascript-and-some-trigonometry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Pretty annoying flash bug with html text event links</title>
		<link>http://www.markledford.com/blog/2011/03/10/pretty-annoying-flash-bug-with-html-text-event-links/</link>
		<comments>http://www.markledford.com/blog/2011/03/10/pretty-annoying-flash-bug-with-html-text-event-links/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 16:51:23 +0000</pubDate>
		<dc:creator>markledford</dc:creator>
				<category><![CDATA[bugs]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.markledford.com/blog/?p=135</guid>
		<description><![CDATA[http://www.blog.lessrain.com/as3-texteventlink-and-contextmenu-incompatibilities/ There doesn&#8217;t appear to be a work around..other then not using html text event links.]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.blog.lessrain.com/as3-texteventlink-and-contextmenu-incompatibilities/">http://www.blog.lessrain.com/as3-texteventlink-and-contextmenu-incompatibilities/</a></p>
<p>There doesn&#8217;t appear to be a work around..other then not using html text event links.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markledford.com/blog/2011/03/10/pretty-annoying-flash-bug-with-html-text-event-links/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What Facebook&#8217;s authenticated comment module is doing for Techcrunch&#8217;s trolly comments on Flash</title>
		<link>http://www.markledford.com/blog/2011/03/09/interesting-what-facebooks-authenticated-comment-module-is-doing-for-techcrunchs-trolly-comments-on-flash/</link>
		<comments>http://www.markledford.com/blog/2011/03/09/interesting-what-facebooks-authenticated-comment-module-is-doing-for-techcrunchs-trolly-comments-on-flash/#comments</comments>
		<pubDate>Wed, 09 Mar 2011 20:31:47 +0000</pubDate>
		<dc:creator>markledford</dc:creator>
				<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.markledford.com/blog/?p=133</guid>
		<description><![CDATA[http://techcrunch.com/2011/03/08/adobe-wallaby-cant-jump/ Usually with any new Adobe/Flash related news comes a Techcrunch article to surmisely bash it with questionable ferocity. These are usually followed up by a ton of anonymous comments on the post echoing the same sentiments. It&#8217;s interesting to note that now that comments on Techcrunch are authenticated by way of Facebook&#8217;s commenting API [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://techcrunch.com/2011/03/08/adobe-wallaby-cant-jump/">http://techcrunch.com/2011/03/08/adobe-wallaby-cant-jump/</a></p>
<p>Usually with any new Adobe/Flash related news comes a Techcrunch article to surmisely bash it with questionable ferocity. These are usually followed up by a ton of anonymous comments on the post echoing the same sentiments. It&#8217;s interesting to note that now that comments on Techcrunch are authenticated by way of Facebook&#8217;s commenting API practically every single comment is the reverse, as Steven Sacks says in the comments of the article above:</p>
<blockquote><p>This is interesting. Ever since TechCrunch switched to Facebook comments, all their anti-Flash posts have a slew of comments supporting Flash. Prior to this, all the anti-Flash post comments were predominantly anti-Flash. Good to see all those anonymous posters don&#8217;t have the guts to post under their real names AND can&#8217;t write negative comments under numerous names.</p>
<p>The real public has spoken.</p></blockquote>
<p>&nbsp;</p>
<p><img class="alignnone" src="http://www.markledford.com/blog/wp-content/uploads/2011/03/the_more_you_know1.jpg" alt="The more you know *ting*" width="400" height="264" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.markledford.com/blog/2011/03/09/interesting-what-facebooks-authenticated-comment-module-is-doing-for-techcrunchs-trolly-comments-on-flash/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Loading zip files in AS3</title>
		<link>http://www.markledford.com/blog/2010/11/02/loading-zip-files-in-as3/</link>
		<comments>http://www.markledford.com/blog/2010/11/02/loading-zip-files-in-as3/#comments</comments>
		<pubDate>Tue, 02 Nov 2010 15:20:30 +0000</pubDate>
		<dc:creator>markledford</dc:creator>
				<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.markledford.com/blog/?p=131</guid>
		<description><![CDATA[Working on a project where I need to load and unzip files in Flash I stumbled on some pretty useful libraries. The first is FZip which can load modify and create zip files in Flash. Perks: FZip parses ZIP archives progressively, allowing access to contained files while the archive is loading. Detractors: If not used [...]]]></description>
			<content:encoded><![CDATA[<p>Working on a project where I need to load and unzip files in Flash I stumbled on some pretty useful libraries. </p>
<p>The first is <a href="http://codeazur.com.br/lab/fzip/">FZip</a> which can load modify and create zip files in Flash.<br />
Perks: FZip parses ZIP archives progressively, allowing access to contained files while the archive is loading.<br />
Detractors: If not used in an AIR environment which provides a low level deflate method it can&#8217;t unzip compressed zip files without your manually injecting an Adler32 Checksum to the file ahead of time. They provide convenient Python and Java code to unobtrusively inject Adler32 checksums in your zip files. </p>
<p>The other is nochump.com&#8217;s <a href="http://nochump.com/blog/archives/15">AS3 Zip Library</a>.<br />
Perks: Can unzip files without the need of injecting Adler32 Checksums ahead of time.<br />
Detractors: Slow as balls. </p>
<p>For a project I&#8217;m working on where I have a ton of zip files to parse I find myself using the first and falling back to the latter if the Adler32 Checksum is not found. I&#8217;m far from a command line exert but here is a handy line you can place in terminal to recursively scan the working directory for every zip file and add Adler32 checksums via FZip&#8217;s handly fzip-prepare.py python script (note that it is only checking for zip files above 1MB):<br />
find . -size +1M -iname &#8220;*.zip&#8221; | sed -e &#8216;s/.*/&#8221;&#038;&#8221;/&#8217; | xargs -I {} python /fzip-prepare.py {} -L1</p>
]]></content:encoded>
			<wfw:commentRss>http://www.markledford.com/blog/2010/11/02/loading-zip-files-in-as3/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>

