<?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>Caffeine Induced Ramblings - Jasper Potts's Blog</title>
	<atom:link href="http://www.jasperpotts.com/blog/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jasperpotts.com/blog</link>
	<description>Jasper Potts's Blog on Java and Life</description>
	<lastBuildDate>Tue, 24 Nov 2009 17:58:32 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>New Synthetica BlackEye Look and Feel</title>
		<link>http://www.jasperpotts.com/blog/2009/11/new-synthetica-blackeye-look-and-feel/</link>
		<comments>http://www.jasperpotts.com/blog/2009/11/new-synthetica-blackeye-look-and-feel/#comments</comments>
		<pubDate>Tue, 24 Nov 2009 17:57:48 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/?p=221</guid>
		<description><![CDATA[Its always nice to see new Swing Look and Feels. Nice looking new theme for Synthetica. Link: Synthetica BlackEye Highlights

Synthetica is based on same Synth Look and Feel that Nimbus is. There are some very neat features which we are supporting in JavaFX like shaped windows and smart backgrounds. Its really nice to seem them available [...]]]></description>
			<content:encoded><![CDATA[<p>Its always nice to see new Swing Look and Feels. Nice looking new theme for Synthetica. Link: <a href="http://weblogs.java.net/blog/wzberger/archive/2009/11/22/synthetica-blackeye-highlights">Synthetica BlackEye Highlights</a></p>
<p><img class="aligncenter" title="Shaped Windows" src="http://www.javasoft.de/images/screenshots/syntheticaBlackEye/highlights/windowShape.png" alt="" width="310" height="158" /><img class="aligncenter" title="Smart Background" src="http://www.javasoft.de/images/screenshots/syntheticaBlackEye/highlights/smartBackground.png" alt="" width="190" height="246" /></p>
<p>Synthetica is based on same Synth Look and Feel that Nimbus is. There are some very neat features which we are supporting in JavaFX like shaped windows and smart backgrounds. Its really nice to seem them available to Swing developers.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2009/11/new-synthetica-blackeye-look-and-feel/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>New blog launched for JavaFX :: FX Experience</title>
		<link>http://www.jasperpotts.com/blog/2009/10/new-blog-launched-for-javafx-fx-experience/</link>
		<comments>http://www.jasperpotts.com/blog/2009/10/new-blog-launched-for-javafx-fx-experience/#comments</comments>
		<pubDate>Mon, 12 Oct 2009 11:16:01 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[JavaFX]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/?p=218</guid>
		<description><![CDATA[Back in the summer while Richard Bair and I were at JavaOne we decided that we should launch a new blog together for all our JavaFX related content.  We created fxexperience.com and have started posting lots of interesting blogs there on JavaFX so I hope you will all start following us there. Our aim is [...]]]></description>
			<content:encoded><![CDATA[<p>Back in the summer while <a href="http://www.java.net/blogs/rbair/">Richard Bair</a> and I were at JavaOne we decided that we should launch a new blog together for all our JavaFX related content.  We created <a href="http://fxexperience.com">fxexperience.com</a> and have started posting lots of interesting blogs there on JavaFX so I hope you will all start following us there. Our aim is to one day make it a invaluable resource for everything JavaFX.</p>
<p><a href="http://fxexperience.com/"><img class="aligncenter" src="http://jasperpotts.com/blog/wp-content/themes/jasper/fxexperiance-badge.png" alt="" width="164" height="164" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2009/10/new-blog-launched-for-javafx-fx-experience/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Exciting new Swing GUI builder &#8220;GUIDE&#8221;</title>
		<link>http://www.jasperpotts.com/blog/2009/09/exciting-new-swing-gui-builder-guide/</link>
		<comments>http://www.jasperpotts.com/blog/2009/09/exciting-new-swing-gui-builder-guide/#comments</comments>
		<pubDate>Mon, 21 Sep 2009 15:37:06 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/?p=216</guid>
		<description><![CDATA[A new Swing GUI builder tool is out in beta called GUIDE. Looking at the videos on the website it looks impressive. Like a more polished version of Netbeans Matisse with some extra goodies.

Mindsilver GUIDE
]]></description>
			<content:encoded><![CDATA[<p>A new Swing GUI builder tool is out in beta called GUIDE. Looking at the videos on the website it looks impressive. Like a more polished version of Netbeans Matisse with some extra goodies.</p>
<p><a href="http://www.mindsilver.com/"><img class="alignnone" title="Mindsilver GUIDE" src="http://www.mindsilver.com/guide/docs/articles/mvc/supervisingController-createView.png" alt="" width="520" height="340" /></a></p>
<h3><a href="http://www.mindsilver.com/">Mindsilver GUIDE</a></h3>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2009/09/exciting-new-swing-gui-builder-guide/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Time to close the polls</title>
		<link>http://www.jasperpotts.com/blog/2009/05/time-to-close-the-polls/</link>
		<comments>http://www.jasperpotts.com/blog/2009/05/time-to-close-the-polls/#comments</comments>
		<pubDate>Tue, 12 May 2009 14:39:00 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Nimbus]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/?p=212</guid>
		<description><![CDATA[It seemed like it was time to close the polls, I don&#8217;t think there is a clear answer across all platforms. On windows there is a clear winner for the native look and that makes sense as Windows LAF has had a huge amount of work put into it over that last 5 years plus. [...]]]></description>
			<content:encoded><![CDATA[<p>It seemed like it was time to close the polls, I don&#8217;t think there is a clear answer across all platforms. On windows there is a clear winner for the native look and that makes sense as Windows LAF has had a huge amount of work put into it over that last 5 years plus. If there was the resources to put a equal effort into the GTK LAF and a new KDE LAF then they would be clear winners to. Nimbus is a great cross platform look and feel and allows people to create good looking applications but maybe is not the simplest look and feel for people to start with as it takes a little effort to make a great looking application with it. Also it is not the best for compatibility with applications written to work with other look and feels so is a dangerous choice as a default. So I kind of feel that we could go native on Windows and people will be happy but there is no clear answer for GTK and KDE. I will pass the poll results on to the other people who have a say in the decision and see what the consensus is.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2009/05/time-to-close-the-polls/feed/</wfw:commentRss>
		<slash:comments>11</slash:comments>
		</item>
		<item>
		<title>Breakdown of what should be default LAF for Java 7</title>
		<link>http://www.jasperpotts.com/blog/2009/03/breakdown-of-what-should-be-default-laf-for-java-7/</link>
		<comments>http://www.jasperpotts.com/blog/2009/03/breakdown-of-what-should-be-default-laf-for-java-7/#comments</comments>
		<pubDate>Wed, 25 Mar 2009 11:06:38 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Nimbus]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/?p=208</guid>
		<description><![CDATA[After watching the voting and reading the comments I have noticed two things: First is from 30 votes to 800 votes the percentages have hardly changed which means we seem to be falling on a conclusion. Native LAF has varied from 59% to 63% so nothing major and is a clear winner.
The second point is [...]]]></description>
			<content:encoded><![CDATA[<p>After watching the voting and reading the comments I have noticed two things: First is from 30 votes to 800 votes the percentages have hardly changed which means we seem to be falling on a conclusion. Native LAF has varied from 59% to 63% so nothing major and is a clear winner.</p>
<p>The second point is there seems to be different answers for Windows and Unix and good arguments that maybe they should not be the same so let me start a new poll with them split and see if I am right. I will split the poll into 3 categories Windows, Unix GTK and Unix KDE. I am not quite sure how we detect between GTK and KDE but sure we can find a way <img src='http://www.jasperpotts.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.
Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.
Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.
<p>Again If you have a strong feeling one way or another then please explain in a comment below as we would love to hear. All your votes and comments will be taken into consideration when we make the final discussion.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2009/03/breakdown-of-what-should-be-default-laf-for-java-7/feed/</wfw:commentRss>
		<slash:comments>32</slash:comments>
		</item>
		<item>
		<title>Which Look and Feel should be default in Java 7</title>
		<link>http://www.jasperpotts.com/blog/2009/03/which-look-and-feel-should-be-default-in-java-7/</link>
		<comments>http://www.jasperpotts.com/blog/2009/03/which-look-and-feel-should-be-default-in-java-7/#comments</comments>
		<pubDate>Mon, 16 Mar 2009 14:35:02 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[Java]]></category>
		<category><![CDATA[Nimbus]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/?p=198</guid>
		<description><![CDATA[The other day I was discussing with colleagues if Nimbus should be the default LAF(Look and Feel) for Swing application. The current default LAF is Ocean which is a spiced up theme for Metal which has been the Swing default LAF since the beginning. It feels like with a large release like Java 7 it [...]]]></description>
			<content:encoded><![CDATA[<p>The other day I was discussing with colleagues if Nimbus should be the default LAF(Look and Feel) for Swing application. The current default LAF is Ocean which is a spiced up theme for Metal which has been the Swing default LAF since the beginning. It feels like with a large release like Java 7 it is about time we changed the default LAF to a more sensible choice which leaves two choices Nimbus which is the new cross platform LAF and the system native LAF which will be Windows LAF on Windows and GTK LAF on Unix. Apple has already gone with the system native choice and the default LAF for Java Swing applications on Mac is Apple&#8217;s Aqua native LAF. The only reason for remaining with Ocean LAF is to maintain backwards compatibility for old Java applications which were written with static pixel based layout so will be all messed up if the size of components changes. My feeling is that sector of users should be getting pretty small now and as long as we provide a easy work around like system property file that lets a user/administrator change the default LAF back to Ocean for those few special cases then we can move forward and select a modern LAF as the default. So then it comes down to what to choose <strong>Nimbus</strong> or <strong>Native</strong>(Windows/GTK) I am torn between the two. So we decided the best idea is to ask more people, so what do you think?</p>
Note: There is a poll embedded within this post, please visit the site to participate in this post's poll.
<p>If you have a strong feeling one way or another then please explain in a comment below as we would love to hear. All your votes and comments will be taken into consideration when we make the final discussion.</p>
<p><em><strong>Update</strong><br />
I have closed this poll and opened 3 new ones on the post <a href="http://www.jasperpotts.com/blog/2009/03/breakdown-of-what-should-be-default-laf-for-java-7/">Breakdown of what should be default LAF for Java 7</a>. So follow that link if you would like to vote.</em></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2009/03/which-look-and-feel-should-be-default-in-java-7/feed/</wfw:commentRss>
		<slash:comments>37</slash:comments>
		</item>
		<item>
		<title>JavaFX Keynote @ Devoxx 2008</title>
		<link>http://www.jasperpotts.com/blog/2009/02/javafx-keynote-devoxx-2008/</link>
		<comments>http://www.jasperpotts.com/blog/2009/02/javafx-keynote-devoxx-2008/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 14:46:20 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[JavaFX]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/?p=196</guid>
		<description><![CDATA[The video,slides and demos are now available for the JavaFX Keynote we gave at Devoxx 2008.



You can view the full size version HERE.
]]></description>
			<content:encoded><![CDATA[<p>The video,slides and demos are now available for the JavaFX Keynote we gave at Devoxx 2008.<br />
<span id="more-196"></span><br />
<object width="474" height="443"><param name="movie" value="http://www.parleys.com/download/attachments/5443/parleysshare.swf?pageId=25264132"/><param name="allowFullScreen" value="true"/><param name="pageId" value="25264132"/><embed src="http://www.parleys.com/download/attachments/5443/parleysshare.swf?pageId=25264132" type="application/x-shockwave-flash" allowfullscreen="true" width="474" height="443"/><br />
</object></p>
<p>You can view the full size version <a href="http://tinyurl.com/at6ufz">HERE</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2009/02/javafx-keynote-devoxx-2008/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Java Posse Interview about JavaFX</title>
		<link>http://www.jasperpotts.com/blog/2009/02/java-posse-interview-about-javafx/</link>
		<comments>http://www.jasperpotts.com/blog/2009/02/java-posse-interview-about-javafx/#comments</comments>
		<pubDate>Mon, 16 Feb 2009 14:41:33 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[JavaFX]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/?p=192</guid>
		<description><![CDATA[During Devoxx 2008 Richard, Josh, Martin had a interview with the Java Posse. The recording of it is now available online:


 
You can view the full size version HERE. 
]]></description>
			<content:encoded><![CDATA[<p>During Devoxx 2008 Richard, Josh, Martin had a interview with the Java Posse. The recording of it is now available online:<br />
<span id="more-192"></span><br />
<object width="474" height="443"><param name="movie" value="http://www.parleys.com/download/attachments/5443/parleysshare.swf?pageId=24903698"/><param name="allowFullScreen" value="true"/><param name="pageId" value="24903698"/><embed src="http://www.parleys.com/download/attachments/5443/parleysshare.swf?pageId=24903698" type="application/x-shockwave-flash" allowfullscreen="true" width="474" height="443"/><br />
</object> </p>
<p>You can view the full size version <a href="http://tinyurl.com/bb5mt6">HERE</a>. </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2009/02/java-posse-interview-about-javafx/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Devoxx 2008: JavaFX 1.0 SDK Talk</title>
		<link>http://www.jasperpotts.com/blog/2009/01/devoxx-2008-javafx-10-sdk-talk/</link>
		<comments>http://www.jasperpotts.com/blog/2009/01/devoxx-2008-javafx-10-sdk-talk/#comments</comments>
		<pubDate>Mon, 26 Jan 2009 14:22:27 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[Devoxx]]></category>
		<category><![CDATA[Devoxx 2008]]></category>
		<category><![CDATA[Java]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/?p=182</guid>
		<description><![CDATA[Parleys.com has posted the first of our JavaFX talks from Devoxx 2008. You can watch it here or as a bigger version on Parleys.com. This talk is the 1 hour version covering the JavaFX Language, Scene Graph and Animation presented by Richard Bair and Martin Brehovsky, I bailed on helping present this one as I [...]]]></description>
			<content:encoded><![CDATA[<p>Parleys.com has posted the first of our JavaFX talks from Devoxx 2008. You can watch it here or as a bigger version on <a href="http://www.parleys.com/display/PARLEYS/Home#talk=23986177;slide=1;title=The%20JavaFX%20SDK">Parleys.com</a>. This talk is the 1 hour version covering the JavaFX Language, Scene Graph and Animation presented by Richard Bair and Martin Brehovsky, I bailed on helping present this one as I had been up most of the night working on <a href="http://www.jasperpotts.com/blog/2009/01/devoxx-themed-swish-demo/">&#8220;Devoxx Themed Swish Demo&#8221;</a>. Its well worth watching and should take you from knowing nothing about JavaFX to being able to build a cool little application. Even if you are already using JavaFX you may learn some handy new snippets. This is the one hour version of the talk that I gave the slides and demo for in <a href="http://www.jasperpotts.com/blog/2009/01/introduction-to-javafx-talks-devoxx-2008-ijtc-2009/">Introduction to JavaFX Talks &#8211; Devoxx 2008 &#8211; IJTC 2009</a>.</p>
<p>
<span id="more-182"></span><br />
<object width="474" height="443"><param name="movie" value="http://www.parleys.com/download/attachments/5443/parleysshare.swf?pageId=23986177"/><param name="allowFullScreen" value="true"/><param name="pageId" value="23986177"/><embed src="http://www.parleys.com/download/attachments/5443/parleysshare.swf?pageId=23986177" type="application/x-shockwave-flash" allowfullscreen="true" width="474" height="443"/><br />
</object></p>
<p>I know its Flash sorry, they are working on a JavaFX version so hope to be able to have that here soon <img src='http://www.jasperpotts.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2009/01/devoxx-2008-javafx-10-sdk-talk/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Devoxx/Parleys.com Intro Video in JavaFX</title>
		<link>http://www.jasperpotts.com/blog/2009/01/devoxxparleyscom-intro-video/</link>
		<comments>http://www.jasperpotts.com/blog/2009/01/devoxxparleyscom-intro-video/#comments</comments>
		<pubDate>Tue, 20 Jan 2009 16:18:44 +0000</pubDate>
		<dc:creator>Jasper Potts</dc:creator>
				<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[JavaFXApplications]]></category>
		<category><![CDATA[Devoxx]]></category>
		<category><![CDATA[Devoxx 2008]]></category>
		<category><![CDATA[Java]]></category>
		<category><![CDATA[Parleys.com]]></category>

		<guid isPermaLink="false">http://www.jasperpotts.com/blog/?p=158</guid>
		<description><![CDATA[Following on from the success of the JavaFX Devoxx animations Stephan Janssen asked if I could do a similar video to replace last years intro video that is played before the start of each of the recorded sessions. I decided this was another chance to see how JavaFX copes with animation. This time I needed a 10-15second clip [...]]]></description>
			<content:encoded><![CDATA[<p>Following on from the success of the <a href="http://www.jasperpotts.com/blog/2009/01/devoxx-themed-swish-demo/">JavaFX Devoxx animations</a> Stephan Janssen asked if I could do a similar video to replace last years intro video that is played before the start of each of the recorded sessions. I decided this was another chance to see how JavaFX copes with animation. This time I needed a 10-15second clip of PAL video 768&#215;576 25fps. In this blog I will explain how I created this animation and take you though recreating it step by step. I started out creating the graphics in Photoshop based on the ones I had from the Devoxx theme for Swish with all the parts that I am going to need to animate as separate layers. All the layers I want to access from JavaFX are named with the &#8220;jfx:&#8221; prefix and simple camel case names so they will be exposed to JavaFX code and come though as neat variable names.</p>
<div id="attachment_159" class="wp-caption alignnone" style="width: 528px"><img class="size-full wp-image-159" title="complete" src="http://www.jasperpotts.com/blog/wp-content/uploads/2009/01/complete.png" alt="Complete Graphics" width="518" height="393" /><p class="wp-caption-text">Complete Graphics</p></div>
<p><span id="more-158"></span>You can download the final graphics photoshop file <a href="http://jasperpotts.com/blogfiles/devox-intro-video/final-graphics.psd">here</a>, once you have this you will need Photoshop CS3 or CS4 and the JavaFX Production Suite (<a href="http://javafx.com/downloads/">download here</a>). If you don&#8217;t have Photoshop you can download a trial version to experiment with or use any design tool that will export SVG and the Production Suite convertor. Alternatively you could just save each layer as a PNG and hand code a scene graph with ImageViews for each layer. Once you have production suite installed in Photoshop you can go to &#8220;File&#8221; -&gt; &#8220;Automate&#8221; -&gt; &#8216;Save for JavaFX&#8230;&#8221; then save the graphics as &#8220;graphics.fxz&#8221; in the package directory in the source directory of a new Netbeans JavaFX project. You can then right click on the saved &#8220;fxz&#8221; file in Netbeans and choose &#8220;Generate UI Stub&#8230;&#8221; that will create a JavaFX &#8220;.fx&#8221; source file that is a scene graph Node class that you can use in your application. It will have variables for direct access to each of the layers you named in Photoshop with the &#8220;jfx:&#8221; prefix. Before you can compile the project with the newly generated stub you need to go to project properties and add the &#8220;JavaFX FXD 1.0&#8243; library to the project. Now all the code you need in Main to create a JavaFX application to display our graphics is this:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;">var graphics<span style="color: #339933;">:</span>graphicsUI<span style="color: #339933;">;</span>
&nbsp;
Stage <span style="color: #009900;">&#123;</span>
    title<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;Devoxx Video Intro&quot;</span>
    scene<span style="color: #339933;">:</span> Scene <span style="color: #009900;">&#123;</span>
        <span style="color: #666666; font-style: italic;">// PAL Video Sized</span>
        width<span style="color: #339933;">:</span> <span style="color: #cc66cc;">768</span> height<span style="color: #339933;">:</span> <span style="color: #cc66cc;">576</span>
        content<span style="color: #339933;">:</span> graphics <span style="color: #339933;">=</span> graphicsUI<span style="color: #009900;">&#123;</span><span style="color: #009900;">&#125;</span>
        fill<span style="color: #339933;">:</span> <span style="color: #003399;">Color</span>.<span style="color: #006633;">BLACK</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>So run that and check it out, cool hey! So now its time to start animating it, lets start with the background. The background is made up of 3 layers so we can animate them.</p>
<p> </p>
<div id="attachment_161" class="wp-caption alignnone" style="width: 328px"><img class="size-full wp-image-161" title="background" src="http://www.jasperpotts.com/blog/wp-content/uploads/2009/01/background.png" alt="Moody orange base background" width="318" height="243" /><p class="wp-caption-text">Moody orange base background</p></div>
<div id="attachment_162" class="wp-caption alignnone" style="width: 328px"><img class="size-full wp-image-162" title="clouds" src="http://www.jasperpotts.com/blog/wp-content/uploads/2009/01/clouds.png" alt="Clouds layer" width="318" height="243" /><p class="wp-caption-text">Clouds layer</p></div>
<div id="attachment_165" class="wp-caption alignnone" style="width: 328px"><img class="size-full wp-image-165" title="bar" src="http://www.jasperpotts.com/blog/wp-content/uploads/2009/01/bar.png" alt="Bar - grey is transparent" width="318" height="243" /><p class="wp-caption-text">Bar - grey is transparent</p></div>
<p>The clouds layer is semi transparent and we are going to animate it slowly scrolling past to add mood it sits above the moody orange background and under the black bar. The graphics for it were created to match at the ends so it can be looped without you seeing the join. I created it by using the render clouds effect in photoshop, the result I duplicated and flipped about the middle so that both ends were the same and then hand blended the join. That way I knew it would repeat without a seam. In JavaFX I am going to make a second ImageView with the clouds as I need enough to scroll completely past the visible region then jump back and start again. Here is the code for this:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// Make copy of clouds image view so we have enough to scroll past</span>
var cloudsGroup<span style="color: #339933;">:</span><span style="color: #003399;">Group</span> <span style="color: #339933;">=</span> graphics.<span style="color: #006633;">clouds_group</span> as <span style="color: #003399;">Group</span><span style="color: #339933;">;</span>
var clouds1<span style="color: #339933;">:</span>ImageView <span style="color: #339933;">=</span> graphics.<span style="color: #006633;">clouds</span> as ImageView<span style="color: #339933;">;</span>
clouds1.<span style="color: #006633;">x</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">;</span>
var clouds2<span style="color: #339933;">:</span>ImageView <span style="color: #339933;">=</span> ImageView <span style="color: #009900;">&#123;</span>
    image<span style="color: #339933;">:</span> clouds1.<span style="color: #006633;">image</span>
    translateX<span style="color: #339933;">:</span> bind clouds1.<span style="color: #006633;">image</span>.<span style="color: #006633;">width</span>
<span style="color: #009900;">&#125;</span>
insert clouds2 into cloudsGroup.<span style="color: #006633;">content</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #666666; font-style: italic;">// == Animate clouds ===========================================================</span>
TranslateTransition <span style="color: #009900;">&#123;</span>
    node<span style="color: #339933;">:</span> cloudsGroup
    fromX<span style="color: #339933;">:</span> <span style="color: #cc66cc;">0</span>
    toX<span style="color: #339933;">:</span> <span style="color: #339933;">-</span>clouds1.<span style="color: #006633;">image</span>.<span style="color: #006633;">width</span>
    duration<span style="color: #339933;">:</span> 10s
    autoReverse<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">false</span>
    repeatCount<span style="color: #339933;">:</span> Timeline.<span style="color: #006633;">INDEFINITE</span>
    interpolate<span style="color: #339933;">:</span> Interpolator.<span style="color: #006633;">LINEAR</span>
<span style="color: #009900;">&#125;</span>.<span style="color: #006633;">play</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Once I have created and positioned the second could imageview I create a TranslateTransition to animate the clouds scrolling past and start it playing. Next is the 3 spotlights:</p>
<p> </p>
<div id="attachment_166" class="wp-caption alignnone" style="width: 328px"><img class="size-full wp-image-166" title="lights" src="http://www.jasperpotts.com/blog/wp-content/uploads/2009/01/lights.png" alt="Lights - 3 separate transparent layers" width="318" height="243" /><p class="wp-caption-text">Lights - 3 separate transparent layers</p></div>
<p>The spotlights will animate rotating around the center of their top. To rotate around a point other than the center of a node we will have to use a Transform and Timeline as the RotateTransition only works around the center of the node.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// == Animate lights ===========================================================</span>
var light1<span style="color: #339933;">:</span>ImageView <span style="color: #339933;">=</span> graphics.<span style="color: #006633;">light1</span> as ImageView<span style="color: #339933;">;</span>
var light2<span style="color: #339933;">:</span>ImageView <span style="color: #339933;">=</span> graphics.<span style="color: #006633;">light2</span> as ImageView<span style="color: #339933;">;</span>
var light3<span style="color: #339933;">:</span>ImageView <span style="color: #339933;">=</span> graphics.<span style="color: #006633;">light3</span> as ImageView<span style="color: #339933;">;</span>
var light1angle <span style="color: #339933;">=</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">20</span><span style="color: #339933;">;</span>
var light2angle <span style="color: #339933;">=</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">20</span><span style="color: #339933;">;</span>
var light3angle <span style="color: #339933;">=</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">20</span><span style="color: #339933;">;</span>
light1.<span style="color: #006633;">transforms</span> <span style="color: #339933;">=</span> Rotate <span style="color: #009900;">&#123;</span> pivotX<span style="color: #339933;">:</span> light1.<span style="color: #006633;">x</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>light1.<span style="color: #006633;">layoutBounds</span>.<span style="color: #006633;">width</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> angle<span style="color: #339933;">:</span> bind light1angle <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
light2.<span style="color: #006633;">transforms</span> <span style="color: #339933;">=</span> Rotate <span style="color: #009900;">&#123;</span> pivotX<span style="color: #339933;">:</span> light2.<span style="color: #006633;">x</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>light2.<span style="color: #006633;">layoutBounds</span>.<span style="color: #006633;">width</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> angle<span style="color: #339933;">:</span> bind light2angle <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
light3.<span style="color: #006633;">transforms</span> <span style="color: #339933;">=</span> Rotate <span style="color: #009900;">&#123;</span> pivotX<span style="color: #339933;">:</span> light3.<span style="color: #006633;">x</span> <span style="color: #339933;">+</span> <span style="color: #009900;">&#40;</span>light3.<span style="color: #006633;">layoutBounds</span>.<span style="color: #006633;">width</span> <span style="color: #339933;">/</span> <span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span> angle<span style="color: #339933;">:</span> bind light3angle <span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
var light1Timeline<span style="color: #339933;">:</span>Timeline <span style="color: #339933;">=</span> Timeline <span style="color: #009900;">&#123;</span>
    keyFrames<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
         at <span style="color: #009900;">&#40;</span>0s<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>light1angle <span style="color: #339933;">=&gt;</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">20</span> tween Interpolator.<span style="color: #006633;">EASEBOTH</span><span style="color: #009900;">&#125;</span>
         at <span style="color: #009900;">&#40;</span>3s<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>light1angle <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">20</span> tween Interpolator.<span style="color: #006633;">EASEBOTH</span><span style="color: #009900;">&#125;</span>
     <span style="color: #009900;">&#93;</span>
    repeatCount<span style="color: #339933;">:</span> Timeline.<span style="color: #006633;">INDEFINITE</span>
    autoReverse<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">true</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
var light2Timeline<span style="color: #339933;">:</span>Timeline <span style="color: #339933;">=</span> Timeline <span style="color: #009900;">&#123;</span>
    keyFrames<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
         at <span style="color: #009900;">&#40;</span>0s<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>light2angle <span style="color: #339933;">=&gt;</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">20</span> tween Interpolator.<span style="color: #006633;">EASEBOTH</span><span style="color: #009900;">&#125;</span>
         at <span style="color: #009900;">&#40;</span>3.5s<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>light2angle <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">20</span> tween Interpolator.<span style="color: #006633;">EASEBOTH</span><span style="color: #009900;">&#125;</span>
     <span style="color: #009900;">&#93;</span>
    repeatCount<span style="color: #339933;">:</span> Timeline.<span style="color: #006633;">INDEFINITE</span>
    autoReverse<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">true</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
var light3Timeline<span style="color: #339933;">:</span>Timeline <span style="color: #339933;">=</span> Timeline <span style="color: #009900;">&#123;</span>
    keyFrames<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
         at <span style="color: #009900;">&#40;</span>0s<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>light3angle <span style="color: #339933;">=&gt;</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">25</span> tween Interpolator.<span style="color: #006633;">EASEBOTH</span><span style="color: #009900;">&#125;</span>
         at <span style="color: #009900;">&#40;</span>2.5s<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>light3angle <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">20</span> tween Interpolator.<span style="color: #006633;">EASEBOTH</span><span style="color: #009900;">&#125;</span>
     <span style="color: #009900;">&#93;</span>
    repeatCount<span style="color: #339933;">:</span> Timeline.<span style="color: #006633;">INDEFINITE</span>
    autoReverse<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">true</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The first part of the code create 3 variables &#8220;light1angle&#8221;,&#8221;light2angle&#8221; and &#8221;light3angle&#8221; then setup Rotate Tranforms on the 3 light nodes whose angle is bound to these variables. We then create 3 timelines to animate the panning of the spotlights. Note: I have not started the animations here as I will do that in the final master timeline but you can add quick &#8220;light1Timeline.play();&#8221; style lines to test it out so far.  Next is the speaker chap(dude for americans):</p>
<p> </p>
<div id="attachment_168" class="wp-caption alignnone" style="width: 328px"><img class="size-full wp-image-168" title="speaker" src="http://www.jasperpotts.com/blog/wp-content/uploads/2009/01/speaker.png" alt="Speak Chap - 2 layers head and body" width="318" height="243" /><p class="wp-caption-text">Speak Chap - 2 layers head and body</p></div>
<p>The first animation for the speaker chap is to rotate his head back and forward. This is simple as in photoshop I manipulated the center point of the layer by adding a pixel at the right point to get the center where I needed it. Because of that we can just use a simple RotateTransition:</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// == Chap Head Rotation ================================================================</span>
var headRotation<span style="color: #339933;">:</span>RotateTransition <span style="color: #339933;">=</span> RotateTransition <span style="color: #009900;">&#123;</span>
    fromAngle<span style="color: #339933;">:</span> <span style="color: #339933;">-</span><span style="color: #cc66cc;">5</span>
    toAngle<span style="color: #339933;">:</span> <span style="color: #cc66cc;">5</span>
    autoReverse<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">true</span>
    duration<span style="color: #339933;">:</span> 1s
    interpolate<span style="color: #339933;">:</span> Interpolator.<span style="color: #006633;">EASEBOTH</span>
    repeatCount<span style="color: #339933;">:</span> Timeline.<span style="color: #006633;">INDEFINITE</span>
    node<span style="color: #339933;">:</span> graphics.<span style="color: #006633;">head</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Again I have not started this transition as it will be started at the right point in the master timeline. Next I will setup a clip on the group containing the chap&#8217;s head and body and link it to a variable that controls the beam position. This is so I can BEAM him in <img src='http://www.jasperpotts.com/blog/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  for a bit of fun.</p>
<p> </p>
<div id="attachment_169" class="wp-caption alignnone" style="width: 328px"><img class="size-full wp-image-169" title="beam" src="http://www.jasperpotts.com/blog/wp-content/uploads/2009/01/beam.png" alt="Beam layer" width="318" height="243" /><p class="wp-caption-text">Beam layer</p></div>
<p>The &#8220;scanLocation&#8221; variable can be from 0.0 fully invisible to 1.0 fully visible. We will animate this later to beam the chap in.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// == Chap scan ================================================================</span>
var chap<span style="color: #339933;">:</span><span style="color: #003399;">Group</span> <span style="color: #339933;">=</span> graphics.<span style="color: #006633;">chap</span> as <span style="color: #003399;">Group</span><span style="color: #339933;">;</span>
var chapX<span style="color: #339933;">:</span><span style="color: #003399;">Number</span> <span style="color: #339933;">=</span> chap.<span style="color: #006633;">layoutBounds</span>.<span style="color: #006633;">minX</span><span style="color: #339933;">;</span>
var chapY<span style="color: #339933;">:</span><span style="color: #003399;">Number</span> <span style="color: #339933;">=</span> chap.<span style="color: #006633;">layoutBounds</span>.<span style="color: #006633;">minY</span><span style="color: #339933;">;</span>
var chapWidth<span style="color: #339933;">:</span><span style="color: #003399;">Number</span> <span style="color: #339933;">=</span> chap.<span style="color: #006633;">layoutBounds</span>.<span style="color: #006633;">width</span><span style="color: #339933;">;</span>
var chapHeight<span style="color: #339933;">:</span><span style="color: #003399;">Number</span> <span style="color: #339933;">=</span> chap.<span style="color: #006633;">layoutBounds</span>.<span style="color: #006633;">height</span><span style="color: #339933;">;</span>
var beam<span style="color: #339933;">:</span>ImageView <span style="color: #339933;">=</span> graphics.<span style="color: #006633;">beam</span> as ImageView<span style="color: #339933;">;</span>
var scanLocation<span style="color: #339933;">:</span><span style="color: #003399;">Number</span> <span style="color: #339933;">=</span> <span style="color: #cc66cc;">0.7</span> on replace <span style="color: #009900;">&#123;</span>
    beam.<span style="color: #006633;">y</span> <span style="color: #339933;">=</span> chapY<span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span>chapHeight<span style="color: #339933;">*</span>scanLocation<span style="color: #009900;">&#41;</span> <span style="color: #339933;">-</span> <span style="color: #009900;">&#40;</span>beam.<span style="color: #006633;">layoutBounds</span>.<span style="color: #006633;">height</span><span style="color: #339933;">/</span><span style="color: #cc66cc;">2</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
chap.<span style="color: #006633;">clip</span> <span style="color: #339933;">=</span> <span style="color: #003399;">Rectangle</span> <span style="color: #009900;">&#123;</span>
    x<span style="color: #339933;">:</span> chapX
    translateY<span style="color: #339933;">:</span> bind chapY<span style="color: #339933;">-</span>chapHeight<span style="color: #339933;">+</span><span style="color: #009900;">&#40;</span>chapHeight<span style="color: #339933;">*</span>scanLocation<span style="color: #009900;">&#41;</span>
    width<span style="color: #339933;">:</span> chapWidth
    height<span style="color: #339933;">:</span> chapHeight
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span></pre></div></div>

<p>Next is the title text, this is made in 3 layers:</p>
<p> </p>
<div id="attachment_170" class="wp-caption alignnone" style="width: 328px"><img class="size-full wp-image-170" title="text" src="http://www.jasperpotts.com/blog/wp-content/uploads/2009/01/text.png" alt="Base text including small glow" width="318" height="243" /><p class="wp-caption-text">Base text including small glow</p></div>
<div id="attachment_171" class="wp-caption alignnone" style="width: 328px"><img class="size-full wp-image-171" title="text-glow" src="http://www.jasperpotts.com/blog/wp-content/uploads/2009/01/text-glow.png" alt="Larger glow for text" width="318" height="243" /><p class="wp-caption-text">Larger glow for text</p></div>
<div id="attachment_172" class="wp-caption alignnone" style="width: 328px"><img class="size-full wp-image-172" title="glow-mask" src="http://www.jasperpotts.com/blog/wp-content/uploads/2009/01/glow-mask.png" alt="Mask for large glow" width="318" height="243" /><p class="wp-caption-text">Mask for large glow</p></div>
<p>We will animate the glow mask across the text exposing a small part of the larger glow as we go, this will give the effect of a glow sweeping across the text. In the code for this I setup the mask image as a clip on the text glow layer and calculate the start and end positions for the animation.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// == Glow Mask ================================================================</span>
var glow<span style="color: #339933;">:</span>ImageView <span style="color: #339933;">=</span> graphics.<span style="color: #006633;">glow</span> as ImageView<span style="color: #339933;">;</span>
var glowMaskGraphics<span style="color: #339933;">:</span>ImageView <span style="color: #339933;">=</span> graphics.<span style="color: #006633;">glowMask</span> as ImageView<span style="color: #339933;">;</span>
glowMaskGraphics.<span style="color: #006633;">visible</span> <span style="color: #339933;">=</span> <span style="color: #000066; font-weight: bold;">false</span><span style="color: #339933;">;</span>
var glowX<span style="color: #339933;">:</span><span style="color: #003399;">Number</span> <span style="color: #339933;">=</span> glow.<span style="color: #006633;">layoutBounds</span>.<span style="color: #006633;">minX</span><span style="color: #339933;">;</span>
var glowWidth<span style="color: #339933;">:</span><span style="color: #003399;">Number</span> <span style="color: #339933;">=</span> glow.<span style="color: #006633;">layoutBounds</span>.<span style="color: #006633;">width</span><span style="color: #339933;">;</span>
var glowMaskWidth<span style="color: #339933;">:</span><span style="color: #003399;">Number</span> <span style="color: #339933;">=</span> glowMaskGraphics.<span style="color: #006633;">layoutBounds</span>.<span style="color: #006633;">width</span><span style="color: #339933;">;</span>
var glowMaskStart<span style="color: #339933;">:</span><span style="color: #003399;">Number</span> <span style="color: #339933;">=</span> glowX <span style="color: #339933;">-</span> glowMaskWidth<span style="color: #339933;">;</span>
var glowMaskEnd<span style="color: #339933;">:</span><span style="color: #003399;">Number</span> <span style="color: #339933;">=</span> glowX <span style="color: #339933;">+</span> glowWidth <span style="color: #339933;">+</span> glowMaskWidth<span style="color: #339933;">;</span>
var glowMaskPosition<span style="color: #339933;">:</span><span style="color: #003399;">Number</span> <span style="color: #339933;">=</span> glowMaskStart<span style="color: #339933;">;</span>
var glowMask<span style="color: #339933;">:</span>ImageView <span style="color: #339933;">=</span> ImageView <span style="color: #009900;">&#123;</span>
    image<span style="color: #339933;">:</span> glowMaskGraphics.<span style="color: #006633;">image</span>
    x<span style="color: #339933;">:</span> bind glowMaskPosition
    y<span style="color: #339933;">:</span> glowMaskGraphics.<span style="color: #006633;">y</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
glow.<span style="color: #006633;">clip</span> <span style="color: #339933;">=</span> glowMask<span style="color: #339933;">;</span></pre></div></div>

<p>We have a music recording from Devoxx of the beatboxer Roxorloops that we are going to use for the sound track for this intro so next we need to setup the media ready to be played.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// == Setup Music ==============================================================</span>
&nbsp;
var music<span style="color: #339933;">:</span>MediaPlayer <span style="color: #339933;">=</span> MediaPlayer <span style="color: #009900;">&#123;</span>
    media<span style="color: #339933;">:</span> Media <span style="color: #009900;">&#123;</span> source<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;http://jasperpotts.com/blogfiles/devox-intro-video/IntroBeat.mp3&quot;</span> <span style="color: #009900;">&#125;</span>
    autoPlay<span style="color: #339933;">:</span> <span style="color: #000066; font-weight: bold;">true</span>
<span style="color: #009900;">&#125;</span>
music.<span style="color: #006633;">stop</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>That is all the setup done for the little animations, now we need to get started on the master timeline which is going to control the sequence of all the animations. First create a bunch of constants for all the times of the key points in the animation. This is handy as I can play with the timing to get it feeling right and in sync with the sound without having to dig too deeply into the code.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// == Main Animation Times =====================================================</span>
def FRAME<span style="color: #339933;">:</span>Duration <span style="color: #339933;">=</span> 1s<span style="color: #339933;">/</span><span style="color: #cc66cc;">60</span><span style="color: #339933;">;</span>
&nbsp;
def START<span style="color: #339933;">:</span>Duration <span style="color: #339933;">=</span> 5s<span style="color: #339933;">;</span>
def FIRST_LIGHT<span style="color: #339933;">:</span>Duration <span style="color: #339933;">=</span> START <span style="color: #339933;">+</span> 0.2s<span style="color: #339933;">;</span>
def SECOND_LIGHT<span style="color: #339933;">:</span>Duration <span style="color: #339933;">=</span> FIRST_LIGHT <span style="color: #339933;">+</span> 3s<span style="color: #339933;">;</span>
def THIRD_LIGHT<span style="color: #339933;">:</span>Duration <span style="color: #339933;">=</span> SECOND_LIGHT <span style="color: #339933;">+</span> 1s<span style="color: #339933;">;</span>
def START_SHOW_CHAP<span style="color: #339933;">:</span>Duration <span style="color: #339933;">=</span> THIRD_LIGHT <span style="color: #339933;">+</span> 1s<span style="color: #339933;">;</span>
def END_SHOW_CHAP<span style="color: #339933;">:</span>Duration <span style="color: #339933;">=</span> START_SHOW_CHAP <span style="color: #339933;">+</span> 1s<span style="color: #339933;">;</span>
def START_SHOW_TEXT<span style="color: #339933;">:</span>Duration <span style="color: #339933;">=</span> END_SHOW_CHAP <span style="color: #339933;">+</span> 1s<span style="color: #339933;">;</span>
def END_SHOW_TEXT<span style="color: #339933;">:</span>Duration <span style="color: #339933;">=</span> START_SHOW_TEXT <span style="color: #339933;">+</span> 1s<span style="color: #339933;">;</span>
def START_GLOW_SCAN<span style="color: #339933;">:</span>Duration <span style="color: #339933;">=</span> END_SHOW_TEXT <span style="color: #339933;">+</span> 0.5s<span style="color: #339933;">;</span>
def END_GLOW_SCAN<span style="color: #339933;">:</span>Duration <span style="color: #339933;">=</span> START_GLOW_SCAN <span style="color: #339933;">+</span> 5s<span style="color: #339933;">;</span>
def START_HIDE<span style="color: #339933;">:</span>Duration <span style="color: #339933;">=</span> END_GLOW_SCAN <span style="color: #339933;">+</span> 0.5s<span style="color: #339933;">;</span>
def END_HIDE<span style="color: #339933;">:</span>Duration <span style="color: #339933;">=</span> START_HIDE <span style="color: #339933;">+</span> 1.5s<span style="color: #339933;">;</span></pre></div></div>

<p>Then the final part is the main timeline that fades layers in and out and starts the smaller animations at the right points. This is the last of the code and you have the completed application.</p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #666666; font-style: italic;">// == Main Animation ===========================================================</span>
Timeline <span style="color: #009900;">&#123;</span>
    keyFrames<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
        KeyFrame <span style="color: #009900;">&#123;</span>
            time<span style="color: #339933;">:</span> 0s
            values<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                beam.<span style="color: #006633;">visible</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000066; font-weight: bold;">false</span>
                graphics.<span style="color: #006633;">bar</span>.<span style="color: #006633;">visible</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000066; font-weight: bold;">false</span>
                graphics.<span style="color: #006633;">chap</span>.<span style="color: #006633;">visible</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000066; font-weight: bold;">false</span>
                graphics.<span style="color: #006633;">background</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span>
                graphics.<span style="color: #006633;">flames</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span>
                graphics.<span style="color: #006633;">light1</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span>
                graphics.<span style="color: #006633;">light2</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span>
                graphics.<span style="color: #006633;">light3</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span>
                graphics.<span style="color: #006633;">text</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span>
            <span style="color: #009900;">&#93;</span>
            action<span style="color: #339933;">:</span> function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> light1Timeline.<span style="color: #006633;">play</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// start second light a little later as we don't want them in sync</span>
            time<span style="color: #339933;">:</span> 1s
            action<span style="color: #339933;">:</span> function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> light2Timeline.<span style="color: #006633;">play</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// start music</span>
            time<span style="color: #339933;">:</span> START <span style="color: #339933;">-</span> 0.1s
            action<span style="color: #339933;">:</span> function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
                music.<span style="color: #006633;">currentTime</span> <span style="color: #339933;">=</span> 0s<span style="color: #339933;">;</span>
                music.<span style="color: #006633;">play</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
            <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span> <span style="color: #666666; font-style: italic;">// start after couple seconds in as a chance to stablize after launch</span>
            time<span style="color: #339933;">:</span> START
            values<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                graphics.<span style="color: #006633;">background</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span>
                graphics.<span style="color: #006633;">flames</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span>
                graphics.<span style="color: #006633;">light1</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span>
                graphics.<span style="color: #006633;">light2</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span>
                graphics.<span style="color: #006633;">light3</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0</span>
                graphics.<span style="color: #006633;">bar</span>.<span style="color: #006633;">visible</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000066; font-weight: bold;">true</span>
            <span style="color: #009900;">&#93;</span>
            action<span style="color: #339933;">:</span> function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> light3Timeline.<span style="color: #006633;">play</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span>
            time<span style="color: #339933;">:</span> FIRST_LIGHT
            values<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                graphics.<span style="color: #006633;">light3</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0.6</span> tween Interpolator.<span style="color: #006633;">LINEAR</span>
&nbsp;
                graphics.<span style="color: #006633;">background</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0.1</span> tween Interpolator.<span style="color: #006633;">EASEIN</span>
                graphics.<span style="color: #006633;">flames</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0.1</span> tween Interpolator.<span style="color: #006633;">EASEIN</span>
            <span style="color: #009900;">&#93;</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span>
            time<span style="color: #339933;">:</span> SECOND_LIGHT <span style="color: #339933;">-</span> 0.2s
            values<span style="color: #339933;">:</span> graphics.<span style="color: #006633;">light1</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0.0</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span>
            time<span style="color: #339933;">:</span> SECOND_LIGHT
            values<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                graphics.<span style="color: #006633;">light1</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0.6</span> tween Interpolator.<span style="color: #006633;">LINEAR</span>
&nbsp;
                graphics.<span style="color: #006633;">background</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0.6</span> tween Interpolator.<span style="color: #006633;">EASEIN</span>
                graphics.<span style="color: #006633;">flames</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0.6</span> tween Interpolator.<span style="color: #006633;">EASEIN</span>
            <span style="color: #009900;">&#93;</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span>
            time<span style="color: #339933;">:</span> THIRD_LIGHT <span style="color: #339933;">-</span> 0.2s
            values<span style="color: #339933;">:</span> graphics.<span style="color: #006633;">light2</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0.0</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span>
            time<span style="color: #339933;">:</span> THIRD_LIGHT
            values<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                graphics.<span style="color: #006633;">light2</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0.6</span> tween Interpolator.<span style="color: #006633;">LINEAR</span>
&nbsp;
                graphics.<span style="color: #006633;">background</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1.0</span> tween Interpolator.<span style="color: #006633;">EASEIN</span>
                graphics.<span style="color: #006633;">flames</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1.0</span> tween Interpolator.<span style="color: #006633;">EASEIN</span>
            <span style="color: #009900;">&#93;</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span>
            time<span style="color: #339933;">:</span> START_SHOW_CHAP <span style="color: #339933;">-</span> 0.2s
            values<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                beam.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0.0</span>
                beam.<span style="color: #006633;">visible</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000066; font-weight: bold;">true</span>
            <span style="color: #009900;">&#93;</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span>
            time<span style="color: #339933;">:</span> START_SHOW_CHAP
            values<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                graphics.<span style="color: #006633;">chap</span>.<span style="color: #006633;">visible</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000066; font-weight: bold;">true</span>
                beam.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1.0</span> tween Interpolator.<span style="color: #006633;">EASEIN</span>
                scanLocation <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0.0</span>
            <span style="color: #009900;">&#93;</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span>
            time<span style="color: #339933;">:</span> END_SHOW_CHAP
            values<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                beam.<span style="color: #006633;">visible</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000066; font-weight: bold;">false</span>
                scanLocation <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1.0</span> tween Interpolator.<span style="color: #006633;">EASEIN</span>
            <span style="color: #009900;">&#93;</span>
            action<span style="color: #339933;">:</span> function<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> headRotation.<span style="color: #006633;">play</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span>
            time<span style="color: #339933;">:</span> START_SHOW_TEXT
            values<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                graphics.<span style="color: #006633;">text</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0.0</span>
            <span style="color: #009900;">&#93;</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span>
            time<span style="color: #339933;">:</span> END_SHOW_TEXT
            values<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                graphics.<span style="color: #006633;">text</span>.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1.0</span>
                graphics.<span style="color: #006633;">glow</span>.<span style="color: #006633;">visible</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000066; font-weight: bold;">true</span>
            <span style="color: #009900;">&#93;</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span>
            time<span style="color: #339933;">:</span> START_GLOW_SCAN
            values<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                glowMaskPosition <span style="color: #339933;">=&gt;</span> glowMaskStart
            <span style="color: #009900;">&#93;</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span>
            time<span style="color: #339933;">:</span> END_GLOW_SCAN
            values<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                glowMaskPosition <span style="color: #339933;">=&gt;</span> glowMaskEnd tween Interpolator.<span style="color: #006633;">EASEBOTH</span>
            <span style="color: #009900;">&#93;</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span>
            time<span style="color: #339933;">:</span> START_HIDE
            values<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                graphics.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">1.0</span> tween Interpolator.<span style="color: #006633;">EASEOUT</span>
            <span style="color: #009900;">&#93;</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span>
            time<span style="color: #339933;">:</span> END_HIDE
            values<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>
                graphics.<span style="color: #006633;">opacity</span> <span style="color: #339933;">=&gt;</span> <span style="color: #cc66cc;">0.0</span> tween Interpolator.<span style="color: #006633;">EASEOUT</span>
            <span style="color: #009900;">&#93;</span>
        <span style="color: #009900;">&#125;</span>
        KeyFrame <span style="color: #009900;">&#123;</span>
            time<span style="color: #339933;">:</span> END_HIDE <span style="color: #339933;">+</span> 3s
            action<span style="color: #339933;">:</span> function <span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span> FX.<span style="color: #006633;">exit</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span> <span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>
    <span style="color: #009900;">&#93;</span>
<span style="color: #009900;">&#125;</span>.<span style="color: #006633;">play</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>So we are finally there, if you have been following along then you can run what you have for the rest of you here is a web start link: </p>
<p><a href="http://jasperpotts.com/blogfiles/devox-intro-video/Devoxx_Video_Intro.jnlp" onclick="javascript:urchinTracker ('/blogfiles/devox-intro-video/Devoxx_Video_Intro.jnlp');" title="Launch Intro Video App" target="_blank"><img src="/blogfiles/launch.jpg" align="absmiddle" border="0" /></a></p>
<p> You can also download the Netbeans project complete with FXZ graphics file: <a onclick="javascript:urchinTracker ('/blogfiles/devox-intro-video/project.zip');" href="http://jasperpotts.com/blogfiles/devox-intro-video/project.zip">Netbeans Project</a>. The first session with the new intro video is already live on <a href="http://Parleys.com">Parleys.com</a> watch it here <a href="http://parleys.com/display/PARLEYS/Home#talk=23691268;slide=1;title=Inside%20the%20SpringSource%20Application%20Platform">&#8220;Inside the SpringSorce Application Platform&#8221;</a>. Well I hope you enjoyed my longest blog so far and a cool little application.</p>
<p><i><b>Update:</b> Some people have been having problems with a media bug playing the sound, I am passing it on to the Media Team in the mean time here is a webstart link without music:</i></p>
<p><a href="http://jasperpotts.com/blogfiles/devox-intro-video/Devoxx_Video_Intro_NoMusic.jnlp" onclick="javascript:urchinTracker ('/blogfiles/devox-intro-video/Devoxx_Video_Intro_NoMusic.jnlp');" title="Launch Intro Video App" target="_blank"><img src="/blogfiles/launch.jpg" align="absmiddle" border="0" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.jasperpotts.com/blog/2009/01/devoxxparleyscom-intro-video/feed/</wfw:commentRss>
		<slash:comments>13</slash:comments>
<enclosure url="http://jasperpotts.com/blogfiles/devox-intro-video/IntroBeat.mp3" length="256586" type="audio/mpeg" />
		</item>
	</channel>
</rss>
