<?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>nFriedly Web Dev Tech Blog &#187; flash</title>
	<atom:link href="http://nfriedly.com/techblog/tag/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://nfriedly.com/techblog</link>
	<description>Expert Advice on Website Development, Javascript, Ajax, and Security</description>
	<lastBuildDate>Mon, 22 Apr 2013 22:39:42 +0000</lastBuildDate>
	<language>en-US</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.5.1</generator>
		<item>
		<title>Calling all (available) Web Designers &amp; Developers</title>
		<link>http://nfriedly.com/techblog/2010/12/calling-all-available-web-designers-developers/</link>
		<comments>http://nfriedly.com/techblog/2010/12/calling-all-available-web-designers-developers/#comments</comments>
		<pubDate>Fri, 17 Dec 2010 17:29:24 +0000</pubDate>
		<dc:creator>nFriedly</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[ajax]]></category>
		<category><![CDATA[css]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[php]]></category>
		<category><![CDATA[seo]]></category>

		<guid isPermaLink="false">http://nfriedly.com/techblog/?p=329</guid>
		<description><![CDATA[Even though I&#8217;ve been happily employed with Sociable Labs for a while now, I still get fairly frequent calls and emails from people who want to know if I&#8217;m available or I &#8220;know someone.&#8221; The list of people I know is starting to run short, so this post is intended to remedy that. If you [...]]]></description>
				<content:encoded><![CDATA[<p><a href="http://nfriedly.com/techblog/2010/12/calling-all-avaliable-web-designers-developers"><img class="alignright size-full wp-image-358" title="Ring Ring!" alt="" src="http://nfriedly.com/techblog/wp-content/uploads/2010/12/1171473_phone_home-min.jpg" width="200" height="245" /></a>Even though I&#8217;ve been happily employed with <a href="http://sociablelabs.com/">Sociable Labs</a> for a while now, I still get fairly frequent calls and emails from people who want to know if I&#8217;m available or I &#8220;know someone.&#8221; The list of people I know is starting to run short, so this post is intended to remedy that.</p>
<p><strong>If you are an individual Web Designer or Web Developer interested in work, please post a comment below.</strong></p>
<p><strong><span id="more-329"></span></strong>What to post:</p>
<ul>
<li>Your name and website in the appropriate fields. I disabled WordPress&#8217;s <code>rel="nofollow"</code> just for you.
<ul>
<li>If you don&#8217;t have a website, get one! Sign up for a <a href="http://www.dreamhost.com/r.cgi?225072">Dreamhost account</a> and buy a template from <a href="http://themeforest.net/?ref=nfriedly">Theme Forest</a> and you&#8217;ll have a solid website in no time.</li>
</ul>
</li>
<li>Your basic skillset. For me, it might be &#8220;Strong Javascript / Ajax, PHP, HTML, and CSS; basic Photoshop, ActionScript and Java&#8221;</li>
<li>A short bit about yourself and your experience.</li>
<li>Where you&#8217;re located, and if you would consider relocating for work.</li>
<li>What type of work you&#8217;re interested in: freelance / short-term contract (3-6 months or less), long-term contract, employment, startup, etc.</li>
</ul>
<p>Tips:</p>
<ul>
<li>This is your first impression to potential clients: Copy-paste it into Word and read it out loud once or twice. Get it right the first time because you can&#8217;t edit comments after you&#8217;ve posted them.</li>
<li>Contact information: any phone number or email address posted here will be picked up by spammers.
<ul>
<li>A basic solution is to just post a .jpg on your website with your phone number and email.</li>
<li>A better solution could be a contact form like this one: <a href="http://nfriedly.com/techblog/2009/06/how-to-build-a-spam-free-contact-forms-without-captchas/">How to build a spam-free contact form without captchas</a></li>
</ul>
</li>
<li>One or two links to your GitHub, LinkedIn, or recent work is fine, but be warned that my WordPress marks<strong> </strong>anything with <strong>more than 3 links as spam</strong>, and it&#8217;s hidden until I get around to checking the spam filter.</li>
<li>Lastly, this is my website, and I may choose to edit or delete comments. For example, if you claim 10+ years experience with jQuery, your comment will be deleted. (JQuery was released in 2006)</li>
</ul>
<p>Thanks and best wishes with your future work!</p>
]]></content:encoded>
			<wfw:commentRss>http://nfriedly.com/techblog/2010/12/calling-all-available-web-designers-developers/feed/</wfw:commentRss>
		<slash:comments>17</slash:comments>
		</item>
		<item>
		<title>JavaScript library and .swf for cross-domain flash cookies</title>
		<link>http://nfriedly.com/techblog/2010/07/swf-for-javascript-cross-domain-flash-cookies/</link>
		<comments>http://nfriedly.com/techblog/2010/07/swf-for-javascript-cross-domain-flash-cookies/#comments</comments>
		<pubDate>Tue, 13 Jul 2010 18:25:11 +0000</pubDate>
		<dc:creator>nFriedly</dc:creator>
				<category><![CDATA[Web Development]]></category>
		<category><![CDATA[actionscript 3.0]]></category>
		<category><![CDATA[cookie]]></category>
		<category><![CDATA[cross-domain]]></category>
		<category><![CDATA[externalinterface]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[flashcookie]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[sharedobject]]></category>
		<category><![CDATA[swf]]></category>

		<guid isPermaLink="false">http://nfriedly.com/techblog/?p=272</guid>
		<description><![CDATA[I&#8217;m working on a project that has a legitimate (non-spammy) reason to need cross-domain cookies, and we settled on flash as a good way to accomplish this. However, I was surprisingly unable to find any complete library or how-to guide for connecting flash cookies to javascript. So I dusted off my flash skills and built [...]]]></description>
				<content:encoded><![CDATA[<div style="position:relative;">
<img class="alignright size-full wp-image-295" title="325990_chocolate_chip_cookies_2" src="http://nfriedly.com/techblog/wp-content/uploads/2010/07/325990_chocolate_chip_cookies_2.jpg" alt="" width="300" height="224" />I&#8217;m working on a project that has a legitimate (non-spammy) reason to need cross-domain cookies, and we settled on flash as a good way to accomplish this.</p>
<p>However, I was surprisingly unable to find any complete library or how-to guide for connecting flash cookies to javascript. So I dusted off my flash skills and built one, and and now you get to enjoy the fruit of my labor:</p>
<p><a href="http://github.com/nfriedly/Javascript-Flash-Cookies"><img style="position: absolute; top: 0pt; right: 0pt; border: 0pt none;" src="http://s3.amazonaws.com/github/ribbons/forkme_right_darkblue_121621.png" alt="Fork me on GitHub" /></a>
</div>
<p><span id="more-272"></span></p>
<p><a href="http://github.com/nfriedly/Javascript-Flash-Cookies/zipball/master"><img class="alignleft" src="/img/application_put.png" alt="" /> Download the .swf, .js, and source code from github</a></p>
<p>This is an .swf file  that communicates with JavaScript via flash&#8217;s <a href="http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/external/ExternalInterface.html">ExternalInerface</a> to read and write to a Local <a href="http://www.adobe.com/livedocs/flash/9.0/ActionScriptLangRefV3/flash/net/SharedObject.html">SharedObject</a> (LSO). Essentially, it&#8217;s cross-domain cookies for javascript.</p>
<p>It also includes an (optional) javascript library that handles embedding, communication, error checking, and logging.</p>
<p>The project is hosted at github: <a href="http://github.com/nfriedly/Javascript-Flash-Cookies">http://github.com/nfriedly/Javascript-Flash-Cookies</a></p>
<hr style="margin-top: 20px;" />
<p><em>You might also be interested in <a href="http://nfriedly.com/techblog/2010/08/how-facebook-sets-and-uses-cross-domain-cookies/">How Facebook Sets and uses cross-Domain cookies</a></em></p>
<hr />
<h3>Working Example</h3>
<p>See <a href="http://nfriedly.com/stuff/swfstore-example/">https://nfriedly.com/stuff/swfstore-example/</a> and <a href="http://nfriedly.github.com/Javascript-Flash-Cookies/">http://nfriedly.github.com/Javascript-Flash-Cookies/</a> for a working example. </p>
<h3>Quick start guide</h3>
<p>To use the library, upload the storage.swf &amp; swfstore.js files to your web server and put this HTML and JavaScript into your web page(s):</p>
<h4>The HTML</h4>
<pre class="brush: xml; title: ; notranslate">
&lt;!-- This example uses jquery, but SwfStore does not require jquery to work. --&gt;
&lt;script src=&quot;http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js&quot;&gt;&lt;/script&gt;

&lt;script src=&quot;/PATH/TO/swfstore.js&quot;&gt;&lt;/script&gt;

&lt;input id=&quot;dataInput&quot; /&gt; &lt;input id=&quot;saveBtn&quot; type=&quot;submit&quot; value=&quot;Save&quot; /&gt;

&lt;div id=&quot;status&quot;&gt;&lt;/div&gt;
</pre>
<h4>And The JavaScript</h4>
<pre class="brush: jscript; title: ; notranslate">

// wait until the page has finished loading before starting
$(function(){

	// first disable things while the swfStore is initializing
	$('input').attr(&quot;disabled&quot;,&quot;disabled&quot;);
	$('#status').text('Loading...');

	var mySwfStore = new SwfStore({

		// Optional but recommended. Try to choose something unique.
		namespace: 'myExample', 

		// To work cross-domain, only one of your sites should have the
		// .swf, all other sites should load it from the first one
		swf_url: 'http://site.com/PATH/TO/storage.swf', 

		// Logs messages to the console if available, a div at the
		// bottom of the page otherwise. 
		debug: true,

		onready: function(){
			// Now that the swfStore was loaded successfully, re-enable
			$('input').removeAttr(&quot;disabled&quot;);

			// Read the existing value (if any)
			$('#dataInput').val(mySwfStore.get('myKey'));

			// Set up an onclick handler to save the text to the 
			// swfStore whenever the Save button is clicked
			$('#saveBtn').click(function(){
				mySwfStore.set('myKey', $('#dataInput').val() );
				$('#status').text('Saved!')
			});

			$('#status').text('Loaded');
		},

		onerror: function(){
			// In case we had an error. (The most common cause is that 
			// the user disabled flash cookies.)
			$('#status').text('Error');
		}
	});
});
</pre>
<h3>Cross-domain usage</h3>
<p>A copy of storage.swf located on one domain may be embedded on pages from one or more other domains, allowing cross-domain cookie access.</p>
<style>
.highlight { background-color: #D1FCA9; }
</style>
<h3>Troubleshooting</h3>
<ul>
<li>Be sure the <span class="highlight">urls</span> to the .swf file and .js file are both correct.</li>
<li>If the .swf file is unable to communicate with the JavaScript, it will <span  class="highlight">display log messages on the flash object</span>. If debug is enabled, this this should be visible on the page.</li>
<li>To <span class="highlight">hide the flash object</span> and disable the <span class="highlight">log messages appending to the bottom of the page</span>, set debug to false</span>. (Log messages are added to a div if no console is found).</li>
<li>If the user does not have flash installed, the onerror function will be called after a (configurable) 10 second timeout. You may want to use a library such as <a href="http://www.featureblend.com/javascript-flash-detection-library.html">Flash Detect</a> to check for this more quickly. <span  class="highlight">Flash Player 9.0.31.0</span> or newer is required.</li>
<li>If you pass a <span class="highlight">non-string data</span> as the key or value, things may break. Your best bet is to use strings and/or use <a href="http://json.org">JSON</a> to encode objects as strings.</li>
<li>If you see the error <span class="highlight">&#8220;uncaught exception: Error in Actionscript. Use a try/catch block to find error.&#8221;</span>, try using &#8220;//&#8221; in the .swf URL rather than &#8220;https://&#8221;. See <a href="https://github.com/nfriedly/Javascript-Flash-Cookies/issues/14">https://github.com/nfriedly/Javascript-Flash-Cookies/issues/14</a> for more information.</li>
<li>Do not set <code class="highlight">display:none</code> on the swf or any of it&#8217;s parent elements, this will cause the file to not render and the timeout will be fired. Disable debug and it will be rendered off screen.</li>
<li>The error <code class="highlight">this.swf.set is not a function</code> has been known to occur when the FlashFirebug plugin is enabled in Firefox / Firebug..
</ul>
<h3>Patches</h3>
<p>Although my JS is solid, my Flash / ActionScript skills leave something to be desired. Patches to either are more than welcome at <a href="http://github.com/nfriedly/Javascript-Flash-Cookies">github</a> (preferred), or just leave a comment here if you&#8217;re not sure how to use github. (This comment has a <a href="http://nfriedly.com/techblog/2010/07/swf-for-javascript-cross-domain-flash-cookies/comment-page-1/#comment-2531">short walk through to using github</a>.)</p>
<h3>Production Use</h3>
<p>If you&#8217;re using SwfStore in a production site, feel free to leave a comment here with a link to the site. I turned off WP&#8217;s default rel=&#8221;nofollow&#8221;, so enjoy the link juice <img src='http://nfriedly.com/techblog/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' />  Reciprocal links are not required, but are always appreciated.</p>
]]></content:encoded>
			<wfw:commentRss>http://nfriedly.com/techblog/2010/07/swf-for-javascript-cross-domain-flash-cookies/feed/</wfw:commentRss>
		<slash:comments>45</slash:comments>
		</item>
	</channel>
</rss>
