<?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>Silveira Neto &#187; mountains</title>
	<atom:link href="http://silveiraneto.net/tag/mountains/feed/" rel="self" type="application/rss+xml" />
	<link>http://silveiraneto.net</link>
	<description></description>
	<lastBuildDate>Fri, 09 Mar 2012 04:13:27 +0000</lastBuildDate>
	<language>pt-br</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>JavaFX: Side-scrolling</title>
		<link>http://silveiraneto.net/2008/02/20/javafx-side-scrolling/</link>
		<comments>http://silveiraneto.net/2008/02/20/javafx-side-scrolling/#comments</comments>
		<pubDate>Wed, 20 Feb 2008 03:26:28 +0000</pubDate>
		<dc:creator>Silveira</dc:creator>
				<category><![CDATA[english]]></category>
		<category><![CDATA[en]]></category>
		<category><![CDATA[game]]></category>
		<category><![CDATA[game development]]></category>
		<category><![CDATA[JavaFX]]></category>
		<category><![CDATA[jfx]]></category>
		<category><![CDATA[jfxbest]]></category>
		<category><![CDATA[mountains]]></category>
		<category><![CDATA[programming]]></category>
		<category><![CDATA[RIA]]></category>
		<category><![CDATA[ship]]></category>
		<category><![CDATA[side scrolling]]></category>

		<guid isPermaLink="false">http://silveiraneto.net/2008/02/20/javafx-side-scrolling/</guid>
		<description><![CDATA[<a href="http://silveiraneto.net/2008/02/20/javafx-side-scrolling/" title="JavaFX: Side-scrolling"></a>An side-scrolling game attempt. I used two images, this mountain background made with Gimp (xcf sources here) and that ship above made with Inkscape (svg sources here). import javafx.ui.*; import javafx.ui.canvas.*; &#160; var scroll; scroll = &#91;1..800&#93; dur 60000 linear &#8230;<p class="read-more"><a href="http://silveiraneto.net/2008/02/20/javafx-side-scrolling/">Read more &#187;</a></p>]]></description>
			<content:encoded><![CDATA[<a href="http://silveiraneto.net/2008/02/20/javafx-side-scrolling/" title="JavaFX: Side-scrolling"></a><p>An side-scrolling game attempt.</p>
<p><img src="http://silveiraneto.net/downloads/jfx_plane.png" alt="an plane" /></p>
<p>I used two images, <a href="http://silveiraneto.net/downloads/mountains.png">this mountain background</a> made with Gimp (<a href="http://silveiraneto.net/downloads/mountains.xcf">xcf sources here</a>) and that ship above made with Inkscape (<a href="http://silveiraneto.net/downloads/jfx_plane.svg">svg sources here</a>).</p>
<p><center><object width="425" height="355"><param name="movie" value="http://www.youtube.com/v/5F4STuluSiM&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999"></param><param name="wmode" value="transparent"></param><embed src="http://www.youtube.com/v/5F4STuluSiM&amp;rel=0&amp;color1=0x3a3a3a&amp;color2=0x999999" type="application/x-shockwave-flash" wmode="transparent" width="425" height="355"></object></center></p>

<div class="wp_syntax"><div class="code"><pre class="java" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.ui.*</span><span style="color: #339933;">;</span>
<span style="color: #000000; font-weight: bold;">import</span> <span style="color: #006699;">javafx.ui.canvas.*</span><span style="color: #339933;">;</span>
&nbsp;
var scroll<span style="color: #339933;">;</span>
scroll <span style="color: #339933;">=</span> <span style="color: #009900;">&#91;</span><span style="color: #cc66cc;">1</span>..<span style="color: #cc66cc;">800</span><span style="color: #009900;">&#93;</span> dur <span style="color: #cc66cc;">60000</span> linear <span style="color: #000000; font-weight: bold;">continue</span> <span style="color: #000000; font-weight: bold;">if</span> <span style="color: #000066; font-weight: bold;">true</span><span style="color: #339933;">;</span>
&nbsp;
var mountains <span style="color: #339933;">=</span> <span style="color: #003399;">Clip</span><span style="color: #009900;">&#123;</span>
    transform<span style="color: #339933;">:</span> bind translate<span style="color: #009900;">&#40;</span><span style="color: #339933;">-</span>scroll,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
    shape<span style="color: #339933;">:</span> Rect <span style="color: #009900;">&#123;</span>x<span style="color: #339933;">:</span>bind scroll, y<span style="color: #339933;">:</span><span style="color: #cc66cc;">0</span>, width<span style="color: #339933;">:</span><span style="color: #cc66cc;">400</span>, height<span style="color: #339933;">:</span><span style="color: #cc66cc;">200</span><span style="color: #009900;">&#125;</span>
    content<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>ImageView <span style="color: #009900;">&#123;</span>
            transform<span style="color: #339933;">:</span> translate<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
            image<span style="color: #339933;">:</span> <span style="color: #003399;">Image</span> <span style="color: #009900;">&#123;</span> url<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;http://silveiraneto.net/downloads/mountains.png&quot;</span><span style="color: #009900;">&#125;</span>
        <span style="color: #009900;">&#125;</span>,
        ImageView <span style="color: #009900;">&#123;</span>
            transform<span style="color: #339933;">:</span> translate<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">800</span>,<span style="color: #cc66cc;">0</span><span style="color: #009900;">&#41;</span>
            image<span style="color: #339933;">:</span> <span style="color: #003399;">Image</span> <span style="color: #009900;">&#123;</span> url<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;http://silveiraneto.net/downloads/mountains.png&quot;</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: #339933;">;</span>
&nbsp;
var h <span style="color: #339933;">=</span> <span style="color: #cc66cc;">50</span><span style="color: #339933;">;</span>
&nbsp;
var ship <span style="color: #339933;">=</span> ImageView <span style="color: #009900;">&#123;</span>
    cursor<span style="color: #339933;">:</span> HAND
    transform<span style="color: #339933;">:</span> bind translate<span style="color: #009900;">&#40;</span><span style="color: #cc66cc;">0</span>,h<span style="color: #009900;">&#41;</span>
    image<span style="color: #339933;">:</span> <span style="color: #003399;">Image</span> <span style="color: #009900;">&#123;</span> url<span style="color: #339933;">:</span> <span style="color: #0000ff;">&quot;http://silveiraneto.net/downloads/jfx_plane.png&quot;</span><span style="color: #009900;">&#125;</span>
    onMouseDragged<span style="color: #339933;">:</span> operation<span style="color: #009900;">&#40;</span>e<span style="color: #009900;">&#41;</span> <span style="color: #009900;">&#123;</span>
        h <span style="color: #339933;">+=</span> e.<span style="color: #006633;">localDragTranslation</span>.<span style="color: #006633;">y</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span><span style="color: #339933;">;</span>
&nbsp;
<span style="color: #003399;">Canvas</span> <span style="color: #009900;">&#123;</span>
    content<span style="color: #339933;">:</span> <span style="color: #009900;">&#91;</span>mountains, ship<span style="color: #009900;">&#93;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://silveiraneto.net/2008/02/20/javafx-side-scrolling/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
	</channel>
</rss>

