<?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>Mats Lindh &#187; Flash</title>
	<atom:link href="http://e-mats.org/category/flash/feed/" rel="self" type="application/rss+xml" />
	<link>http://e-mats.org</link>
	<description>Where desperate is just another word for a regular day.</description>
	<lastBuildDate>Wed, 02 May 2012 15:12:44 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.2</generator>
		<item>
		<title>Upgrading to SWFUpload 2.2.0-beta</title>
		<link>http://e-mats.org/2008/10/upgrading-to-swfupload-220-beta/</link>
		<comments>http://e-mats.org/2008/10/upgrading-to-swfupload-220-beta/#comments</comments>
		<pubDate>Fri, 24 Oct 2008 21:51:51 +0000</pubDate>
		<dc:creator>Mats</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[html]]></category>
		<category><![CDATA[swfupload]]></category>
		<category><![CDATA[uploader]]></category>

		<guid isPermaLink="false">http://e-mats.org/?p=313</guid>
		<description><![CDATA[SWFUpload 2.2.0-beta has been released to fix the issue that has occured after the release of Flash 10, where regular SWFUpload-based applications ceases to work. This is because of a security update to Flash Player, where the plugin refuses to show the upload files dialog unless the plugin has focus &#8212; and the request to [...]]]></description>
			<content:encoded><![CDATA[<p><a href='http://www.swfupload.org/forum/news/827'>SWFUpload 2.2.0-beta has been released</a> to fix the issue that has occured after the release of Flash 10, where regular SWFUpload-based applications ceases to work. This is because of a security update to Flash Player, where the plugin refuses to show the upload files dialog unless the plugin has focus &#8212; and the request to show the dialog is in response to an user event. This means that the user now has to click somewhere in the flash file before we&#8217;re able to show the upload dialog.</p>
<p>The way most file upload components solve this is by overlaying a transparent flash file over the regular user interface element, so that the user clicks the flash file instead of the visible HTML element. <a href='http://www.swfupload.org/forum/news/827'>SWFUpload 2.2.0</a> supports this, in addition to creating a styled flash based button instead of the regular HTML elements.</p>
<p>To upgrade from our previous 2.1.0 based installation, I did the following:</p>
<p>Added in the settings object for SWFUpload:</p>
<pre>
        button_placeholder_id : "selectFilesButtonPlaceholder",
        button_disable : false,
    	minimum_flash_version : "9.0.28",
    	swfupload_pre_load_handler : swfUploadPreLoad,
    	swfupload_load_failed_handler : swfUploadLoadFailed
</pre>
<p>Swapped out the previous references to graceful degradation and SWFUpload 2.1.0:</p>
<div class="geshi no html">
<ol>
<li class="li1">
<div class="de1">&lt;script type=&quot;text/javascript&quot; src=&quot;/js/swfupload-2.2.0.js&quot;&gt;&lt;/script&gt;
</div>
</li>
<li class="li1">
<div class="de1">&lt;script type=&quot;text/javascript&quot; src=&quot;/js/swfupload.swfobject.js&quot;&gt;&lt;/script&gt;</div>
</li>
</ol>
</div>
<p>Remembered to update flash_url in the settings object:</p>
<pre>
flash_url : "/flash/swfupload_f10.swf",
</pre>
<p>Added three new callbacks functions instead of using the references to the previous degradation elements (swfupload_element_id, degraded_element_id):</p>
<div class="geshi no javascript">
<ol>
<li class="li1">
<div class="de1"><span class="kw2">function</span> swfUploadLoaded<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">// set the dimensions of the button to match the outer container element (jQuery!)</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; swfu.<span class="me1">setButtonDimensions</span><span class="br0">&#40;</span>$<span class="br0">&#40;</span><span class="st0">&quot;#buttonContainer&quot;</span><span class="br0">&#41;</span>.<span class="me1">width</span><span class="br0">&#40;</span><span class="br0">&#41;</span>, $<span class="br0">&#40;</span><span class="st0">&quot;#buttonContainer&quot;</span><span class="br0">&#41;</span>.<span class="me1">height</span><span class="br0">&#40;</span><span class="br0">&#41;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> swfUploadPreLoad<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; <span class="co1">// hide HTML interface, show Flash interface..</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; $<span class="br0">&#40;</span><span class="st0">&quot;#regularUploader&quot;</span><span class="br0">&#41;</span>.<span class="me1">hide</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1">&nbsp; &nbsp; $<span class="br0">&#40;</span><span class="st0">&quot;#flashUploader&quot;</span><span class="br0">&#41;</span>.<span class="me1">show</span><span class="br0">&#40;</span><span class="br0">&#41;</span>;</div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
<li class="li1">
<div class="de1">&nbsp;</div>
</li>
<li class="li1">
<div class="de1"><span class="kw2">function</span> swfUploadLoadFailed<span class="br0">&#40;</span><span class="br0">&#41;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#123;</span></div>
</li>
<li class="li1">
<div class="de1"><span class="br0">&#125;</span></div>
</li>
</ol>
</div>
<p>Added a container element in the HTML that the Flash app will simply take control over (it will NOT lay itself transparent over this element!):</p>
<div class="geshi no html">
<ol>
<li class="li1">
<div class="de1">&lt;div id=&quot;selectFilesButtonPlaceholder&quot;&gt;&lt;/div&gt;</div>
</li>
</ol>
</div>
<p>.. and remove the old reference to swfu.selectFiles();.</p>
<p>That should be all.</p>
]]></content:encoded>
			<wfw:commentRss>http://e-mats.org/2008/10/upgrading-to-swfupload-220-beta/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Free Flash Based File Upload Applications</title>
		<link>http://e-mats.org/2008/06/free-flash-based-file-upload-applications/</link>
		<comments>http://e-mats.org/2008/06/free-flash-based-file-upload-applications/#comments</comments>
		<pubDate>Sun, 01 Jun 2008 14:43:46 +0000</pubDate>
		<dc:creator>Mats</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Programming]]></category>
		<category><![CDATA[Yahoo! UI]]></category>
		<category><![CDATA[javascript]]></category>
		<category><![CDATA[upload]]></category>
		<category><![CDATA[yui]]></category>

		<guid isPermaLink="false">http://e-mats.org/?p=101</guid>
		<description><![CDATA[When I started writing Swoooosh, the main reason was that after needing a free component for a project for a customer of mine (where uploading multiple files were not an original part of the specification, but was added later), I were left with a few components with dubious licenses and weird attribution requests that left [...]]]></description>
			<content:encoded><![CDATA[<p>When I started writing <a href='http://e-mats.org/2008/05/swoooosh-open-source-flash-based-multi-file-uploader/'>Swoooosh</a>, the main reason was that after needing a free component for a project for a customer of mine (where uploading multiple files were not an original part of the specification, but was added later), I were left with a few components with dubious licenses and weird attribution requests that left you guessing. Instead I hoped someone would release something under an MIT-based license (or LGPL, BSD, etc) to be free for all kinds of usage, and could be further extended by the community. </p>
<p>Luckily a few alternatives has emerged since then, and Swoooosh isn&#8217;t really that relevant any longer (it was a good exercise for writing Flex and ActionScript, tho):</p>
<ul>
<li><a href='http://developer.yahoo.com/yui/uploader/'>Yahoo! UI Libriary: Uploader</a></li>
<li><a href='http://www.swfupload.org/'>SWFUpload</a></li>
</ul>
<p>And Yes, Christer, I&#8217;m going to implement one of these and commit to SVN any moment now. :-)</p>
]]></content:encoded>
			<wfw:commentRss>http://e-mats.org/2008/06/free-flash-based-file-upload-applications/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>

