<?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>Wonderolie</title>
	<atom:link href="http://www.wonderolie.nl/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.wonderolie.nl</link>
	<description>Interactive designer, Front-end, Flash, Flex, jQuery, Silverlight</description>
	<lastBuildDate>Sun, 23 May 2010 08:35:04 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>jQuery BoucingElement plugin</title>
		<link>http://www.wonderolie.nl/2010/jquery-boucingelement-plugin/</link>
		<comments>http://www.wonderolie.nl/2010/jquery-boucingelement-plugin/#comments</comments>
		<pubDate>Sun, 23 May 2010 08:35:04 +0000</pubDate>
		<dc:creator>Wonderolie</dc:creator>
				<category><![CDATA[JQuery]]></category>

		<guid isPermaLink="false">http://www.wonderolie.nl/?p=54</guid>
		<description><![CDATA[I made this plug in while I was playing arround with jQuery. I am trying to transfer my flash skills to html. Learning actionscript started with a bouncing ball class. Therefore I tried to create the same in jQuery. And here it is the boucingelement plugin. It was fun to make and you could do [...]]]></description>
			<content:encoded><![CDATA[<p>I made this plug in while I was playing arround with jQuery. I am trying to transfer my flash  skills to html. Learning actionscript started with a bouncing ball class. Therefore I tried to create the same in jQuery.</p>
<p>And here it is the boucingelement plugin. It was fun to make and you could do a lot of useless stuf with it. <a href="http://www.wonderolie.nl/examples/bouncingelement/">Like the form example on this page</a>. Click in one of the input fields to start the plugin</p>
<p><code>$('#password').bouncingElement();</code></p>
<p>or with parameters</p>
<p><code>$('#password').bouncingElement({ xpos: 80, ypos: 95, speedX: 1, speedY: 3, fps: 15 });</code></p>
<p>The main code is very basic as you can see in the snippet below. A simple setInterval functionin the plugin provides the animation you can change the speed by setting the fps parameter or or the speedX/ speedY parameter. It is important to position the bouncing elements absolute.</p>
<p><code>// change the position<br />
	o.xpos += o.speedX;<br />
	o.ypos += o.speedY;<br />
	ball.css("left", o.xpos);<br />
	ball.css("top", o.ypos);</p>
<p>	// reverse the speed if the element hits the boundary<br />
	if (o.xpos < 0 || o.xpos > (canvas.width() - ball.width()))<br />
	{<br />
		o.speedX *= -1;<br />
	}</p>
<p>	if (o.ypos < 0 || o.ypos > (canvas.height() - ball.height()))<br />
	{<br />
		o.speedY *= -1;<br />
	}</code></p>
<p>You can get the <a href="http://www.wonderolie.nl/examples/bouncingelement/">plugin and an example here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wonderolie.nl/2010/jquery-boucingelement-plugin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>jQuery and ExternallInterface</title>
		<link>http://www.wonderolie.nl/2010/jquery-and-externallinterface/</link>
		<comments>http://www.wonderolie.nl/2010/jquery-and-externallinterface/#comments</comments>
		<pubDate>Tue, 04 May 2010 09:31:16 +0000</pubDate>
		<dc:creator>Wonderolie</dc:creator>
				<category><![CDATA[JQuery]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.wonderolie.nl/?p=49</guid>
		<description><![CDATA[It seems to be that ExternalInterface will not work if the flash file is referenced with jQuery. Which is odd because the jQuery wil translate to the javascript function getElementById. However the following code gave javascript errors that the function send2Flash could not be found. if( $("#debaak").length &#62; 0 ) { $("#debaak").send2Flash(str); } After discussing [...]]]></description>
			<content:encoded><![CDATA[<p>It seems to be that ExternalInterface will not work if the flash file is referenced with jQuery. Which is odd because the jQuery  wil translate to the javascript function getElementById. However the following code gave javascript errors that the function send2Flash could not be found.</p>
<p><code><br />
if( $("#debaak").length &gt; 0 )<br />
{<br />
$("#debaak").send2Flash(str);<br />
}<br />
</code></p>
<p>After discussing this subject  we found the following solutions. JQuery returns an object, with the get function it is possible to get any element in the jQuery object returned by the jQuery selector</p>
<p><code>$("#debaak").get(0).send2Flash(str);</code><br />
or<br />
<code>$("#debaak")[0].send2Flash(str);</code> </p>
<p>The javascript way also works perfectly whithout any errors.</p>
<p><code><br />
if (document.getElementById)<br />
{<br />
flashMovie = document.getElementById("debaak");<br />
}</code></p>
<p>if (flashMovie)<br />
{<br />
flashMovie.send2Flash(str);<br />
}</p>
<p>Below you can find the necessary code for flash.</p>
<p><code><br />
public function Main()<br />
{<br />
ExternalInterface.addCallback("send2Flash", callJS);<br />
}<br />
private function callJS(msg)<br />
{<br />
//called from js<br />
trace('call from js:' + msg)<br />
}<br />
</code></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wonderolie.nl/2010/jquery-and-externallinterface/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Image Carousel: Jquery vs. Flash</title>
		<link>http://www.wonderolie.nl/2010/image-carousel-jquery-vs-flash/</link>
		<comments>http://www.wonderolie.nl/2010/image-carousel-jquery-vs-flash/#comments</comments>
		<pubDate>Sun, 21 Mar 2010 20:55:27 +0000</pubDate>
		<dc:creator>Wonderolie</dc:creator>
				<category><![CDATA[CSS]]></category>
		<category><![CDATA[JQuery]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.wonderolie.nl/?p=47</guid>
		<description><![CDATA[I used to build my carousels in flash, but i seemed a good challenge for me to build a nice looking carousel in jQuery. Of course the carousel should have the same functionality as a flash carousel. Thus said the carousel should get all the content from the html itself, include paging, the possibility for [...]]]></description>
			<content:encoded><![CDATA[<p>I used to build my carousels in flash, but i seemed a good challenge for me to build a nice looking carousel in jQuery. Of course the carousel should have the same functionality as a flash carousel. Thus said the carousel should get all the content from the html itself, include paging, the possibility for some text over the image and have nice transitions.</p>
<p>I searched the web for available plugins and the <a href="http://jquery.malsup.com/cycle/">jQuery Cycle plugin</a> seemed the best start. The only task left for me was finding a way to display text over the images and style the carousel. The result is astonishing and since the content is html it has a lot of advances over flash, SEO, accesibillity and much easier to implement for backend developers. However flash still has to advantage ( or disadvantage ) that it compiles your code which makes it less easy to copy it.</p>
<p>The result and code ( of the jQuery carousel ) can be found <a href="http://www.wonderolie.nl/examples/carousel/">here</a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wonderolie.nl/2010/image-carousel-jquery-vs-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Musical Browser</title>
		<link>http://www.wonderolie.nl/2010/musical-browser-2/</link>
		<comments>http://www.wonderolie.nl/2010/musical-browser-2/#comments</comments>
		<pubDate>Tue, 09 Mar 2010 20:46:25 +0000</pubDate>
		<dc:creator>Wonderolie</dc:creator>
				<category><![CDATA[Max/MSP]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[graduation]]></category>

		<guid isPermaLink="false">http://www.wonderolie.nl/?p=45</guid>
		<description><![CDATA[After a tough year I finished my graduation project . The result is a browser which translates html and style properties into sounds. Unfortunately it is not possible to make the current application webbased. A lot of research needs to be done to increase the accuracy of the sonification of the web. In the future [...]]]></description>
			<content:encoded><![CDATA[<p>After a tough year I  finished my graduation project . The result is a browser which translates html and style properties into sounds. Unfortunately it is not possible to make the current application webbased. A lot of research needs to be done to increase the accuracy of the sonification of the web. In the future I hope to post some video&#8217;s to demonstrate the working, for now the sonification can be heard <a href="http://www.wonderolie.nl/musicalbrowser/">here</a>. </p>
<h3>Documentation</h3>
<p><a href="http://www.wonderolie.nl/musicalbrowser/MusicalBrowser-JeroenOliemans.pdf">The full paper</a></p>
<h3>Abstract</h3>
<p>Is it possible to make an interpretable sonification of the web? To answer this question the Musical Browser was build, The Musical Browser makes it possible to explore the web, and sent the HTML to the parser. The parser translates this model into data which a sound synthesizer understands. The synthesizer software turns this model into sound. This separation made it easy to experiment with the sonification.</p>
<p>
Several tests were conducted with custom created, preselected and random webpages. These test provided a granular approach to interpretation. From webpages with a distinct property,  (very dark webpage) to more average webpages (colorful webpage). For the last test predictions were made about webpages after hearing the sonification of these webpages.</p>
<p>
The result is that the musical browser’s sonification is interpretable for the HTML tags and some style properties of a webpage. But the sonification is not sufficient to make an exact prediction of the visual display of the webpage.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wonderolie.nl/2010/musical-browser-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Reading ArrayCollections in Flash</title>
		<link>http://www.wonderolie.nl/2009/reading-arraycollection-in-flash/</link>
		<comments>http://www.wonderolie.nl/2009/reading-arraycollection-in-flash/#comments</comments>
		<pubDate>Thu, 03 Dec 2009 20:17:21 +0000</pubDate>
		<dc:creator>Wonderolie</dc:creator>
				<category><![CDATA[flash]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.wonderolie.nl/?p=38</guid>
		<description><![CDATA[I always thought that arraycollection were only accessible within Flex. Last week however I needed to access some complex data from a webservice in flash. To access the webservice I used a very handy flash extension, which provided the remoting classes from Flex into flash. The result however contained a ArrayCollections. Luckily I found out [...]]]></description>
			<content:encoded><![CDATA[<p>I always thought that arraycollection  were only accessible within Flex. Last week however I needed to access some complex data from a webservice in flash. To access the webservice I used a very handy flash extension, which provided the remoting classes from Flex into flash. The result however contained a ArrayCollections. Luckily I found out that is was perfectly possible to parse the data from the arraycollections into arrays and object. I knew that the result had to contain a Clips Array within each Chapter as you can see in the debugger screenshot. Now in flash I could access these Clips like this</p>
<pre>
var _chapters_ar:Array = _chapters.list.source;

for( var i:int = 0; i < _chapters_ar.length; i++ )
{
     var _clips_ar:Array =  _chapters_ar[i].Clips.list.source;

     for (var j:int = 0; j < _clips_ar.length; j++)
     {
        ...
}
</pre>
<p>see screenshot below</p>
<p><img src="http://www.wonderolie.nl/examples/flash-arraycollection/flash-arraycollection.jpg" alt="debug view in flash" /></p>
]]></content:encoded>
			<wfw:commentRss>http://www.wonderolie.nl/2009/reading-arraycollection-in-flash/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OpenSoundControl list from Processing to Max/MSP</title>
		<link>http://www.wonderolie.nl/2009/opensoundcontrol-list-from-processing-to-maxmsp/</link>
		<comments>http://www.wonderolie.nl/2009/opensoundcontrol-list-from-processing-to-maxmsp/#comments</comments>
		<pubDate>Tue, 29 Sep 2009 19:22:27 +0000</pubDate>
		<dc:creator>Wonderolie</dc:creator>
				<category><![CDATA[Max/MSP]]></category>
		<category><![CDATA[Processing]]></category>
		<category><![CDATA[graduation]]></category>

		<guid isPermaLink="false">http://www.wonderolie.nl/?p=30</guid>
		<description><![CDATA[During my graduation project I needed to get a 2 dimensional list from Processing to Max/MSP. I knew my best option was Open Sound Control. First you need to CNMAT objects for Max/MSP, these objects make Max/MSP work with OSC. Processing needs the oscP5 library OSC does not make it possible to send multidimensional arrays, [...]]]></description>
			<content:encoded><![CDATA[<p>During my graduation project I needed to get a 2 dimensional list from Processing to Max/MSP. I knew my best option was Open Sound Control. First you need to <a href="http://cnmat.berkeley.edu/downloads">CNMAT</a> objects for Max/MSP, these objects make Max/MSP work with OSC. Processing needs the <a href="http://www.sojamo.de/oscP5">oscP5 library</a></p>
<p>OSC does not make it possible to send multidimensional arrays, therefore this only works with multidimensional arrays with the same data type. Now the code, processing sends an Integer array of an index and 4 values.</p>
<h3>Processing Code</h3>
<pre>import oscP5.*;
import netP5.*;

OscP5 oscP5;
NetAddress myRemoteLocation;

void setup()
{
  size(400,400);
  frameRate(25);
  /* start oscP5, listening for incoming messages at port 12000 */
  oscP5 = new OscP5(this,5555);

  myRemoteLocation = new NetAddress("127.0.0.1",5555);
}

void draw()
{
  background(0);
}

void mousePressed()
{
  /* in the following different ways of creating osc messages are shown by example */
  OscMessage myMessage = new OscMessage( "processing" );

  myMessage.add(new int[] { 1, 2000, 1000, 5, 5, 2, 400, 500, 5, 6, 3, 200, 560, 5, 6 }); 

  /* send the message */
  oscP5.send(myMessage, myRemoteLocation);
}</pre>
<h3>Max/MSP part</h3>
<p>Now in Max/MSP we need to update the objects to their maximum buffersize and their maximum listsize.  To extract the data we need to slice the list to remove the &#8220;processing&#8221; String and then divide the list in chunks of 5, the last step is to unpack these object to get to the data.</p>
<p><img title="maxpatch" src="http://www.wonderolie.nl/images/maxpatch.jpg" alt="max msp patch screenshot" width="374" height="468" /></p>
<p>As you can see you need to set the buffersize for the OpenSoundControl object in bytes. For the zl object you can set the maximum list size.</p>
<p>update ( 09-03-2010 )<br />
You can download a <a href="http://www.wonderolie.nl/examples/osc-processing-maxmsp/osc-processing-maxmsp.zip">sample application</a> with a processing patch as well as a max/MSP patch. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.wonderolie.nl/2009/opensoundcontrol-list-from-processing-to-maxmsp/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>CSS3 Break word</title>
		<link>http://www.wonderolie.nl/2009/css3-break-word/</link>
		<comments>http://www.wonderolie.nl/2009/css3-break-word/#comments</comments>
		<pubDate>Mon, 28 Sep 2009 19:01:31 +0000</pubDate>
		<dc:creator>Wonderolie</dc:creator>
				<category><![CDATA[CSS]]></category>

		<guid isPermaLink="false">http://www.wonderolie.nl/?p=26</guid>
		<description><![CDATA[During webdevelopment I have encountered many client with their own jargon, most often with very long words. It was not always possible to prevent long words breaking out of box. A few weeks ago i was testing the possibilities of CSS3 and which tags could be used in most modern browsers, thus excluding IE6. There [...]]]></description>
			<content:encoded><![CDATA[<p>During webdevelopment I have encountered many client with their own jargon, most often with very long words. It was not always possible to prevent long words breaking out of box. A few weeks ago i was testing the possibilities of CSS3 and which tags could be used in most modern browsers, thus excluding IE6. There were few but the cs3 property: word-wrap: break-word; did work. Of course it doesn&#8217;t provide you with perfect hyphenation which would be very difficult for all existing languages, but it will keep your layout clean. on the <a title="break-word demonstration page" href="http://www.wonderolie.nl/examples/css3-wordbreak/breakword-example.html" target="_blank">demonstration page</a>.</p>
<p>works in  IE7+, FF 3.5, Chrome 2+</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wonderolie.nl/2009/css3-break-word/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Papervision poetry</title>
		<link>http://www.wonderolie.nl/2009/papervision-poetry/</link>
		<comments>http://www.wonderolie.nl/2009/papervision-poetry/#comments</comments>
		<pubDate>Mon, 24 Aug 2009 19:13:33 +0000</pubDate>
		<dc:creator>Wonderolie</dc:creator>
				<category><![CDATA[3D]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.wonderolie.nl/?p=20</guid>
		<description><![CDATA[Since I started with papervision the library really got me. I didn&#8217;t miss any function during the creation of this simple poetry aplication. However I must say that I did not focus on collada and importing 3D models into this little test. One thing that does concern me is the performance, hence I suspect that [...]]]></description>
			<content:encoded><![CDATA[<p>Since I started with papervision the library really got me. I didn&#8217;t miss any function during the creation of this simple poetry aplication. However I must say that I did not focus on collada and importing 3D models into this little test. One thing that does concern me is the performance, hence I suspect that it is rather the flash player than papervision. Nevertheless this simple test already draws 60 percent off my core2duo laptop.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="600" height="600" id="pvp" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="http://www.wonderolie.nl/examples/papervision-poetry/pvp.swf"/><param name="quality" value="high" /><param name="bgcolor" value="#000000"/><embed src="http://www.wonderolie.nl/examples/papervision-poetry/pvp.swf" quality="high" bgcolor="#000000" width="600" height="600" name="0" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></p>
<h3>Application functionalities</h3>
<p>This little application makes use of dynamic font loading and uses a seperate class file to give the cubes a movieclip face with a dynamic textfield. Download the <a href="http://www.wonderolie.nl/examples/papervision-poetry/PaperVisionPoetry.zip">papervision-poetry source</a>.</p>
<p>But the fun part stays, creating realtime interactive 3D scene&#8217;s. I have a bachelor degree in product design, and some working experience in the field. But none of the 3D things I did back then were realtime, of course you could interact with a 3D model on a very high granular level. I cannot wait to see more interference between 3D and the still flat world of internet.</p>
<p>It struck me that working with papervision is easy and real fun, it provides sufficient functionality to seperate a 3D model be interactive with those seperate parts, keep up the good work!</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wonderolie.nl/2009/papervision-poetry/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Flash Accordion List</title>
		<link>http://www.wonderolie.nl/2009/flash-accordion-list/</link>
		<comments>http://www.wonderolie.nl/2009/flash-accordion-list/#comments</comments>
		<pubDate>Tue, 21 Jul 2009 19:31:29 +0000</pubDate>
		<dc:creator>Wonderolie</dc:creator>
				<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.wonderolie.nl/2009/flash-accordion-list/</guid>
		<description><![CDATA[Recently at work I was looking for an actionscript accordion which was easy to customize. The goal was to create a accordion for navigation purposes. I could not find anything usefull, but fixed size accordions. I needed to create one myself. Download the sourcefiles accordionlist.zip and accordionlistscroll.zip I will explain the code shortly. Perhaps it [...]]]></description>
			<content:encoded><![CDATA[<p>Recently at work I was looking for an actionscript accordion which was easy to customize. The goal was to create a accordion for navigation purposes. I could not find anything usefull, but fixed size accordions. I needed to create one myself. </p>
<h4>Download the sourcefiles <a href="http://www.wonderolie.nl/examples/accordion-list/accordionlist.zip">accordionlist.zip</a> and <a href="http://www.wonderolie.nl/examples/accordion-list/accordionlistscroll.zip">accordionlistscroll.zip</a></h4>
<p>I will explain the code shortly. Perhaps it will be usefull for somebody and safe some time. I have left the styling basic just to show the working and principle to make is easier to be customized. The visual part of the accordion is made in flash to make it easy to add mouseOver etc.</p>
<h3>Accordion List</h3>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="170" height="350" id="ammap" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="http://www.wonderolie.nl/examples/accordion-list/AccordionList.swf"/><param name="quality" value="high" /><param name="bgcolor" value="#ffffff"/><embed src="http://www.wonderolie.nl/examples/accordion-list/AccordionList.swf" quality="high" bgcolor="#ffffff" width="170" height="350" name="0" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></p>
<p>I have tried to keep the accordion principle in the main class, so that the main class could act as the director. The accordion header communicates with the main class through an custom event. An in the end it might be necessary to add an custom event to the menu items, for example to retrieve some other data through an remote call, or to switch to another page. </p>
<p>After this accordion I realised that the main advantage for an accordion is the possibillity to display an unknown number of items and subitems in a small place. So I decided to ad a scrollbar to supply this advantage to the accordion.</p>
<p><object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="170" height="200" id="ammap" align="middle"><param name="allowScriptAccess" value="sameDomain" /><param name="movie" value="http://www.wonderolie.nl/examples/accordion-list/AccordionListScroll.swf"/><param name="quality" value="high" /><param name="bgcolor" value="#ffffff"/><embed src="http://www.wonderolie.nl/examples/accordion-list/AccordionListScroll.swf" quality="high" bgcolor="#ffffff" width="170" height="200" name="0" align="middle" allowScriptAccess="sameDomain" type="application/x-shockwave-flash" pluginspage="http://www.macromedia.com/go/getflashplayer" /></object></p>
<p>To make the scrollbar work properly I needed to add all the AccordionList as well as the Scrollbar to a seperate containerclass ( AccordionListContainer ). The next step was to update the scrollBar roperties with the setScrollProperties when the user clicks on one of the headers.</p>
<p>The result is a flexible accordion list class, which can be used to display anything from links to images. Since the class loads symbols it should be easy to style it to your own preferences. And of course remove my hard coded item height values.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.wonderolie.nl/2009/flash-accordion-list/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>SWFObject with Preloader</title>
		<link>http://www.wonderolie.nl/2009/swfobject-with-preloader/</link>
		<comments>http://www.wonderolie.nl/2009/swfobject-with-preloader/#comments</comments>
		<pubDate>Wed, 10 Jun 2009 12:43:48 +0000</pubDate>
		<dc:creator>Wonderolie</dc:creator>
				<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.wonderolie.nl/2009/swfobject-with-preloader/</guid>
		<description><![CDATA[Here&#8217;s the online example SWFObject with Preloader, and the zipped version preloader-swfobject.zip During the development of a rather big flash video portal, I noticed some difficulties with setting paths during the stages of development. The application made a lot of connections to external data: XML, Flash Media Server 3.5 and made call with a Microsoft [...]]]></description>
			<content:encoded><![CDATA[<p>Here&#8217;s the online example <a href="http://www.wonderolie.nl/examples/preloader-swfobject/">SWFObject with Preloader</a>, and the zipped version <a href="http://www.wonderolie.nl/examples/preloader-swfobject/preloader-swfobject.zip">preloader-swfobject.zip</a></p>
<p>During the development of a rather big flash video portal, I noticed some difficulties with setting paths during the stages of development. The application made a lot of connections to external data: XML, Flash Media Server 3.5 and made call with a Microsoft .NET backend through FluorineFX remoting. </p>
<p>To make al this easily manageable I used a SWFObject to make it easy to transfer the application from Developing to Testing and finally to Production. The flash project was built in a way that the .NET developer needs to copy the SWFObject code and one includes folder to his backend. The includes folder contains all the swf, xml, img, javascript etc&#8230;</p>
<p>At that point the designer came with a preloader, which made the preloader.swf receive the SWFObject flashvars. I have made a Flash application template that works for me and the company I work for. But I am very curious if there are other, more neat ways to over come this problem. </p>
<p>The main feature of this template structure is that the preloader checks whether it has received a value form SWFObject. Based on the result of this check two different functions can be called in the main class of the main flash file.These functions sets the path for the flash file to make it work in the flash IDE or on the server with in HTML wrapper, after these paths or parameters are set the function initializes the application. See the code below</p>
</p>
<pre language="actionscript">
var ldr:Loader = new Loader();
ldr.contentLoaderInfo.addEventListener(ProgressEvent.PROGRESS, progressEventListener);
ldr.contentLoaderInfo.addEventListener(Event.COMPLETE, completeListener);
ldr.contentLoaderInfo.addEventListener(Event.INIT, initListener );

var req:URLRequest = new URLRequest( mainPath );
ldr.load( req );

function initListener( e:Event ):void
{
	if( root.loaderInfo.parameters.swfBasePath != null )
	{
		Object( ldr.content ).setSWFObjectValues( swfParams );
	}else{
		Object( ldr.content ).setLocalValues( );
	}
}
</pre>
<p>I really would like to discuss if this is a proper solution   </p>
]]></content:encoded>
			<wfw:commentRss>http://www.wonderolie.nl/2009/swfobject-with-preloader/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
