<?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>Zeh Fernando &#187; Job posts</title>
	<atom:link href="http://zehfernando.com/category/job-posts/feed/" rel="self" type="application/rss+xml" />
	<link>http://zehfernando.com</link>
	<description></description>
	<lastBuildDate>Wed, 16 May 2012 22:02:26 +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>Eye tracking testing</title>
		<link>http://zehfernando.com/2011/eye-tracking-testing/</link>
		<comments>http://zehfernando.com/2011/eye-tracking-testing/#comments</comments>
		<pubDate>Fri, 12 Aug 2011 13:36:44 +0000</pubDate>
		<dc:creator>Zeh</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Job posts]]></category>

		<guid isPermaLink="false">http://zehfernando.com/?p=865</guid>
		<description><![CDATA[Recently, in one of our work pitches at Firstborn, we were asked whether we could create a web-based application that could use your webcam to track the position of your eyes. We didn&#8217;t know for sure that would be possible (or to which level of accuracy) so we decided to spend a few days creating [...]]]></description>
			<content:encoded><![CDATA[<p>Recently, in one of our work pitches at <a href="http://firstborn.com">Firstborn</a>, we were asked whether we could create a web-based application that could use your webcam to track the position of your eyes. We didn&#8217;t know for sure that would be possible (or to which level of accuracy) so we decided to spend a few days creating a test prototype. This is the result, running on Flash 10.</p>
<p><iframe src="http://player.vimeo.com/video/27584906?portrait=0" frameborder="0" width="600" height="450"></iframe></p>
<p>The red circle represents the perceived position of my eyes, and the green line is just a line that moves with a speed that is based on the circle position (when the circle is on top, the line moves up; when the circle is in the middle, the line stays; when the circle is at the bottom, the line moves down).</p>
<p>It uses a face tracking algorithm for initial face detection, then some other color-separating code to find where the eye is looking at in real-time. An initial calibration is necessary (the code must know when the eye is looking at the top and at the bottom of the screen; then it can find where you&#8217;re looking at, in between those two).</p>
<p>The face detection used an AS3 port of OpenCV, based on the work of <a href="http://maaash.jp/as3/as3marilena-object-detection-in-as3/">Ohtsuka Masakazu</a> and <a href="http://www.quasimondo.com/archives/000687.php">Mario Klingemann</a> with a bunch of modifications for speed and varying levels of accuracy (nothing too crazy though, just better for our specific use case).</p>
<p>The result was SoBe&#8217;s <a href="http://www.sobe.com/#/tryeverything/staring" target="_blank">Staring Contest</a>, where you have to keep your eyes in a specific part of the screen to &#8220;win&#8221; the game (try the “experimental version” for the eye-tracking webcam version; otherwise it&#8217;s a mouse-based game). It doesn&#8217;t work in all situations &#8211; it relies heavily on the amount of light available at the visitor&#8217;s environment, and on the visitor&#8217;s ability to not rotate their head too much during the experience &#8211; but I still consider it a success.</p>
<p>As a developer, it&#8217;s very important to take some time out to try not only new techniques but also new platforms. The tools we have available for us change constantly and to keep up you need to make time for some private investigation of new methods and capabilities. This time for <em>research &amp; development</em> with something that may or may not be fruitful is hard to come by, but it&#8217;s certainly of utmost importance in this career. It&#8217;s also fun, of course.</p>
<p>This recent presentation by Joon Park, our Chief Creative Officer, talks a little about this, talking not only about the above example but also about some other great &#8220;personal&#8221; projects by some of our developers that started as an exercise but turned out to be so much more.</p>
<p><iframe src="http://player.vimeo.com/video/26316045?portrait=0" width="600" height="480" frameborder="0"></iframe></p>
<p>P.S. As always, <a href="http://firstborn.com/#/contact-us/jobs/" target="_blank">we&#8217;re hiring</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://zehfernando.com/2011/eye-tracking-testing/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Firstborn is hiring a HTML/JS developer</title>
		<link>http://zehfernando.com/2011/firstborn-is-hiring-a-htmljs-developer/</link>
		<comments>http://zehfernando.com/2011/firstborn-is-hiring-a-htmljs-developer/#comments</comments>
		<pubDate>Tue, 12 Apr 2011 17:54:54 +0000</pubDate>
		<dc:creator>Zeh</dc:creator>
				<category><![CDATA[Job posts]]></category>

		<guid isPermaLink="false">http://zehfernando.com/?p=830</guid>
		<description><![CDATA[I may have forgotten to mention, but in addition to Flash Developers, Producers and others, we&#8217;re also hiring a serious JS/HTML/CSS developer for our New York offices. Do you wanna work with some of the best people in their field, in a place that is challenging and fun? Then Firstborn is the place you&#8217;re looking [...]]]></description>
			<content:encoded><![CDATA[<p>I may have forgotten to mention, but in addition to <a href="http://firstborn.com/#/contact-us/jobs/14/">Flash Developers</a>, <a href="http://firstborn.com/#/contact-us/jobs/18/">Producers</a> and others, we&#8217;re also <a href="http://firstborn.com/#/contact-us/jobs/56/">hiring a serious JS/HTML/CSS developer</a> for our New York offices. Do you wanna work with some of the best people in their field, in a place that is challenging and fun? Then Firstborn is the place you&#8217;re looking for.</p>
<p><iframe title="YouTube video player" width="640" height="390" src="http://www.youtube.com/embed/V12U0IGAKjU?rel=0&amp;hd=1" frameborder="0" allowfullscreen></iframe></p>
<p>I love it here.</p>
]]></content:encoded>
			<wfw:commentRss>http://zehfernando.com/2011/firstborn-is-hiring-a-htmljs-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firstborn is hiring yet again</title>
		<link>http://zehfernando.com/2010/firstborn-is-hiring-yet-again/</link>
		<comments>http://zehfernando.com/2010/firstborn-is-hiring-yet-again/#comments</comments>
		<pubDate>Sun, 17 Jan 2010 18:42:51 +0000</pubDate>
		<dc:creator>Zeh</dc:creator>
				<category><![CDATA[Job posts]]></category>

		<guid isPermaLink="false">http://zehfernando.com/?p=692</guid>
		<description><![CDATA[Firstborn &#8211; the company in NYC I work for &#8211; is hiring new interns and other talents for 2010! To quote, Whether you’re a student blazing your path to digital superstardom or you’re well-versed in the interactive world and hoping to expand your experience, we’re looking for the best of the best to take it [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://firstbornmultimedia.com/">Firstborn</a> &#8211; the company in NYC I work for &#8211; is hiring new interns and other talents for 2010! To quote,</p>
<blockquote><p>Whether you’re a student blazing your path to digital superstardom or you’re well-versed in the interactive world and hoping to expand your experience, we’re looking for the best of the best to take it to the next level as a Firstborn intern.</p>
<p>Our interns aren’t treated like nobodies &#8211; they’re here to gain knowledge and improve their skills by working on high level, award winning work. You’ll have the chance to work closely with the Firstborn team on a number of projects and campaigns that include strategy and planning, concept development and design, </p>
<p>Flash programming and animation, 3D modeling and motion graphics, video production and editing, iPhone and mobile application development&#8230; and anything else that comes to life in the digital world.</p>
<p>All of our intern positions are paid and you will also receive a monthly Metrocard, a roundtrip flight to NYC if necessary and other fun extras. Our internships usually last 3 &#8211; 8 months and could open the doors to join the Firstborn crew or be the jumpstart you need to launch an exciting career.</p>
<p>For consideration, email us a little information about yourself, your resume and a list of URLs or your portfolio to <a href="mailto:jobs.intern@firstbornmultimedia.com">jobs.intern@firstbornmultimedia.com</a></p></blockquote>
<p>You can find a full listing of the positions available <a href="http://firstbornmultimedia.com/#/contact-us/jobs/">here</a>. And you can also watch our new intern video below &#8211; our homage to <a href="http://www.youtube.com/watch?v=anwlpTgbQTE">Nike&#8217;s iconic &#8220;Take it to the next level&#8221;</a> spot.</p>
<p><object width="640" height="385"><param name="movie" value="http://www.youtube.com/v/Eg9XWQexSoQ&#038;hl=en_US&#038;fs=1&#038;rel=0"></param><param name="allowFullScreen" value="true"></param><param name="allowscriptaccess" value="always"></param><embed src="http://www.youtube.com/v/Eg9XWQexSoQ&#038;hl=en_US&#038;fs=1&#038;rel=0" type="application/x-shockwave-flash" allowscriptaccess="always" allowfullscreen="true" width="640" height="385"></embed></object></p>
<p>No, I don&#8217;t appear in the video. I&#8217;m not photogenic enough. Or, to use my favorite excuse, <em>I was too busy doing actual work</em>.</p>
]]></content:encoded>
			<wfw:commentRss>http://zehfernando.com/2010/firstborn-is-hiring-yet-again/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Gringo.nu is also looking for senior Flash developers</title>
		<link>http://zehfernando.com/2008/gringonu-is-also-looking-for-senior-flash-developers/</link>
		<comments>http://zehfernando.com/2008/gringonu-is-also-looking-for-senior-flash-developers/#comments</comments>
		<pubDate>Fri, 19 Dec 2008 18:10:35 +0000</pubDate>
		<dc:creator>Zeh</dc:creator>
				<category><![CDATA[Job posts]]></category>

		<guid isPermaLink="false">http://zehfernando.com/?p=364</guid>
		<description><![CDATA[Looking for a change of pace, living in one the craziest cities in the world with some extremely creative people who drink a lot and like to swear like drunk scotsmen? Or maybe you already fit into that description and you&#8217;re just waiting for the authorization to enter the building? Here&#8217;s your chance, Gringo is [...]]]></description>
			<content:encoded><![CDATA[<p>Looking for a change of pace, living in one the craziest cities in the world with some extremely creative people who drink a lot and like to swear like drunk scotsmen? Or maybe you already fit into that description and you&#8217;re just waiting for the authorization to enter the building? Here&#8217;s your chance, <a href="http://www.gringo.nu">Gringo</a> is now looking for a senior Flash/Actionscript developer and they mention relocation is OK. Find more information about the ideal candidate <a href="http://blog.gringo.nu/gringonews/gringo-is-looking-for-a-senior-developer">here</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://zehfernando.com/2008/gringonu-is-also-looking-for-senior-flash-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gringo.nu is looking for a SilverLight developer</title>
		<link>http://zehfernando.com/2008/gringonu-is-looking-for-a-silverlight-developer/</link>
		<comments>http://zehfernando.com/2008/gringonu-is-looking-for-a-silverlight-developer/#comments</comments>
		<pubDate>Thu, 18 Dec 2008 15:55:07 +0000</pubDate>
		<dc:creator>Zeh</dc:creator>
				<category><![CDATA[Job posts]]></category>
		<category><![CDATA[silverlight]]></category>

		<guid isPermaLink="false">http://zehfernando.com/?p=353</guid>
		<description><![CDATA[Top-level Brazilian agency Gringo is looking for a SilverLight developer. Gringo is located in São Paulo, Brazil, and this is for an on-site role. Details follow (in Brazilian Portuguese). Enfim, a Gringo precisa de um profissional SilverLight pra se juntar à sua equipe supercompetente de desenvolvedores. O candidato ideal irá trampar a princípio de agora [...]]]></description>
			<content:encoded><![CDATA[<p>Top-level Brazilian agency <a href="http://www.gringo.nu">Gringo</a> is looking for a SilverLight developer. Gringo is located in São Paulo, Brazil, and this is for an on-site role. Details follow (in Brazilian Portuguese).</p>
<p>Enfim, a Gringo precisa de um profissional SilverLight pra se juntar à sua equipe supercompetente de desenvolvedores. O candidato ideal irá trampar a princípio de agora até março na Gringo, desenvolvendo um projeto bem bacana. Valores são negociáveis, e é imprescindível que o profissional cumpra prazos e toque o projeto sem maiores surpresas.</p>
<p>Quem estiver interessado, favor contactar Mylena Mandolesi no email mylena (arroba) gringo.nu.</p>
<p>Acho que não preciso nem falar nisso, mas a Gringo é uma agência que mais do que recomendo a qualquer um. Pra quem curte SilverLight, esta é uma puta oportunidade de trabalhar com uma equipe extremamente criativa e competente.</p>
]]></content:encoded>
			<wfw:commentRss>http://zehfernando.com/2008/gringonu-is-looking-for-a-silverlight-developer/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Firstborn has a new website</title>
		<link>http://zehfernando.com/2007/firstborn-has-a-new-website/</link>
		<comments>http://zehfernando.com/2007/firstborn-has-a-new-website/#comments</comments>
		<pubDate>Thu, 15 Nov 2007 19:05:31 +0000</pubDate>
		<dc:creator>Zeh</dc:creator>
				<category><![CDATA[Job posts]]></category>
		<category><![CDATA[Site releases]]></category>
		<category><![CDATA[firstborn]]></category>

		<guid isPermaLink="false">http://labs.zeh.com.br/blog/?p=138</guid>
		<description><![CDATA[North-American studio Firstborn releases their new portfolio, not only showcasing 10 years of a great collection of websites developed but also showing how Flash can be integrated with the browser to allow full history navigation and bookmarking. The result&#8217;s pretty good, and a website worth exploring. Also, apparently they&#8217;re still looking for people to join [...]]]></description>
			<content:encoded><![CDATA[<p>North-American studio Firstborn releases <a href="http://www.firstbornmultimedia.com">their new portfolio</a>, not only showcasing 10 years of a great collection of websites developed but also showing how Flash can be integrated with the browser to allow full history navigation and bookmarking. The result&#8217;s pretty good, and a website worth exploring.</p>
<p>Also, apparently they&#8217;re still <a href="http://www.firstbornmultimedia.com/#/contact-us/jobs/">looking for people</a> to join their ranks on their New York and Los Angeles offices, so if anyone&#8217;s interested, here&#8217;s my recommendation of a great company to work at.</p>
]]></content:encoded>
			<wfw:commentRss>http://zehfernando.com/2007/firstborn-has-a-new-website/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Gringo is still hiring Flash Developers</title>
		<link>http://zehfernando.com/2007/gringo-is-still-hiring-flash-developers/</link>
		<comments>http://zehfernando.com/2007/gringo-is-still-hiring-flash-developers/#comments</comments>
		<pubDate>Fri, 26 Oct 2007 14:30:01 +0000</pubDate>
		<dc:creator>Zeh</dc:creator>
				<category><![CDATA[Job posts]]></category>
		<category><![CDATA[gringo]]></category>

		<guid isPermaLink="false">http://labs.zeh.com.br/blog/?p=133</guid>
		<description><![CDATA[São Paulo-based studio Gringo.nu is still looking for Flash Developers. More information about them and about what they&#8217;re looking for on this previous post.]]></description>
			<content:encoded><![CDATA[<p>São Paulo-based studio <a href="http://www.gringo.nu">Gringo.nu</a> is still looking for Flash Developers. More information about them and about what they&#8217;re looking for <a href="http://labs.zeh.com.br/blog/?p=115">on this previous post</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://zehfernando.com/2007/gringo-is-still-hiring-flash-developers/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Gringo is hiring Flash developers</title>
		<link>http://zehfernando.com/2007/gringo-is-hiring-flash-developers/</link>
		<comments>http://zehfernando.com/2007/gringo-is-hiring-flash-developers/#comments</comments>
		<pubDate>Mon, 16 Jul 2007 21:10:19 +0000</pubDate>
		<dc:creator>Zeh</dc:creator>
				<category><![CDATA[Job posts]]></category>
		<category><![CDATA[gringo]]></category>

		<guid isPermaLink="false">http://labs.zeh.com.br/blog/?p=115</guid>
		<description><![CDATA[Brazilian web studio Gringo.nu &#8211; the company I freelance for &#8211; is hiring Flash developers! Candidates looking to join their ranks should have vast experience in AS 1/2 and breath OOP. Having AS 3 knowledge/experience is a plus, but willingness to research and learn is even better. They should love what they do and be [...]]]></description>
			<content:encoded><![CDATA[<p>Brazilian web studio <a href="http://www.gringo.nu/">Gringo.nu</a> &#8211; the company I freelance for &#8211; is hiring Flash developers!</p>
<p>Candidates looking to join their ranks should have vast experience in AS 1/2 and breath OOP. Having AS 3 knowledge/experience is a plus, but willingness to research and learn is even better. They should love what they do and be committed to pushing the boundaries of the platform further both visually and technically with each new work. This is for full-time, on-site roles; Gringo is based on São Paulo, Brazil.</p>
<p>The studio is focused on creating rich <em>advertainment</em> websites that differ from generic websites. They have won several prizes on their relatively short life of one year and a half, including several <a href="http://www.thefwa.com/?app=profiles&#038;id=5635">FWA site of the day awards</a> and a couple of recent bronze Cyber Lions on Cannes 2007. They have an awe-inspiring crew and work with some of the coolest clients from all over the world, so it&#8217;s a terrific place to work at. Apparently they also have a <a href="http://wii.com/">Nintendo Wii</a> in the studio, although I haven&#8217;t personally certified it yet. <a href="http://www.gringo.nu/">Visit their website</a> for more information about the company and the kind of work they do.</p>
<p>Interested candidates should send an email to <a href="mailto:quero@gringo.nu">quero@gringo.nu</a> with all information needed &#8211; including a bit about yourself, your experience, and links to previous work.</p>
]]></content:encoded>
			<wfw:commentRss>http://zehfernando.com/2007/gringo-is-hiring-flash-developers/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>id Software is looking for a user interface designer</title>
		<link>http://zehfernando.com/2007/id-software-is-looking-for-a-user-interface-designer/</link>
		<comments>http://zehfernando.com/2007/id-software-is-looking-for-a-user-interface-designer/#comments</comments>
		<pubDate>Wed, 06 Jun 2007 18:50:01 +0000</pubDate>
		<dc:creator>Zeh</dc:creator>
				<category><![CDATA[Job posts]]></category>
		<category><![CDATA[games]]></category>
		<category><![CDATA[interface]]></category>

		<guid isPermaLink="false">http://labs.zeh.com.br/blog/?p=110</guid>
		<description><![CDATA[The game and engine development studio id Software &#8211; creators of the first person shooter genre and classics such as Wolfenstein 3D, DOOM and Quake &#8211; are looking for an user interface designer, among other roles; more information here. Apparently this is for website development only, although they mention it&#8217;s work for &#8220;a small focused [...]]]></description>
			<content:encoded><![CDATA[<p>The game and engine development studio <a href="http://www.idsoftware.com/">id Software</a> &#8211; creators of the <a href="http://en.wikipedia.org/wiki/First-person_shooter">first person shooter</a> genre and classics such as Wolfenstein 3D, DOOM and Quake &#8211; are looking for an user interface designer, among other roles; more information <a href="http://www.idsoftware.com/business/jobs/index.php">here</a>. Apparently this is for website development only, although they mention it&#8217;s work for &#8220;a small focused team on an unannounced project&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://zehfernando.com/2007/id-software-is-looking-for-a-user-interface-designer/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>The search for the perfect bezier tweening syntax</title>
		<link>http://zehfernando.com/2007/the-search-for-the-perfect-bezier-tweening-solution/</link>
		<comments>http://zehfernando.com/2007/the-search-for-the-perfect-bezier-tweening-solution/#comments</comments>
		<pubDate>Sun, 29 Apr 2007 03:46:39 +0000</pubDate>
		<dc:creator>Zeh</dc:creator>
				<category><![CDATA[Flash]]></category>
		<category><![CDATA[Job posts]]></category>

		<guid isPermaLink="false">http://labs.zeh.com.br/blog/?p=104</guid>
		<description><![CDATA[Undoubtedly, the biggest challenge when implementing some feature on Tweener is deciding on the syntax to be used &#8211; that is, doing the syntax design itself. It can&#8217;t be too complex, or else it&#8217;ll be too convoluted to use, but it also can&#8217;t be too simple, or it won&#8217;t be able to do everything it [...]]]></description>
			<content:encoded><![CDATA[<p>Undoubtedly, the biggest challenge when implementing some feature on <a href="http://zehfernando.com/2007/introducing-caurinatransitionstweener/">Tweener</a> is deciding on the syntax to be used &#8211; that is, doing the <em>syntax design</em> itself. It can&#8217;t be too complex, or else it&#8217;ll be too convoluted to use, but it also can&#8217;t be too simple, or it won&#8217;t be able to do everything it could; it has to be flexible, but still be straightforward. The funny thing is that once the syntax is decided upon, the implementation follows easily; I&#8217;ve spent literally months deciding on how some features should work, then once the &#8220;Eureka!&#8221; moment arrives, it&#8217;s just a matter of a couple of hours until it&#8217;s implememented.</p>
<p>The most recent of such challenges was implementing <a href="http://en.wikipedia.org/wiki/B%C3%A9zier_curve">beziér curves</a> on tweenings. At a simplistic level, this feature allows for an object to slide on screen by following a curved path; at a more complex level, it allows any number of properties of a object to follow a complex &#8216;path&#8217; of values until it reaches its destination.</p>
<p><span id="more-107"></span>
<p>In the most basic sense, this could easily be achieved with, say, a special property. Using Tweener, it <em>could</em> work like this, for a sliding based on a quadratic bezier curve path:</p>
<pre>Tweener.addTween(myMC, {_x:10, _y:10, _controlX:20, _controlY:0, time:1, transition:"easeoutquad"});</pre>
<p>That is, the <code>_controlX</code> and <code>_controlY</code> properties actually define the location of the control point of the bezier curve, as one would expect when using, say, the <code>curveTo</code> method from the actionscript drawing API.
<p>At close analysis, however, this seemingly natural syntax poses two significant problems. For one, it uses special, separate properties for control points that are <em>hardcoded</em> into the engine &#8211; they should know in advance which properties should be modified: <code>_x</code> and <code>_y</code>, on this case. What would happen if, instead of tweening properties of a <code>MovieClip</code> instance, I was tweening properties of a custom <code>StageWindow</code> instance, with respective <code>cameraX</code> and <code>cameraY</code> properties? I&#8217;d need to create a new hardcoded special property just for my own custom classes.
<p>One alternative solution would be to make a guess on what should be tweened: for example, &#8220;the first two properties to be defined on the tweening parameter object will be respectively considered to be x and y&#8221;. That would work on the above case and in many other cases where bezier tweening was needed on two dimensions. It would create new syntax rules which are not exactly healthy, though &#8212; on Tweener, the parameters order itself doesn&#8217;t matter.</p>
<p>The second problem is that it&#8217;s limited to one control point. Paths based on bezier curves can, instead, use several different control points, allowing a more complex path to be taken. For that, the above solution would need separate arrays, or additional control point variables, and it could become quite clumsy.</p>
<p>Hence why a more flexible solution is needed. I spent a good deal of thought on this matter, and I honestly believe I&#8217;ve reached a good compromise. So the final syntax for bezier transitions on Tweener is as such, just as an example:
<pre>Tweener.addTween(myMC, {_x:10, _y:10, <b>_bezier:{_x:20, _y:20}</b>, time:1, transition:"easeoutquad"});</pre>
<p>That is, the tweening or sliding is done the same way it&#8217;s always done &#8211; by using <code>_x</code> and <code>_y</code> properties, or whatever&#8217;s the norm at that specific language version or Class &#8211; and a bezier point can be defined by the special property named <code>_bezier</code>, which contains one object with the properties that define its position.
<p>Here&#8217;s the first good point: by using the destination property names themselves when defining the control point, the bezier code already knows what to tween and how. You don&#8217;t need any other special parameter rule when writing the code &#8211; you could tackle an <code>_alpha</code> tweening there on the same object and it would still work &#8211; and, specially, you can use whichever property you need when doing a bezier tweening. So, for example, if you had my hypothetical <code>StageWindow</code> instance there, you can still tween it by using this syntax:
<pre>Tweener.addTween(myStageWindow, {cameraX:10, cameraY:10, _bezier:{cameraX:20, cameraY:20}, time:1, transition:"easeoutquad"});</pre>
<p>That is, you just need to define your points based on the properties you actually want to tween.</p>
<p>The second good point is that, because of the way the <code>_bezier</code> special property is used &#8211; it&#8217;s only one property &#8211; it&#8217;s easier to allow several different points to be used. This is done, obviously enough, by allowing this special property to use an array of objects as its parameter, instead of just an object. So to make an object do a path following two bezier curves (or a curve defined by two quadratic bezier curves), it would be like so:</p>
<pre>Tweener.addTween(myMC, {_x:10, _y:10, _bezier:[{_x:20, _y:20}, {_x:30, _y:30}], time:1, transition:"easeoutquad"});</pre>
<p>Obviously this can be split into several different lines, it&#8217;s the same thing.</p>
<pre>var myPath:Array = new Array();
myPath.push({_x:20, _y:20});
myPath.push({_x:30, _y:30});
Tweener.addTween(myMC, {_x:10, _y:10, _bezier:myPath, time:1, transition:"easeoutquad"});</pre>
<p>Anyhow, I probably write too many boring details though; it&#8217;s better to show it working. So check it out, the Tweener bezier example, appropriately named <em>Bezier Maker</em>:</p>
<p><script type="text/javascript" src="/f/swfobject.js"></script></p>
<div id="flashcontent_bezierMaker">{}</div>
<p><script type="text/javascript">
	var fo = new SWFObject("/f/bezierMaker.swf", "index", "500", "500", "8", "#ffffff", true);
	fo.setAttribute('xiRedirectUrl', 'http://zehfernando.com');
	fo.addParam("allowFullScreen", "true");
	fo.write("flashcontent_bezierMaker");
</script></p>
<p>Download the source <a href="http://tweener.googlecode.com/svn/trunk/examples/bezierMaker_as2_flash8.zip">here</a> (Flash 8, AS2) or <a href="http://tweener.googlecode.com/svn/trunk/examples/bezierMaker_as3_flash9cs3.zip">here</a> (Flash CS3, AS3).</p>
<p>To operate it, click and drag each point to change the path origin, destination, or bezier control points, and to better understand how it works. Clicking on &#8220;Add Bezier Point&#8221; adds a point next to the currently selected point; clicking on &#8220;Remove Point&#8221; removes the currently selected point. For demonstration purposes, the code one would use for such animation is generated at the bottom. The animation time is set to 1 second. Try adding more points and noticing how the path adapts to the control points, and how the ball travels through the path.</p>
<p>From this example, it&#8217;s also possible to notice one <em>quasi</em>-caveat of quadratic bezier curves: depending on how you setup your control points, or how your curves are laid out, it will change the speed of travel an object could have when sliding through the path. You can notice this happens by looking at the circles distributed among the curves, when you create a very acute curve: if the circles are too close to each other on a specific point of the path, that means a point of deceleration. Code wise, there are ways to avoid that kind of behavior and provide a normalized travel speed over the curved path; this will probably show up on Tweener as an optional bezier setting on the future. Right now, however, this kind of bezier-driven speed is the way it&#8217;s supposed to work by default.</p>
<p>And at last, but not least, the third and final good point of this bezier syntax is that by allowing a <em>loose</em> object to define the bezier control points, the code is freed from the obligation to do a bezier on two properties (or dimensions) and can instead apply a bezier to one, two, three, or more dimensions. So what this means is that the same code that can be used to slide a <code>MovieClip</code> on screen can be used to change its <code>_rotation</code> value only, or even change the <code>X</code>, <code>Y</code> and <code>Z</code> properties of a <code>Camera</code> object on a 3d projection. So considering the previous bezier tweening syntax, the syntax for such task would be simple enough:
<pre>Tweener.addTween(myCamera, {x:10, y:10, z:10, _bezier:{x:20, y:20, z:30}, time:1, transition:"easeoutquad"});</pre>
<p>This is almost accidental in design &#8211; the syntax wasn&#8217;t built with any specific class or rendering engine in mind &#8211; but shows how a flexible syntax approach can just happen to fit well into other classes that make use of numeric properties. Once again, this is better shown than explained, so check this out, another example using <a href="http://www.papervision3d.org/">Papervision3D</a>:
<p><script type="text/javascript" src="/f/swfobject.js"></script></p>
<div id="flashcontent_bezierMakerPV3D">{}</div>
<p><script type="text/javascript">
	var fo = new SWFObject("/f/bezierMaker_papervision3d_as3.swf", "index", "500", "600", "8", "#ffffff", true);
	fo.setAttribute('xiRedirectUrl', 'http://zehfernando.com');
	fo.addParam("allowFullScreen", "true");
	fo.addParam("base", "/f/");
	fo.write("flashcontent_bezierMakerPV3D");
</script></p>
<p>Download the source <a href="http://tweener.googlecode.com/svn/trunk/examples/bezierMaker_papervision3d_as3_flash9cs3.zip">here</a> (Flash CS3, AS3) or <a href="http://tweener.googlecode.com/svn/trunk/examples/bezierMaker_papervision3d_as3_flash9alpha.zip">here</a> (Flash 9 alpha preview, AS3). But again, it does not contain the Papervision3D source, as it&#8217;s not publicly released; more information on how to get the beta <a href="http://wiki.papervision3d.org/index.php?title=Download_from_SVN">here</a>.</p>
<p>This example operates similarly to the previous one; the difference is that it has to use three different properties for tweening, and as such, it has a few more viewports to allow setting each of the points on a 3d world. Also notice you can not only drag the points around on the bottom viewports, but also the cone objects themselves. It&#8217;s also a bit crude as it&#8217;s just a quick example, so you&#8217;ll notice you can drag elements outside of the viewports, and there are other small user interface issues.</p>
<p>On the question of cameras, however, one interesting point must be brought up. Moving the camera around the space is just one of the steps needed for this kind of animation; moving the camera <em>target</em> around is another story. On 3d views, this can usually be done by aligning the rotation of the camera according to the path traveled (on all axis) and thus achieving the desired effect. This requires some more math, though, so on the above example, a little trick is used: instead of trying to calculate the angles of the camera in real time in a way that makes it stay aligned to the path, what is done is that the camera target itself is also tweened, but <em>ahead</em> of the camera in time. This means that both the camera and the target are running on the same rail, but because the camera is delayed, the effect of alignment is achieved because the camera is always &#8220;looking&#8221; a little bit further its own path (this is also what causes the slight movement delay when the travel starts). Animating the target with a second, different path would allow better movement control, but I&#8217;ll let that open as a suggestion for people who download the code. Anyhow, to test the difference between the two types of camera target, click the &#8220;toggle target type&#8221; button on the above example; it toggles between a fixed target (on the center of the world) and a target that follows the path a little bit ahead in time. The generated code is also updated to match these options.</p>
<p>To be honest, I think that for real, professional, tight, super-controlled camera control on 3d extensions such as Papervision3D, another solution must be created; something based on curves copied straight out of a 3d editing package, maybe something that parses a collada spline to create all needed points and <em>then</em> tween the position of a camera; or maybe a maxscript (or similar) script that outputs a number of points from a spline in the form of points that allow interpolation. As a quick solution for many cases, however, this simple bezier tweening will do.</p>
<p>Is this the perfect tweening syntax? It&#8217;s difficult to say. There are other mathematical solutions to the path problem which could be based on cubic (or higher level) bezier curves instead of the default quadratic ones; different approaches should be taken if the travel speed is to be maintained the same on the entire path, as it is dependent of all properties being tweened on any given path (the default quadratic bezier, on the other hand, allows all properties to be calculated separately); and there are different usage patterns that surely make for different syntactical solutions, as are almost most features on these tweening engines and classes. For me, however, this is the perfect boat to sail through curved streams, and it might also fit other people&#8217;s needs, so there it is.</p>
<p><s>Lastly, please notice this bezier feature has been added on the latest Tweener version, 1.25.53, only available through the <a href="http://code.google.com/p/tweener/source">subversion repository</a>. This means the zipped &#8220;stable&#8221; download version is a bit older (1.24.51), and will be like that for a few days, until the new version has been tested enough.</s> This version is now stable and can be downloaded from the <a href="http://code.google.com/p/tweener/downloads/list">regular download page</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://zehfernando.com/2007/the-search-for-the-perfect-bezier-tweening-solution/feed/</wfw:commentRss>
		<slash:comments>58</slash:comments>
		</item>
	</channel>
</rss>

