<?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>toDeBlog &#187; scripting</title>
	<atom:link href="http://todepoint.com/blog/category/scripting/feed/" rel="self" type="application/rss+xml" />
	<link>http://todepoint.com/blog</link>
	<description>A blog about User Interface, User Experience, Design, Flash, Product management and all that goes in between.</description>
	<lastBuildDate>Sun, 05 Sep 2010 08:19:23 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
		<item>
		<title>Html5, Flash and Beer bottles</title>
		<link>http://todepoint.com/blog/2010/09/04/html5-flash-and-beer-bottles/</link>
		<comments>http://todepoint.com/blog/2010/09/04/html5-flash-and-beer-bottles/#comments</comments>
		<pubDate>Sat, 04 Sep 2010 16:24:46 +0000</pubDate>
		<dc:creator>adi</dc:creator>
				<category><![CDATA[Html5]]></category>
		<category><![CDATA[action script]]></category>
		<category><![CDATA[cool]]></category>
		<category><![CDATA[scripting]]></category>

		<guid isPermaLink="false">http://todepoint.com/blog/?p=305</guid>
		<description><![CDATA[Have you seen the cool things Google are doing with Html5 recently? Okay, I am not trying to defend Flash in any way, but Html5 development will soon hit the same bottle-necks the Flash player did, as it uses the browser&#8217;s Javascript engine. Evidence: check out the CPU demands in Google&#8217;s buckyball page.. looks familiar?]]></description>
			<content:encoded><![CDATA[<p>Have you seen the cool things Google are doing with Html5 recently? </p>
<p>Okay, I am not trying to defend Flash in any way, but Html5 development will soon hit the same bottle-necks the Flash player did, as it uses the browser&#8217;s Javascript engine. </p>
<p>Evidence: check out the CPU demands in Google&#8217;s buckyball page.. looks familiar? </p>
<p><img src="http://farm5.static.flickr.com/4108/4957469116_ae3bf1f97e.jpg" width="450" height="300" alt="Html5 CPU bottle-neck " style="border:1px solid #ccc;" /></p>
]]></content:encoded>
			<wfw:commentRss>http://todepoint.com/blog/2010/09/04/html5-flash-and-beer-bottles/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Tips on connecting blogs to Facebook</title>
		<link>http://todepoint.com/blog/2010/08/26/tips-on-connecting-blogs-to-facebook/</link>
		<comments>http://todepoint.com/blog/2010/08/26/tips-on-connecting-blogs-to-facebook/#comments</comments>
		<pubDate>Thu, 26 Aug 2010 08:53:42 +0000</pubDate>
		<dc:creator>adi</dc:creator>
				<category><![CDATA[User Experience]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[technology]]></category>

		<guid isPermaLink="false">http://todepoint.com/blog/?p=130</guid>
		<description><![CDATA[I just finished connecting my blog and few other pages on my site to Facebook, to enjoy some sharing goodness of the social community, as well as Facebook&#8217;s &#8216;insight&#8217; statistics &#8211; why not enjoy what is given for free right? I had some setbacks and strugles along the way, thought it might save you some [...]]]></description>
			<content:encoded><![CDATA[<p>I just finished connecting my blog and few other pages on my site to Facebook, to enjoy some sharing goodness of the social community, as well as Facebook&#8217;s &#8216;insight&#8217; statistics &#8211; why not enjoy what is given for free right?</p>
<p>I had some setbacks and strugles along the way, thought it might save you some time (and wasted &#8216;Likes&#8217; too) to write few tips down. It will not be a full tutorial, instead I will focus on some oddities on the Facebook side:</p>
<p>First tip will be: Do not implement until you REALLY understand what your options are and what exactly you want to do. Facebook offers two main options for adding a &#8216;Like&#8217; button to your page/site/blog, one is IFRAME, second is XFBML. The iframe option is as simple as adding a line in your html source, and will get you going in seconds. The xfbml is  based on their <a href="http://developers.facebook.com/docs/reference/javascript/" target="_blank">Javascript SDK</a>, and sports the Facebook &#8216;insight&#8217; statistics via open graph, but requires few preliminary steps which are kinda tricky as the documentation is fairly sparse. Obviously we would prefer the xfbml option.</p>
<p>In order to use xfbml you will need an <strong>AppID</strong>, which require you to set up an application, to do that you will have to add the <strong>Developer application</strong> to your Facebook Profile.</p>
<p>Then, you have to <strong>activate</strong> you developer account &#8211; you have to give you cell number, after which you will receive a code via sms to submit.</p>
<p>Then you can <strong>create an application</strong> in Facebook <a href="http://www.facebook.com/developers" target="_blank" title="create a Facebook application">here</a>.<br />
* This page has a strange behavior, you will define your application name, pass a captcha and receive an Error page:<br />
<span style="color:black;">&#8220;Sorry, an error has occurred.<br />
We&#8217;re working on getting this fixed as soon as we can.&#8221;</span><br />
<img src="http://farm5.static.flickr.com/4122/4928377843_bbc9f1d4cf.jpg" width="450" height="200" alt="Creating Facebook application error" style="border:1px solid #ccc;" /><br />
But if you look at the column on the right in the developers page, you will see that the application was actually created:<br />
<img src="http://farm5.static.flickr.com/4073/4928377801_3c9db30155.jpg" width="450" height="240" alt="Facebook applications list" style="border:1px solid #ccc;" /> (Facebook, are you serious about that? is this some kind of a test?) I ended up creating about 10 applications, read countless forums threads until I found it by mistake!</p>
<p>After that you can start implementing, follow the instruction <a href="http://forum.developers.facebook.net/viewtopic.php?pid=223994" target="_blank" title="Like button XFBML tutorial">here</a>  which are pretty simple.</p>
<p>Since I thought Facebook application creation service is down, I started with the iframe version, obviously a mistake as all the &#8216;Likes&#8217; I got were dumped once I connected the xfbml. damn.</p>
<p>Good luck and may the force be with you..</p>
]]></content:encoded>
			<wfw:commentRss>http://todepoint.com/blog/2010/08/26/tips-on-connecting-blogs-to-facebook/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to stroke several sprites as one</title>
		<link>http://todepoint.com/blog/2008/06/19/how-to-stroke-several-sprites-as-one/</link>
		<comments>http://todepoint.com/blog/2008/06/19/how-to-stroke-several-sprites-as-one/#comments</comments>
		<pubDate>Thu, 19 Jun 2008 08:50:22 +0000</pubDate>
		<dc:creator>Adi</dc:creator>
				<category><![CDATA[action script]]></category>
		<category><![CDATA[scripting]]></category>
		<category><![CDATA[glow filter]]></category>
		<category><![CDATA[stroke]]></category>
		<category><![CDATA[tip]]></category>

		<guid isPermaLink="false">http://todepoint.com/blog/?p=50</guid>
		<description><![CDATA[If you&#8217;re trying to create a single stroke (outline, contour) over several sprites or movieClips, you can simply create a parent object to hold them and apply a glow filter to it. In this example (yeah, it&#8217;s an old and basic as2 thing, a test I did ages ago) I applied a glow filter of [...]]]></description>
			<content:encoded><![CDATA[<p>If you&#8217;re trying to create a single stroke (outline, contour) over several sprites or movieClips, you can simply create a parent object to hold them and apply a glow filter to it. In this example (yeah, it&#8217;s an old and basic as2 thing, a test I did ages ago) I applied a glow filter of 2 pixels Blur to the comic balloon background.
<div id="comic"><img src="http://www.todepoint.com/adi/as_examples/comics/comics_balloon.jpg" width="450" height="200" border="0" /></div>
<p><script src="http://www.todepoint.com/blog/js/swfobject.js" type="text/javascript"></script><script type="text/javascript">
// <![CDATA[
var glsso = new SWFObject("../adi/as_examples/comics/comics_balloon.swf", "comical", "450", "200", "8", "#FFFFFF");
glsso.write("comic");
// ]]&gt;</script>The background is made of two movieClips, each has it&#8217;s own behavior, if you click the horn you can adjust its size and direction, if you click the text area you can scale the textField and the balloon background along with it.</p>
<p>This trick can be really handy if you&#8217;re making animations of moving silhouettes. In this flash I used GreenSock&#8217;s <a href="http://blog.greensock.com/transformmanageras2/" target="_blank" alt="TransformManager actionscript class" title="TransformManager actionscript class">TransformManager</a> to make the textField and horn controlable.</p>
]]></content:encoded>
			<wfw:commentRss>http://todepoint.com/blog/2008/06/19/how-to-stroke-several-sprites-as-one/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>window.onblur &#8211; strange behavior on browsers</title>
		<link>http://todepoint.com/blog/2008/02/18/windowonblur-strange-behavior-on-browsers/</link>
		<comments>http://todepoint.com/blog/2008/02/18/windowonblur-strange-behavior-on-browsers/#comments</comments>
		<pubDate>Mon, 18 Feb 2008 18:32:04 +0000</pubDate>
		<dc:creator>Adi</dc:creator>
				<category><![CDATA[scripting]]></category>
		<category><![CDATA[browsers]]></category>
		<category><![CDATA[onblur]]></category>
		<category><![CDATA[onfocus]]></category>

		<guid isPermaLink="false">http://todepoint.com/blog/2008/02/18/windowonblur-strange-behavior-on-browsers/</guid>
		<description><![CDATA[About a year ago I posted an example for using externalInterface to start and stop sound inside flash, based on focus and blur events in the window. After recently receiving several comments and questions about strange behavior on different browsers, I decided to test the script on the browsers I have on my Mac and [...]]]></description>
			<content:encoded><![CDATA[<p>About a year ago I posted an <a href="http://todepoint.com/blog/2007/01/27/communicating-with-flash-external-interface-method/">example</a> for using externalInterface to start and stop sound inside flash, based on focus and blur events in the window. After recently receiving several comments and questions about strange behavior on different browsers, I decided to test the script on the browsers I have on my Mac and PC.</p>
<p>Originally I was using the <strong>onFocus</strong> &#038; <strong>onBlur</strong> events, attached to the window object, I found out that each browser can deal with these event when attached to a different object, I started testing which object works for each browser, and added browser sniffer for the listener definition, these are the objects for each browser:<br />
<ins>
<table>
<tr>
<td width="50%" class="table_head">Browser</td>
<td class="table_head">Object</td>
</tr>
<tr>
<td>Safari, Opera, Omniweb</td>
<td>window</td>
</tr>
<tr>
<td>Firefox </td>
<td>window.document</td>
</tr>
<tr>
<td>IE7</td>
<td>document.body <small>(* partially working)</small></td>
</tr>


</table></ins>
</p>
<p>And here are the results:<br />
<ins>
<table>
<tr>
<td colspan="2" class="table_head">Mac OS X 10.5.2 Leopard</td>
</tr>

<tr>
<td width="80">Safari</td>
<td>All working fine.</td>
</tr>
<tr>
<td width="80">Firefox</td>
<td>onblur is only fired when loosing focus to another Firefox window, not to another app.</td>
</tr>
<tr>
<td width="80">Opera</td>
<td>All working fine.</td>
</tr>
<tr>
<td width="80">Omniweb</td>
<td>All working fine.</td>
</tr>
</table><br />

<table>
<tr>
<td colspan="2" class="table_head">Windows XP</td></tr>
<tr>
<td width="80">IE7</td>
<td><ol><li>With Tabbing enabled: onblur is fired upon focus event, no event corresponds with blur.</li>
<li>With Tabbing disabled: onblur fires properly if clicked on title area, once clicked on body (content of page) behaves the same as with Tabbing enabled..</li></ol></td>
</tr>
<tr>
<td>Firefox</td>
<td>onfocus is fired twice when clicked on body, once when clicked on browser title.</td>
</tr>
</table></ins>
</p>
<p>The situation on Mac seems to be much better than on Windows XP (sorry, I did not test Vista, so if someone can try this on Vista and send me the results &#8211; it would be great), currently both IE7 and Firefox on XP have strange behavior.<br />
With IE7 it gets even weirder, when IE7 has Tabbing enabled, it can&#8217;t handle onblur event for body object, while without tabbing, onblur works if clicked on the browser title area, once clicked inside the window (Html body) &#8220;something&#8221; goes crazy and both onfocus and onblur are fired together upon focus event.</p>
<p>Here is the <a href="http://todepoint.com/adi/as_examples/focusTester.html" target="_blank" title="">test page</a>, you will find the events I tested for IE7 commented in the page source.</p>
<p>Does anyone know a way around this strange behavior on IE7 and Firefox?<br />
any way to make this listener compatible with all browsers?</p>
]]></content:encoded>
			<wfw:commentRss>http://todepoint.com/blog/2008/02/18/windowonblur-strange-behavior-on-browsers/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
	</channel>
</rss>
