<?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>MotoCMS &#187; Flash Software</title>
	<atom:link href="http://www.motocms.com/blog/category/flash-software/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.motocms.com</link>
	<description>Flash Content Management System</description>
	<lastBuildDate>Wed, 25 Jan 2012 15:09:43 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>Creating Flash Website with Moto CMS Standalone — Part 2. A Simple Website</title>
		<link>http://www.motocms.com/blog/project-news/creating-flash-website-with-moto-cms-standalone-part-2/</link>
		<comments>http://www.motocms.com/blog/project-news/creating-flash-website-with-moto-cms-standalone-part-2/#comments</comments>
		<pubDate>Tue, 22 Mar 2011 10:29:26 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Flash Software]]></category>
		<category><![CDATA[Project news]]></category>
		<category><![CDATA[flash cms]]></category>
		<category><![CDATA[Moto CMS Free Trial]]></category>

		<guid isPermaLink="false">http://www.motocms.com/?p=5047</guid>
		<description><![CDATA[<a href="http://www.motocms.com/blog/project-news/creating-flash-website-with-moto-cms-standalone-part-2/"><img src="http://www.motocms.com/wp-content/uploads/2011/03/postImages2-150x150.jpg" title="" alt="" /></a>
Here is the Part 2 of our series on how to create a Flash website with Moto CMS Standalone. And in this second article we are going to pass through the process of a very simple Moto CMS website creation from the beginning to the end. We'll create a preloader, set a background for our website, create a title, modify the existing menu and also add a new simple bottom menu to the Home Page. ]]></description>
			<content:encoded><![CDATA[<p>Here is the <strong>Part 2</strong> of our series on <strong>how to create a Flash website with Moto CMS Standalone</strong>. In the <a title="Creating Flash Website with Moto CMS Standalone - Part 1" href="http://www.motocms.com/blog/project-news/creating-flash-website-with-moto-cms-standalone-part-1/" target="_blank"><strong>Part 1</strong></a> we have presented you the <a title="Flash CMS" href="http://www.motocms.com" target="_blank">Flash CMS</a> overall, its main components; we also described the Moto CMS installation process to the local or remote server.  And in this second article we are going to pass through the process of a very simple Moto CMS website creation from the beginning to the end. We&#8217;ll create a preloader, set a background for our website, create a title, modify the existing menu and also add a new simple bottom menu to the Home Page.</p>
<p>As a basis for our Flash CMS website we are going to use one of five templates (five blank patterns for website development that differ by structure) uncluded into the Moto CMS pack. Let&#8217;s take the 1st template for our website.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/template_empty.jpg"><img class="size-full wp-image-5156 aligncenter" src="http://www.motocms.com/wp-content/uploads/2011/03/template_empty.jpg" alt="" width="590" height="358" /></a></p>
<p>So, after we have installed Moto CMS to the server, edited config.xml (the website width, height), edited Style CSS (specified the background color), it&#8217;s time to create a preloader for our simple Flash website&#8230;</p>
<p><em><strong>Creating a Preloader </strong></em><br />
<strong><br />
1.</strong> Now we need to open moto.flp file in Adobe Flash CS3 (templates/template_01/moto.flp). There are two files in the Project panel: moto.fla and website.fla. We need to set moto.fla as default file and then click on the &#8220;Test Project&#8221; button to compile these two files.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/moto_flp.jpg"><img class="aligncenter size-full wp-image-5048" src="http://www.motocms.com/wp-content/uploads/2011/03/moto_flp.jpg" alt="" width="208" height="207" /></a></p>
<p style="text-align: center;">
<p style="text-align: left;"><strong>2.</strong> Since we have taken one of the templates included in the package, the moto.fla file already contains a Movie Clip of the preloader. It&#8217;s placed on the appPreloader layer.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/new_symbol.jpg"><br />
</a><a href="http://www.motocms.com/wp-content/uploads/2011/03/movieclip.jpg"><img class="aligncenter size-full wp-image-5453" src="http://www.motocms.com/wp-content/uploads/2011/03/movieclip.jpg" alt="" width="590" height="130" /></a></p>
<p style="text-align: left;"><strong> </strong><br />
So, we just open the Movie Clip and create animation on 100 frames of timeline. We should also add the &#8220;stop();&#8221; code to the last (100th) frame of the &#8220;a&#8221; layer.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/stop1.jpg"><img class="aligncenter size-full wp-image-5454" src="http://www.motocms.com/wp-content/uploads/2011/03/stop1.jpg" alt="" width="590" height="426" /></a></p>
<p style="text-align: left;"><strong>3. </strong>Then we will specify the website dimensions (minimal width and height) in the moto.fla file properties (<strong>Modify — Document</strong>):</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/document_properties.jpg"><img class="aligncenter size-full wp-image-5052" src="http://www.motocms.com/wp-content/uploads/2011/03/document_properties.jpg" alt="" width="362" height="337" /></a></p>
<p style="text-align: left;"><strong>4.</strong> As the last step, we will create animation of the preloader disappearance.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/show.jpg"><img class="aligncenter size-full wp-image-5053" src="http://www.motocms.com/wp-content/uploads/2011/03/show.jpg" alt="" width="412" height="93" /></a></p>
<p style="text-align: left;">We should launch the website on the last frame and activate &#8220;showWebsite ( )&#8221;.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/show_website.jpg"><img class="aligncenter size-full wp-image-5054" src="http://www.motocms.com/wp-content/uploads/2011/03/show_website.jpg" alt="" width="590" height="396" /></a></p>
<p style="text-align: left;">Now we should update the preloader (we need to open the website.fla file for that).</p>
<p style="text-align: left;">
<p style="text-align: left;">
<p style="text-align: left;"><em><strong>Setting Website Background</strong></em></p>
<p>Let&#8217;s set a background for our website. For that we&#8217;ll open <strong>Media Library</strong> within the control panel and upload the image we wish to use for the website background by clicking on the &#8220;Add Media&#8221; button. Together with the background image, we will also upload other images that we are going to use when designing our website.</p>
<p style="text-align: left;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/media_library2.jpg"><img class="aligncenter size-full wp-image-5169" src="http://www.motocms.com/wp-content/uploads/2011/03/media_library3.jpg" alt="" width="590" height="186" /><br />
</a><br />
Now let&#8217;s come back to the control panel in order to insert the background image for the website. For that we need to click on the &#8220;Add New Image&#8221; button and select the image from the Media Library. Then we click on stage to insert the image and then center it.</p>
<p>In the &#8220;Placement&#8221; section of the horizontal tools panel we&#8217;ve selected &#8220;On The Entire Website&#8221;.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/background_image1.jpg"><img class="aligncenter size-full wp-image-5170" src="http://www.motocms.com/wp-content/uploads/2011/03/backgr.jpg" alt="" width="590" height="358" /></a></p>
<p style="text-align: center;">
<p style="text-align: left;"><em><strong>Creating Title</strong></em></p>
<p><strong>1.</strong> For our new website we are going to use a font we&#8217;ve selected beforehand for our design. In order to add it to the control panel, we go to <strong>Preferences — Fonts Manager</strong>.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/fonts_manager.jpg"><img class="aligncenter size-full wp-image-5171" src="http://www.motocms.com/wp-content/uploads/2011/03/fonts_manager2.jpg" alt="" width="462" height="271" /><br />
</a></p>
<p style="text-align: left;">With the help of <strong>Moto CMS Fonts Manager </strong>we can manage the website fonts in .swf format.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/fonts_manager_11.jpg"><img class="aligncenter size-full wp-image-5163" src="http://www.motocms.com/wp-content/uploads/2011/03/fonts_manager_11.jpg" alt="" width="561" height="393" /></a></p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/fonts_manager_1.jpg"></a></p>
<p style="text-align: left;"><strong>2.</strong> Our font hasn&#8217;t been converted to .swf format yet, so we are clicking on the &#8220;Create Font&#8221; button to open <strong>Online Font Creator</strong>. We are clicking on the &#8220;Add Font&#8221; button to select and add the font in .ttf format. Click on the &#8220;Create Font&#8221;  &#8211; the font compilation process will start.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/katy_berry.jpg"><img class="aligncenter size-full wp-image-5059" src="http://www.motocms.com/wp-content/uploads/2011/03/katy_berry.jpg" alt="" width="590" height="196" /></a></p>
<p style="text-align: left;"><strong>3.</strong> After the font has been compiled to .swf, we need to upload it to the control panel. Let&#8217;s go back to the Fonts Manager and add the converted .swf file to the control panel:</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/add_font.jpg"><img class="aligncenter size-full wp-image-5060" src="http://www.motocms.com/wp-content/uploads/2011/03/add_font.jpg" alt="" width="560" height="390" /></a></p>
<p style="text-align: left;">
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/add_klavika.jpg"></a><a href="http://www.motocms.com/wp-content/uploads/2011/03/klavika.jpg"><img class="aligncenter size-full wp-image-5164" src="http://www.motocms.com/wp-content/uploads/2011/03/klavika.jpg" alt="" width="561" height="390" /></a></p>
<p style="text-align: left;"><strong>4.</strong> It&#8217;s time to create a title<strong> </strong>for our Flash website: we are going to use the Text Tool for that. So, we have selected the newly added font &#8220;Klavika&#8221;, font size 36, 16, Normal Mode.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/title1.jpg"><img class="aligncenter size-full wp-image-5172" src="http://www.motocms.com/wp-content/uploads/2011/03/title1.jpg" alt="" width="590" height="459" /></a></p>
<p style="text-align: center;">
<p style="text-align: left;">We have already touched the subject of the Fonts Embedding in our articles. For more detailed info please read <a title="Embedding Fonts into Moto CMS Website: Examples, Pitfalls and Best Practices" href="http://www.motocms.com/blog/project-news/embedding-fonts-into-moto-cms-website-examples-pitfalls-and-best-practices/" target="_blank">Embedding Fonts into Moto CMS Website: Examples, Pitfalls and Best Practices</a>.</p>
<p style="text-align: left;">
<p style="text-align: left;"><em><strong>Adding an Image to the Home Page</strong></em></p>
<p>Let&#8217;s add an image to the home page. For that we need to click on the &#8220;Add New  Image&#8221; button and select the image from the Media Library. Then we click  on stage to insert the image and then center it.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/1.jpg"><img class="aligncenter size-full wp-image-5179" src="http://www.motocms.com/wp-content/uploads/2011/03/1.jpg" alt="" width="590" height="358" /></a></p>
<p style="text-align: left;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/backgr_image.jpg"><br />
</a><em><strong>Creating (Modifying) the Menu</strong></em><br />
<strong><br />
1.</strong> There is a special menu widget within Moto CMS, but for our simple website we will create a simple menu (for example, the bottom one) in a very easy way — by means of the Shape Tool (we add a rectangle) and Text  Tool (add menu buttons and place them on the rectangle). Due to the Links Editor that can be found in the Text Object menu, each text object of our simple menu may be linked to the necessary website page.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/simple_menu.jpg"><img class="aligncenter size-full wp-image-5167" src="http://www.motocms.com/wp-content/uploads/2011/03/simple_menu.jpg" alt="" width="590" height="178" /></a></p>
<p style="text-align: left;"><strong>2.</strong> It is also possible to create a vertical menu within the control panel as well as submenu for it. You will find a detailed <a title="Create Menu with Moto CMS Tutorial" href="http://www.motocms.com/forum/content/185-vertical-menu " target="_blank"><strong>Tutorial</strong></a> on how to create a <a title="Create Vertical Menu with Moto CMS" href="http://www.motocms.com/forum/content/181-vertical-menu" target="_blank"><strong>Vertical Menu</strong></a> and a <a title="Create Submenu with Moto CMS" href="http://www.motocms.com/forum/content/238-submenu " target="_blank"><strong>Submenu</strong></a> to it on our <strong>Forum</strong>.</p>
<p style="text-align: left;"><strong>3.</strong> Now we&#8217;ll save all the changes and preview the modified simple website:</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/preview_website.jpg"></a><a href="http://www.motocms.com/wp-content/uploads/2011/03/site_ready.jpg"><img class="aligncenter size-full wp-image-5180" src="http://www.motocms.com/wp-content/uploads/2011/03/site_ready.jpg" alt="" width="590" height="474" /></a></p>
<p style="text-align: center;">
<p style="text-align: left;">That&#8217;s it — our simple Flash CMS based website is ready. In our next posts we will make our simple website more advanced: we are going to create content holders, edit the image preloader, create animated elements for the website, and much more. Also, we will create the &#8220;About Page&#8221; for our website.</p>
<p style="text-align: left;"><strong>You have a great opportunity to evaluate the Moto CMS Standalone before the purchase by registering a </strong><strong>30 Day Free <a title="Moto CMS Trial" href="http://www.motocms.com/pricing/" target="_blank">Trial</a> and try to create a simple <a title="Flash Website" href="http://www.motocms.com/why/" target="_blank">Flash website</a> by yourself! </strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.motocms.com/blog/project-news/creating-flash-website-with-moto-cms-standalone-part-2/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Creating Flash Website with Moto CMS Standalone  — Part 1</title>
		<link>http://www.motocms.com/blog/project-news/creating-flash-website-with-moto-cms-standalone-part-1/</link>
		<comments>http://www.motocms.com/blog/project-news/creating-flash-website-with-moto-cms-standalone-part-1/#comments</comments>
		<pubDate>Thu, 10 Mar 2011 05:00:45 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Flash Software]]></category>
		<category><![CDATA[Project news]]></category>
		<category><![CDATA[flash cms]]></category>
		<category><![CDATA[Moto CMS Standalone]]></category>

		<guid isPermaLink="false">http://www.motocms.com/?p=4997</guid>
		<description><![CDATA[<a href="http://www.motocms.com/blog/project-news/creating-flash-website-with-moto-cms-standalone-part-1/"><img src="http://www.motocms.com/wp-content/uploads/2011/03/postImages1-150x150.jpg" title="" alt="" /></a>
Moto CMS standalone version has been created for making Flash developers' lives easier and turn the process of a Flash website creation into a pleasant, exciting and easily accomplished task. The standalone version contains the set of components, utilities as well as several design samples that can be used in Flash CMS website development. ]]></description>
			<content:encoded><![CDATA[<p>With this post we are starting the series of articles that is going to cover all the steps and aspects of a Flash website creation with Moto CMS (standalone version). And today we would like to present you the CMS overall, its main components and utilities as well as give you a short description on how to install Moto CMS to the local or remote server.</p>
<p><strong>Moto CMS standalone version</strong> has been created for making Flash developers&#8217; lives easier and turn the process of a Flash website creation into a pleasant, exciting and easily accomplished task.</p>
<p style="te|t-align: center;"><a title="Moto CMS Free Trial" href="http://www.motocms.com/pricing/" target="_blank"><img class="aligncenter size-full wp-image-5029" title="Moto CMS Free Trial" src="http://www.motocms.com/wp-content/uploads/2011/03/admin.jpg" alt="" width="590" height="358" /></a></p>
<p><a title="Moto CMS Sample" href="http://www.motocms.com/examples/activetutssample/#/home/" target="_blank"><br />
</a>The standalone version mainly aimed at experienced developers. It contains the set of components, utilities as well as several design samples that can be used in Flash CMS website development. There is no need to install additional software — all you need for the website development is already included into Moto Flash CMS.</p>
<p><strong>In order to start a Moto CMS based website creation process, a developer will only need:</strong></p>
<ul>
<li>Adobe Flash CS3 (or higher);</li>
<li>Moto CMS (standalone version or free Trial);</li>
<li>Website design in .PSD format (Adobe Photoshop is required).</li>
</ul>
<p style="text-align: left;">MotoCMS grants an opportunity to try the standalone version <strong>free of charge during 30 days</strong>. The <a title="Moto CMS Trial" href="http://www.motocms.com/pricing/" target="_blank">Trial Version</a> has no limits and completely corresponds to the original product. So, you are not limited within the control panel, can freely create a complete CMS based Flash website, and then edit and manage it with no limits.</p>
<p style="text-align: left;">
<p><strong>You will get the following set of components within the standalone version: </strong></p>
<p style="text-align: left;"><strong><strong><img class="aligncenter size-full wp-image-5026" src="http://www.motocms.com/wp-content/uploads/2011/03/folders5.jpg" alt="" width="581" height="188" /></strong></strong></p>
<p style="text-align: left;"><strong><strong> </strong><em>Components</em></strong> — the folder with the MXP component that runs on the basis of Adobe Extension Manager;</p>
<p style="text-align: left;"><strong><em>ControlPanel</em></strong> — a folder with all the control panel files;<br />
<strong><em><br />
Docs</em></strong> — the folder with the API documents;<br />
<strong><em><br />
Examples</em></strong> — the folder with complete Flash websites based on Moto CMS with all standard modules, widgets and tools embedded.</p>
<p style="text-align: left;"><a href="http://www.motocms.com/wp-content/uploads/2011/03/admin_view.jpg"><img class="aligncenter size-full wp-image-5036" src="http://www.motocms.com/wp-content/uploads/2011/03/admin_view.jpg" alt="" width="590" height="419" /></a></p>
<p><strong><em>Templates</em></strong> — the folder that contains five web templates that can be used as a basis for your Flash website:</p>
<ul>
<li>Moto Template 01 &#8211; one layout with transitions between pages;</li>
<li>Moto Template 02 &#8211; two layouts without returning to the first one, with transitions between pages of the second layout;</li>
<li>Moto Template 03 &#8211; two layouts with returning to the first one, with transitions, between pages of the second layout;</li>
<li>Moto Template 04 &#8211; two layouts with returning to the first one, with transitions between pages of the first and second layouts;</li>
<li>Moto Template 05 &#8211; three layouts without returning to the first one, without transitions between  pages of the second, with returning from the third to the second and with transitions.</li>
</ul>
<p><strong><em>Readme.txt</em></strong> — the text document that describes the components that are in the box, the installation requirements and the process itself as well as the Help &amp; Support links.</p>
<p style="text-align: left;">
<p style="text-align: left;">The Moto CMS package includes the set of advanced components that make the website development easy and comfortable. The system opens the widest opportunities for developers; they can create manageable Flash websites or components for them. Moreover, with Moto CMS it is possible to maintain already created Flash website.</p>
<p>In order to start working with Moto CMS, you need to download the files by registering the <a title="Moto CMS Trial" target="_blank">Trial</a> or purchasing Moto CMS standalone, and launch on localhost the website template from the samples you have downloaded with other Moto CMS files, or you can use your own website design in .PSD format.</p>
<p><strong>To install Moto CMS (a standalone version) either to the local or remote server or you should take the next steps:</strong></p>
<p><strong>1.</strong> Copy the «admin» folder together with the control panel to the server. Copy any website sample (for example, examples\websiteExample_04) into the same folder overwriting the existing files. Then go to http://yourwebsite.com/admin/ to access to your control panel (if you get the access for the first time, you will be asked to activate it).</p>
<p><strong>2.</strong> Please, activate your product on http://accounts.cms-guide.com/ (Your account details will be sent to your e-mail after you have purchased Moto CMS), and refresh your browser page.</p>
<p><strong>3. </strong>In order to start the website creation please install Moto Flash CMS components (MotoCMS.mxp).</p>
<p><strong><strong>4. </strong></strong>Start your work with Moto CMS by trying to compile the suggested website samples from Flash IDE. Use moto.flp for simultaneous .fla files compilation.</p>
<p>Learn more about Moto CMS installation process on <a href="http://www.cms-guide.com/installation-manual/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.cms-guide.com/installation-manual/?referer=');">http://www.cms-guide.com/installation-manual/</a></p>
<p>If you are not an experienced developer, but would like to try create a Flash website without a professional&#8217;s help, we would recommend you to choose a <a title="Flash Template" href="http://templates.motocms.com" target="_blank" onclick="pageTracker._trackPageview('/outgoing/templates.motocms.com?referer=');">Flash Template</a> from the premium Moto CMS collection. <strong><strong>A 30 day FREE <a title="Moto CMS Demo" href="http://www.motocms.com/demo/" target="_blank">Demo</a> is available. </strong></strong></p>
<p><strong><strong>Please read the <a title="Creating Flash Website with Moto CMS Standalone - Part 2" href="http://www.motocms.com/blog/project-news/creating-flash-website-with-moto-cms-standalone-part-2/" target="_blank">Part 2</a>, <a title="Creating Flash Website with Moto CMS Standalone - Part 3" href="http://www.motocms.com/blog/project-news/creating-flash-website-with-moto-cms-standalone-part-3/" target="_blank">Part 3</a>, <a title="Creating Flash Website with Moto CMS Standalone - Part 4" href="http://www.motocms.com/blog/project-news/creating-flash-website-with-moto-cms-standalone-part-4/" target="_blank">Part 4</a> and Part 5 of the tutorial.<br />
</strong></strong></p>
<p>To be continued&#8230;</p>
]]></content:encoded>
			<wfw:commentRss>http://www.motocms.com/blog/project-news/creating-flash-website-with-moto-cms-standalone-part-1/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Google Maps Widget: Let Visitors Find You on the Map</title>
		<link>http://www.motocms.com/blog/project-news/google-maps-widget-let-visitors-find-you-easily/</link>
		<comments>http://www.motocms.com/blog/project-news/google-maps-widget-let-visitors-find-you-easily/#comments</comments>
		<pubDate>Tue, 22 Feb 2011 12:46:01 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Flash Software]]></category>
		<category><![CDATA[Project news]]></category>
		<category><![CDATA[flash cms]]></category>
		<category><![CDATA[Google Maps Widget]]></category>

		<guid isPermaLink="false">http://www.motocms.com/?p=4922</guid>
		<description><![CDATA[<a href="http://www.motocms.com/blog/project-news/google-maps-widget-let-visitors-find-you-easily/"><img src="http://www.motocms.com/wp-content/uploads/2011/02/thumb2-150x150.jpg" title="" alt="" /></a>
MotoCMS always keeps abreast of the most advanced developments and tries to implement all the boldest ideas into its products. So, one of the features we have recently added to our Flash content management system is the Google Maps Widget created on the basis of the Google Maps API. Let's look inside the control panel and discover the opportunities of the advanced Google Maps Widget...]]></description>
			<content:encoded><![CDATA[<p>Have you ever heard about <strong>Google Maps</strong>? This free web mapping application offers many map-based services, e.g. the Google Maps website, Google Transit, Google Ride Finder, etc. The services give us the access to street maps, a route planner and a business locator for many countries all over the world.</p>
<p>In addition to the above mentioned services, Google has made a great present to the developers and created the <strong>Google Maps API</strong>, a widely used web application development interface that allows developers to integrate Google Maps into their websites. Due to this advanced application, it&#8217;s become possible to embed a map, a route planner or a business locator in any website.</p>
<p><a title="Flash CMS" href="http://www.motocms.com" target="_blank">MotoCMS</a> always keeps abreast of the most advanced developments and tries to implement all the boldest ideas into own products. So, one of the features we have recently added to our Flash content management system is the <strong>Google Maps Widget</strong> created on the basis of the Google Maps API. Now all Moto CMS website owners have Google Maps within their Flash CMS websites.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/02/maps.jpg"><img class="aligncenter size-full wp-image-4923" src="http://www.motocms.com/wp-content/uploads/2011/02/maps.jpg" alt="" width="590" height="281" /></a></p>
<p style="text-align: center;">
<p style="text-align: left;">It couldn&#8217;t be any easier to provide your Flash CMS website visitors with clickable interactive map! The only thing you have to do is to add the map widget on the stage and configure it according to your website requirements.<br />
<strong><br />
Let&#8217;s look inside the control panel and discover the opportunities of the advanced Google Maps Widget&#8230;</strong></p>
<p><strong>1.</strong> If you press on the map, you will be able to add a New Marker:</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/02/maps1.jpg"><img class="aligncenter size-full wp-image-4924" src="http://www.motocms.com/wp-content/uploads/2011/02/maps1.jpg" alt="" width="590" height="374" /></a></p>
<ul>
<li>You can set the icon for the marker from your Media Library:</li>
</ul>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/02/maps51.jpg"><a href="http://www.motocms.com/wp-content/uploads/2011/02/icon.jpg"><img class="aligncenter size-full wp-image-4968" src="http://www.motocms.com/wp-content/uploads/2011/02/icon.jpg" alt="" width="590" height="253" /></a><br />
</a></p>
<ul>
<li>You can drag the marker to set the Latitude and Longtitude;</li>
<li>You can add Title and Description for the marker that the visitors will see after clicking on the marker;</li>
<li> You can add the unlimited number of markers:</li>
</ul>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/02/maps4.jpg"><img class="aligncenter size-full wp-image-4952" src="http://www.motocms.com/wp-content/uploads/2011/02/maps4.jpg" alt="" width="590" height="408" /></a></p>
<p style="text-align: left;"><strong>2.</strong> Within the Google Maps Widget it is possible to&#8230;</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/02/maps2.jpg"><img class="aligncenter size-full wp-image-4925" src="http://www.motocms.com/wp-content/uploads/2011/02/maps2.jpg" alt="" width="590" height="428" /></a></p>
<ul>
<li>Specify the Default Map Type (Normal, Satellite, Hybrid or Physical);</li>
<li>Set the position of Map Focus (First Point, Last Point or All Points);</li>
<li> Set the zoom parameters;</li>
<li>Specify the background settings: Background Fill Alpha and Background Fill Color;</li>
</ul>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/02/background.jpg"><br />
</a><a href="http://www.motocms.com/wp-content/uploads/2011/02/backg.jpg"><img class="aligncenter size-full wp-image-4962" src="http://www.motocms.com/wp-content/uploads/2011/02/backg.jpg" alt="" width="500" height="138" /></a></p>
<ul>
<li>Set the Controls Positions (Location, Zoom, Scale, Map Overview, Map type);</li>
</ul>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/02/controls.jpg"></a><a href="http://www.motocms.com/wp-content/uploads/2011/02/controls1.jpg"><img class="aligncenter size-full wp-image-4963" src="http://www.motocms.com/wp-content/uploads/2011/02/controls1.jpg" alt="" width="500" height="312" /></a></p>
<ul>
<li>Set the Map Types (Normal, Satellite, Hybrid or Physical);</li>
</ul>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/02/map_+types.jpg"><br />
</a><a href="http://www.motocms.com/wp-content/uploads/2011/02/map_types.jpg"><img class="aligncenter size-full wp-image-4964" src="http://www.motocms.com/wp-content/uploads/2011/02/map_types.jpg" alt="" width="500" height="220" /></a></p>
<ul>
<li>Set the size parameters, rotation angle and alpha;</li>
</ul>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2011/02/size.jpg"></a><a href="http://www.motocms.com/wp-content/uploads/2011/02/size1.jpg"><img class="aligncenter size-full wp-image-4965" src="http://www.motocms.com/wp-content/uploads/2011/02/size1.jpg" alt="" width="500" height="152" /></a></p>
<ul>
<li>Specify the «Blend Mode» parameters.</li>
</ul>
<p style="text-align: left;">The widget is available for <strong>FREE</strong> with the purchase of Moto CMS standalone version or any of the premium <a title="Flash CMS Templates" href="http://templates.motocms.com" target="_blank" onclick="pageTracker._trackPageview('/outgoing/templates.motocms.com?referer=');">Flash CMS templates</a> from our collection.</p>
<p><strong>Choose one of the Flash CMS templates and register a 30 day <a title="Demo" href="http://www.motocms.com/demo/" target="_blank">DEMO</a> in order to try the Google Maps Widget in action!</strong></p>
]]></content:encoded>
			<wfw:commentRss>http://www.motocms.com/blog/project-news/google-maps-widget-let-visitors-find-you-easily/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>New Flash Portfolio: Whirling Papervision 3D Gallery</title>
		<link>http://www.motocms.com/blog/project-news/new-flash-portfolio-whirling-papervision-3d-gallery/</link>
		<comments>http://www.motocms.com/blog/project-news/new-flash-portfolio-whirling-papervision-3d-gallery/#comments</comments>
		<pubDate>Thu, 28 Oct 2010 07:51:16 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[DesignFloat]]></category>
		<category><![CDATA[Flash CMS Templates]]></category>
		<category><![CDATA[Flash Components]]></category>
		<category><![CDATA[Flash Galleries]]></category>
		<category><![CDATA[Flash Software]]></category>
		<category><![CDATA[Papervision3D]]></category>
		<category><![CDATA[Project news]]></category>
		<category><![CDATA[flash cms]]></category>
		<category><![CDATA[flash cms gallery]]></category>
		<category><![CDATA[flash templates]]></category>

		<guid isPermaLink="false">http://www.motocms.com/?p=3899</guid>
		<description><![CDATA[<a href="http://www.motocms.com/blog/project-news/new-flash-portfolio-whirling-papervision-3d-gallery/"><img src="http://www.motocms.com/wp-content/uploads/2010/10/flash_gallery-150x150.jpg" title="" alt="" /></a>
This impressive whirling Flash CMS gallery created with Papervision 3D is highly functional and will perfectly work for any purpose portfolio: a photographer’s, artist’s, designer’s portfolios, online exhibitions, model agencies, creative groups, etc. It is much more than just an interactive gallery – it is a Flash masterpiece!]]></description>
			<content:encoded><![CDATA[<p>We can&#8217;t wait to present you, our dear customers, our new product: a premium <strong>Flash CMS gallery</strong>. It is much more than just an interactive template – it is a Flash masterpiece!</p>
<p>This impressive whirling Flash CMS gallery created with Papervision 3D is highly functional and will perfectly work for any purpose portfolio: a photographer’s, artist’s, designer’s portfolios, online exhibitions, model agencies, creative groups, etc.</p>
<p style="text-align: center;"><a title="Flash CMS gallery" href="http://templates.motocms.com/flash-moto-templates-type/31221.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/templates.motocms.com/flash-moto-templates-type/31221.html?referer=');"><img class="size-full wp-image-3900 aligncenter" title="Flash CMS gallery" src="http://www.motocms.com/wp-content/uploads/2010/10/simons_portfol.jpg" alt="" width="590" height="460" /></a></p>
<p style="text-align: left;">The portfolio is equipped with an interactive 3D gallery in the form of a circle that runs around when you mouse over the page. If you wish to stop the gallery, point the cursor over it. To open a big image preview, just click on its thumbnail.</p>
<p style="text-align: center;"><img class="size-full wp-image-3901 aligncenter" title="Flash CMS gallery" src="http://www.motocms.com/wp-content/uploads/2010/10/simons_portf_1.jpg" alt="" width="590" height="465" /></p>
<p style="text-align: left;">You can create a great number of albums within the gallery and sort your images according to categories. For each gallery  its own circle sub-gallery is created. The <strong>“prev”</strong> and <strong>“next”</strong> interactive arrow buttons allow to easily navigate the sub-galleries. The interactive drop down menu is not only attractive visually &#8211; it offers the visitors an extremely comfortable way of the website navigation.</p>
<p style="text-align: center;"><img class="size-full wp-image-3902 aligncenter" title="Flash CMS gallery" src="http://www.motocms.com/wp-content/uploads/2010/10/simons_portf.jpg" alt="" width="590" height="462" /></p>
<p style="text-align: left;">This template is a full-fledged Flash website that can be easily modified through Moto Flash CMS integrated. If you are not familiar with the opportunities of Moto CMS for Flash, you will be pretty excited with the system functionality, the widest opportunities it offers, and almost intuitive interface that allows to <a title="MotoCMS.com" href="http://www.motocms.com" target="_blank">create Flash website</a> with minimum efforts. It is possible to add elements and effects, create pages and pop-ups, integrate new modules and fonts, and much more. A really great component is <strong>Flash image editor</strong> that provides a rich editing toolset for modifying images: to zoom in and out images as well as scale them, rotate horizontally or vertically or change the angle, resize or crop your images, change image hue, saturation and color balance, adjust contrast and brightness, add effects to images, etc.</p>
<p style="text-align: center;"><img class="size-full wp-image-3903 aligncenter" title="Flash CMS gallery" src="http://www.motocms.com/wp-content/uploads/2010/10/background.jpg" alt="" width="590" height="357" /></p>
<p style="text-align: left;">A really cool feature of this Flash CMS gallery is the ability to change the background. It can be achieved with the help of <strong>Background image slot</strong> integrated into the control panel. Moreover, you can customize your background image to your liking. There are such functions as full screen mode, alignment, rotation, alpha and blend mode. Also, you can easily add the effects: bevel, blur, color, glow or shadow.</p>
<p style="text-align: left;">Try the <a title="Demo" href="http://cms.template-help.com/flashmoto_31221/admin/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/cms.template-help.com/flashmoto_31221/admin/?referer=');">DEMO</a> and appreciate the advantages of this amazing Flash CMS gallery from MotoCMS!</p>
<p style="text-align: left;">
<p>For those who are really interested in Papervision 3D and are in search of some interesting Flash gallery solutions, we recommend to visit our <strong>Moto Flash CMS templates –</strong> <a title="Papervision 3D templates" href="http://templates.motocms.com/category/papervision-3d " target="_blank" onclick="pageTracker._trackPageview('/outgoing/templates.motocms.com/category/papervision-3d?referer=');">Papervision 3D templates</a>.</p>
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://www.motocms.com/blog/project-news/new-flash-portfolio-whirling-papervision-3d-gallery/feed/</wfw:commentRss>
		<slash:comments>7</slash:comments>
		</item>
		<item>
		<title>Useful Tips and Tricks on How to Improve your Flash CMS Website</title>
		<link>http://www.motocms.com/blog/flash-software/useful-tips-and-tricks-on-how-to-improve-your-flash-cms-website/</link>
		<comments>http://www.motocms.com/blog/flash-software/useful-tips-and-tricks-on-how-to-improve-your-flash-cms-website/#comments</comments>
		<pubDate>Thu, 02 Sep 2010 06:41:25 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Flash Software]]></category>
		<category><![CDATA[flash cms]]></category>

		<guid isPermaLink="false">http://www.motocms.com/?p=3202</guid>
		<description><![CDATA[<a href="http://www.motocms.com/blog/flash-software/useful-tips-and-tricks-on-how-to-improve-your-flash-cms-website/"><img src="http://www.motocms.com/wp-content/uploads/2010/09/088-150x150.jpg" title="" alt="" /></a>
While you, dear users, are pending of the New Version release, we will share with you some useful tips and tricks that may improve your experience working with the current version of <strong>FlashMoto Control Panel</strong>. We hope these simple steps will help you to make your Flash CMS website even more functional and original.]]></description>
			<content:encoded><![CDATA[<p>Of course, our dear FlashMoto CMS users, you have already had time to appreciate the numerous advantages of the Flash content management system: its wide opportunities, the convenient almost intuitive interface, the simplicity of each option, etc. FlashMoto developers have tried hard to release the product of such a high functionality.</p>
<p>With the launch of the <strong>New Version 1.2</strong> many great new features and improvements have been added to the Control Panel. But we never stop at what has been accomplished: the new version of FlashMoto CMS has almost been finished and is going to be released in the nearest future! So, follow our announcements in order to know about the new improvements that FlashMoto developers have prepared for you.</p>
<p>While you, dear users, are pending of the New Version release, we will share with you some useful tips and tricks that may improve your experience working with the current version of <strong>FlashMoto Control Panel</strong>. We hope these simple steps will help you to make your Flash CMS website even more functional and original.</p>
<p><strong>1. Setting a favicon for your FlashMoto CMS website</strong></p>
<p>FlashMoto Control Panel gives an opportunity to set a favicon (it can also be named as a website icon, url icon, bookmark icon or shortcut icon) for your Flash CMS website. It is a 16&#215;16, 32&#215;32 or 64&#215;64 pixel square icon that is displayed in the browser’s address bar, next to the page’s title on the browser tab and next to the page’s name in the list of bookmarks.</p>
<p style="text-align: left;">You may add a favicon for your <a title="Moto CMS" href="http://www.motocms.com/why/" target="_blank">Flash website</a> through the “Preferences” section in your Control Panel:</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2010/09/favicon.jpg"><img class="size-full wp-image-3203 aligncenter" title="favicon" src="http://www.motocms.com/wp-content/uploads/2010/09/favicon.jpg" alt="" width="590" height="199" /></a></p>
<p style="text-align: left;">In the “Website Settings” sub-section click the “Select” button and choose the image from the media library you have uploaded for the favicon. As soon as the favicon image is uploaded, click the “Save” button.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2010/09/favicon_1.jpg"><img class="alignnone size-full wp-image-3204" title="favicon_1" src="http://www.motocms.com/wp-content/uploads/2010/09/favicon_1.jpg" alt="" width="590" height="443" /></a></p>
<p><span id="more-3202"></span></p>
<p style="text-align: left;"><strong>2. Using the “Preload Items” function </strong></p>
<p>FlashMoto Control Panel gives its users the ability to preload images.  The images are loaded on the website loading stage what makes it possible to depict them instantly while browsing a website. For example, if you make a site logo as an image, then it is better to preload it, so that while viewing your web pages the logo would show immediately. You may also preload background image or other images of your gallery to improve user experience.</p>
<p>You can manage the option “<em>Preload Item</em>” through the Media Library:</p>
<p style="text-align: center;"><a href="http://www.flashmoto.com/wp-content/uploads/2010/09/preload_items.jpg" onclick="pageTracker._trackPageview('/outgoing/www.flashmoto.com/wp-content/uploads/2010/09/preload_items.jpg?referer=');"></a><a href="http://www.motocms.com/wp-content/uploads/2010/09/preload_items.jpg"><img class="alignnone size-full wp-image-3205" title="preload_items" src="http://www.motocms.com/wp-content/uploads/2010/09/preload_items.jpg" alt="" width="590" height="405" /></a></p>
<p style="text-align: center;">
<p style="text-align: left;"><strong>3. Activating the “Under Construction” mode</strong></p>
<p>The “Under Construction” mode is a special mode that is used in case you need to temporarily hide your website content from visitors (for example, if you haven’t finished your website yet or if it is in maintenance). If the mode is enabled, the “Under Construction” page will appear instead of your website home page.</p>
<p>You may enable the “Under Construction” mode through <strong>Preferences -&gt; Under Construction</strong> of the Control Panel. It is possible to choose a current theme: “Standard White” or “Standard Black” as well as type your own text that will be displayed on the “Under Construction” page.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2010/09/under_construction.jpg"><img class="alignnone size-full wp-image-3206" title="under_construction" src="http://www.motocms.com/wp-content/uploads/2010/09/under_construction.jpg" alt="" width="590" height="444" /></a></p>
<p style="text-align: left;">
<p style="text-align: left;">And that is what you will have as a result:</p>
<p style="text-align: center;"><a href="http://www.flashmoto.com/wp-content/uploads/2010/09/under_construction_1.jpg" onclick="pageTracker._trackPageview('/outgoing/www.flashmoto.com/wp-content/uploads/2010/09/under_construction_1.jpg?referer=');"></a><a href="http://www.motocms.com/wp-content/uploads/2010/09/under_construction_1.jpg"><img class="alignnone size-full wp-image-3207" title="under_construction_1" src="http://www.motocms.com/wp-content/uploads/2010/09/under_construction_1.jpg" alt="" width="590" height="344" /></a></p>
<p style="text-align: left;"><strong>4. Applying the “Do not index” and “Do not follow” functions</strong></p>
<p>FlashMoto CMS provides an opportunity for their users to keep their website pages from being indexed and followed by search engines. You may apply the functions “<em>Do not index</em>” and “<em>Do not follow</em>” through the Control Panel for any page of your website, when needed. If you do not want a definite page to be indexed and added to the search results, just select the “<em>Do not index</em>”  option. If you do not want page links to be followed by search engines, check the “<em>Do not follow</em>” option.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2010/09/donotindex.jpg"><img class="alignnone size-full wp-image-3208" title="donotindex" src="http://www.motocms.com/wp-content/uploads/2010/09/donotindex.jpg" alt="" width="590" height="616" /></a></p>
<p style="text-align: center;">
<p style="text-align: left;"><strong>5. Making the text selectable and copyable</strong></p>
<p>Sometimes when you visit a Flash website, you see that the text content is not selectable, and it is impossible to copy it. It is terribly irritating when you need to take the info from the website. It is strange, but only few Flash website owners take into account this fact. Of course, sometimes website owners just need to protect the content of their websites. But in most cases the website owners just don’t care.</p>
<p>So, you may easily make any text or text object on your website selectable and copyable through the Control Panel. For that you only need to check the box “Make selectable” for the object you would like this option to be applied.</p>
<p style="text-align: center;"><a href="http://www.flashmoto.com/wp-content/uploads/2010/09/selectable.jpg" onclick="pageTracker._trackPageview('/outgoing/www.flashmoto.com/wp-content/uploads/2010/09/selectable.jpg?referer=');"><br />
</a><a href="http://www.motocms.com/wp-content/uploads/2010/09/selectable.jpg"><img class="alignnone size-full wp-image-3209" title="selectable" src="http://www.motocms.com/wp-content/uploads/2010/09/selectable.jpg" alt="" width="590" height="604" /></a></p>
<p style="text-align: left;"><strong>6. Adding a unique font to your FlashMoto CMS website</strong></p>
<p style="text-align: left;">With your FlashMoto CMS you are not limited with the set of built-in system fonts. In addition to the standard fonts already integrated into the Control Panel, you may easily enrich your <a title="FlashMoto CMS" href="http://www.motocms.com" target="_blank">Flash CMS website</a> with any font you wish.</p>
<p style="text-align: left;">In order to make the text on your website unique and memorable, you only need to download it by means of the Fonts Manager which can be found in the “Preferences” section of the Control Panel.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2010/09/fonts.jpg"><img class="size-full wp-image-3210 aligncenter" title="fonts" src="http://www.motocms.com/wp-content/uploads/2010/09/fonts.jpg" alt="" width="548" height="469" /></a></p>
<p style="text-align: left;"><a href="http://www.flashmoto.com/wp-content/uploads/2010/09/fonts.jpg" onclick="pageTracker._trackPageview('/outgoing/www.flashmoto.com/wp-content/uploads/2010/09/fonts.jpg?referer=');"><br />
</a>But before downloading a new font to the Control Panel it is necessary to convert it from TTF or OTF to SWF format. You can easily do it by means of the FlashMoto Online Font Creator. This unique solution, which has no analogs, is extremely easy to use.</p>
<p>To open the Creator just click on the “Create font” button of the Fonts Manager. To add more fonts use the “Add fonts” button. Then press the “Create fonts” button to compile the added fonts.</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2010/09/fonts_1.jpg"><img class="alignnone size-full wp-image-3211" title="fonts_1" src="http://www.motocms.com/wp-content/uploads/2010/09/fonts_1.jpg" alt="" width="590" height="446" /></a></p>
<p style="text-align: left;">You may also indicate the definite sets of symbols that should be included into the library. This will allow you to reduce the size of the downloaded font.</p>
<p style="text-align: left;"><strong>7. Optimizing images using ALT attribute</strong></p>
<p>Optimizing images is becoming more and more important in SEO (Search Engine Optimization) for websites. The ALT attribute is a critical step that is often overlooked. Use the alt attribute to provide descriptive text for your images. With FlashMoto Control Panel it’s extremely easy:</p>
<p style="text-align: left;">To add title and alt for an image, you should go to <strong>Preferences -&gt; Media Library</strong>.</p>
<p style="text-align: center;"><a href="http://www.flashmoto.com/wp-content/uploads/2010/09/alt.jpg" onclick="pageTracker._trackPageview('/outgoing/www.flashmoto.com/wp-content/uploads/2010/09/alt.jpg?referer=');"><br />
</a><a href="http://www.motocms.com/wp-content/uploads/2010/09/alt.jpg"><img class="alignnone size-full wp-image-3212" title="alt" src="http://www.motocms.com/wp-content/uploads/2010/09/alt.jpg" alt="" width="590" height="137" /></a></p>
<p style="text-align: left;">The Media Library will open</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2010/09/alt_1.jpg"><img class="alignnone size-full wp-image-3213" title="alt_1" src="http://www.motocms.com/wp-content/uploads/2010/09/alt_1.jpg" alt="" width="590" height="418" /></a></p>
<p style="text-align: left;">To choose an image, just double click on it or click on the icon “image details” below the image. The image with its properties will open in a new window where you will be able to specify its title and alt.</p>
<p style="text-align: center;"><a href="http://www.flashmoto.com/wp-content/uploads/2010/09/alt_2.jpg" onclick="pageTracker._trackPageview('/outgoing/www.flashmoto.com/wp-content/uploads/2010/09/alt_2.jpg?referer=');"><br />
</a><a href="http://www.motocms.com/wp-content/uploads/2010/09/alt_2.jpg"><img class="alignnone size-full wp-image-3214" title="alt_2" src="http://www.motocms.com/wp-content/uploads/2010/09/alt_2.jpg" alt="" width="590" height="519" /></a></p>
<p style="text-align: left;"><strong>8. Copying the effects of one object and applying them to another</strong></p>
<p style="text-align: left;">Of course, you have already tried to apply some effects to your website objects within your FlashMoto Control Panel. Do you know that you may easily copy the effects of one object and apply them to another? There is nothing to it!</p>
<p>As an example, let’s copy the effects of the text object “TITLE” and transfer them to the text object “IMAGE”.</p>
<p>As you see, the text object has two effects “Shadow” and “Bevel”. To copy the object’s effects click on the button “Copy”:</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2010/09/copy_effects.jpg"><img class="alignnone size-full wp-image-3215" title="copy_effects" src="http://www.motocms.com/wp-content/uploads/2010/09/copy_effects.jpg" alt="" width="590" height="581" /></a></p>
<p>After we copied the object’s “TITLE” effects, we select the “IMAGE” object and choose the tab “Effects”. Then click on the button “Paste”:</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2010/09/copy_effects_1.jpg"><img class="alignnone size-full wp-image-3216" title="copy_effects_1" src="http://www.motocms.com/wp-content/uploads/2010/09/copy_effects_1.jpg" alt="" width="590" height="293" /></a></p>
<p style="text-align: left;">And that is what we will have as a result &#8211; the effects are identical:</p>
<p style="text-align: center;"><a href="http://www.motocms.com/wp-content/uploads/2010/09/copy_effects_2.jpg"><img class="alignnone size-full wp-image-3217" title="copy_effects_2" src="http://www.motocms.com/wp-content/uploads/2010/09/copy_effects_2.jpg" alt="" width="590" height="579" /></a></p>
<p style="text-align: center;">
<p style="text-align: left;">There are many other great FlashMoto CMS options and useful tips that haven’t been mentioned in this post. Stay with us &#8211; we are going to keep you informed!</p>
<p style="text-align: left;">
<p style="text-align: left;">
]]></content:encoded>
			<wfw:commentRss>http://www.motocms.com/blog/flash-software/useful-tips-and-tricks-on-how-to-improve-your-flash-cms-website/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Flash Builder4/Flash Catalyst Beta release: Sensation or Disappointment?</title>
		<link>http://www.motocms.com/blog/flash-software/flash-builder4flash-catalyst-beta-release-sensation-or-disappointment/</link>
		<comments>http://www.motocms.com/blog/flash-software/flash-builder4flash-catalyst-beta-release-sensation-or-disappointment/#comments</comments>
		<pubDate>Tue, 09 Jun 2009 14:37:34 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Flash Software]]></category>

		<guid isPermaLink="false">http://www.motocms.com/?p=697</guid>
		<description><![CDATA[<a href="http://www.motocms.com/blog/flash-software/flash-builder4flash-catalyst-beta-release-sensation-or-disappointment/"><img src="http://www.motocms.com/wp-content/uploads/2009/06/028-150x150.jpg" title="" alt="" /></a>
On June 1 all Flash developers and designers finally got the so much anticipated Flash Builder 4/Flash Catalyst Beta release. In this post we are going to sort out why new Adobe products are already considered to be a sensation in the Flash world and whether beta versions proved their value in practice. ]]></description>
			<content:encoded><![CDATA[<p><img src="http://docs.google.com/File?id=dcpxpth4_191c2rbsbmw_b" alt="" width="188" height="188" align="left" /><span style="font-size: small;"></p>
<div style="float:right; margin:-20px 5px 0 5px;"><script type="text/javascript">
digg_url = 'http://digg.com/software/Adobe_s_New_Flash_Betas_Sensation_or_Disappointment';
</script><br />
<script src="http://digg.com/tools/diggthis.js" type="text/javascript"></script> </div>
<p>On June 1 all Flash developers and designers finally got the so much anticipated Flash Builder 4/Flash Catalyst Beta release. If you missed this event because of some reasons, go to downloads for <b><a id="tlwo" title="Flash Catalyst" href="https://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_flashcatalyst" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.adobe.com/cfusion/entitlement/index.cfm?e=labs_flashcatalyst&amp;referer=');">Flash Catalyst</a></b> and <b><a href="https://www.adobe.com/cfusion/entitlement/index.cfm?e=labs_flashbuilder4" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.adobe.com/cfusion/entitlement/index.cfm?e=labs_flashbuilder4&amp;referer=');">Flash Builder 4</a></b>.</span></p>
<p><span style="font-size: small;">In this post we are going to sort out why new Adobe products are already considered to be a sensation in the Flash world and whether beta versions proved their value in practice. </span></p>
<p><span style="font-size: small;">Flash Builder is nothing else than a new name of Flex Builder “Gumbo” release. Though the name change caused mixed feelings among Flash developers, in fact it is intended to separate tools for creating Flash content and frameworks of other parts of the Flash Platform. </span></p>
<p><span style="font-size: small;">Flex Gumbo is enriched with lots of new features and improvements focused around three main areas in mind:</span></p>
<ul>
<li><span style="font-size: small;">Designer/developer <span class="misspell">workflow</span>: now designers and developers can better cooperate as it ties up Gumbo and Adobe&#8217;s creative tools, such as Flash professional and flash Catalyst. It&#8217;s enabled through the new <span class="misspell">FXP</span> (<span class="misspell">FleX</span> Project) format. It&#8217;s a way to <b>easily transport Flex projects between Catalyst and Builder</b>. The only thing which is not fully improved is compiler. Adobe team claims to have made lots of optimizations in this direction – well, waiting for final release!</span></li>
</ul>
<ul>
<li><span style="font-size: small;"><span class="misspell">IDE</span> productivity: The new features in this development section are 	totally mind blowing. Prior to Builder 4, it was sometimes 	challenging for developers to <b>connect to different data intensive 	applications and manage the data within a Flex application</b>. But a 	brand new approach to using data in Flex changed all that. Data 	Centric Development tool is simply awesome. Automatic getter/setter 	generation, event code generation, the new Package Explorer, and 	support for <span class="misspell">ASDoc</span> <span class="misspell">tooltips</span> – all these will save a great bunch of 	your time as well. </span></li>
</ul>
<div id="crk0" style="text-align: center;"><img style="width: 590px; height: 459px;" src="http://docs.google.com/File?id=dcpxpth4_192fdcmzddv_b" alt="" /></div>
<ul>
<li><span style="font-size: small;">Architecture 	changes: to help achieve a 	smoother <span class="misspell">workflow</span> between designers and developers, the <b>framework 	provides a clear separation of the visuals for a component and the 	rest of its behavior</b>. Y</span>ou set skins by pointing your 	component to <span class="misspell">MXML</span> skin files. Drawing rich graphics using <span class="misspell">MXML</span> tags 	will make your <span class="misspell">MXML</span> files quite wordy. Though all is nicely 	separated so it should still be easy to work with.</li>
</ul>
<p><span style="font-size: small;">New Adobe products were initially announced as powerful Flash development tools with design in mind. And Flash Catalyst as a new professional interaction design tool comes as the main engine for this collaboration. </span></p>
<div id="z5d0" style="text-align: center;"><img style="width: 590px; height: 379px;" src="http://docs.google.com/File?id=dcpxpth4_193r5cw49fk_b" alt="" /></div>
<p><span style="font-size: small;">However, what we see from Flash Catalyst beta is that the bridge between design and code for developers needs some more work over it. So far, it looks like</span> a one-way <span class="misspell">workflow</span> that allows designers to easily make prototypes of data driven flash website. <span style="font-size: small;">For now Catalyst appears to be a tool for designers mostly. This is what developers should remember so far. </span><span style="font-size: small;">Basically this Flash application enables designers to create the interface using animated working interactions and then hand it off to developers who will implement the database interaction. Amazing thing is that no special <span class="misspell">ActionScript</span> or Flex skills are required. This is a godsend for non-coding web designers. </span></p>
<p><span style="font-size: small;">Its interface will be familiar to Adobe products users as it offers panels for layers, project library, components and timeline. </span></p>
<p><span style="font-size: small;">Introduction to Adobe Flash Catalyst Beta 1 presented by </span><span style="font-size: small;">Mark <span class="misspell">Szulc</span> from Adobe Australia</span><span style="font-size: small;"> is available for viewing below. </span></p>
<p><object width="560" height="340" data="http://www.youtube.com/v/117LeKmhBWg&amp;hl=ru&amp;fs=1&amp;" type="application/x-shockwave-flash"><param name="allowFullScreen" value="true" /><param name="allowscriptaccess" value="always" /><param name="src" value="http://www.youtube.com/v/117LeKmhBWg&amp;hl=ru&amp;fs=1&amp;" /><param name="allowfullscreen" value="true" /></object></p>
<p><span style="font-size: small;">And here are some features you are able to experience in Beta version of Flash Catalyst:</span></p>
<p><span style="font-size: small;">1. Empowering interactive design: you can add 	interactivity based on states and events instead of <span class="misspell">timelines</span>, <b>do 	interaction design without coding</b>, all your designs will work 	exactly as you create them, nothing will lose in translation.</span></p>
<p><span style="font-size: small;">2. Fast 	design: Turn static graphics into dynamic content by selecting 	objects and specifying actions from menus. Easily move between 	application states. Converted artwork can be combined into a custom 	component. </span></p>
<p><span style="font-size: small;">3. Smooth cut-paste 	<span class="misspell">workflow</span> between Adobe Creative Suite and Flash Catalyst while 	maintaining your work.</span></p>
<p><span style="font-size: small;">4. As you create your 	project in design view, Flash Catalyst is representing the design as 	well-formed <span class="misspell">MXML</span> code behind the scenes. In this release you can&#8217;t 	share your project with Flash Builder 4, but this is being worked on 	for future versions. </span></p>
<p><span style="font-size: small;">5. It comes with a set 	of simple looking <span class="misspell">Wireframing</span> controls, it will help create mock-ups 	which will be more understandable for clients. With this controls 	instead of standard Flex ones, a client will easier understand that 	they are seeing just a prototype, not the finished application. </span></p>
<p><span style="font-size: small;"><b>Flash Catalyst still has 	a few raw sides</b> which we expect will be fixed in the future 	releases:</span></p>
<p><span style="font-size: small;">- designers will need to 	learn how to fit their Illustrator and <span class="misspell">Photoshop</span> design comps to 	Catalyst, it&#8217;s not so obvious at the beginning.</span></p>
<p><span style="font-size: small;">- another kind of 	timeline which is provided by Catalyst also needs some examination.</span></p>
<p><span style="font-size: small;">- developers can&#8217;t 	switch from Design to Code mode and edit projects there. Of course, 	items can be added via the Catalyst <span class="misspell">UI</span>, but doing it directly in the 	code would be much more efficient. </span></p>
<div id="d7gu" style="text-align: center;"><img style="width: 590px; height: 417px;" src="http://docs.google.com/File?id=dcpxpth4_194gs9c57hf_b" alt="" /></div>
<p><span style="font-size: small;">Despite of everything, <b><a id="ya0f" title="Flash Catalyst" href="http://www.gotoandlearn.com/play?id=110" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.gotoandlearn.com/play?id=110&amp;referer=');">Flash Catalyst</a></b> in tandem with <b><a id="oa4d" title="Flash Builder 4" href="http://www.gotoandlearn.com/play?id=111" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.gotoandlearn.com/play?id=111&amp;referer=');">Flash Builder 4</a></b> are going to make life so much easier! These products arouse super lively interest in Flash developers and designers. As a result, you can already <b><a id="ya0f" title="download free themes" rel="nofollow" href="http://scalenine.com/gallery/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/scalenine.com/gallery/?referer=');">download free themes</a></b> which can be used in Flash Catalyst and Flash Builder 4. Of course, Beta version reveals some rough edges with ability to use flash builder, but the number of new empowering features is quite impressive. This is just a first take of a complex task. And we have no doubts that this revolutionary software focused on interaction and collaboration enables to increase creative productivity and has all chances to bring Flash development on the new level. </span></p>
<p><span style="font-size: small;">We are closely watching all Adobe events concerning Flash products to <b>deliver first-hand information to you</b> . Check out <span class="misspell">FlashMoto</span> <a href="http://www.motocms.com">Flash CMS</a> blog not to miss a thing!</span></p>
]]></content:encoded>
			<wfw:commentRss>http://www.motocms.com/blog/flash-software/flash-builder4flash-catalyst-beta-release-sensation-or-disappointment/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Unity 3D &#8211; New Reality!</title>
		<link>http://www.motocms.com/blog/flash-software/unity3d-new-reality/</link>
		<comments>http://www.motocms.com/blog/flash-software/unity3d-new-reality/#comments</comments>
		<pubDate>Wed, 24 Dec 2008 13:45:42 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Flash Software]]></category>
		<category><![CDATA[flash]]></category>
		<category><![CDATA[unity]]></category>

		<guid isPermaLink="false">http://www.motocms.com/?p=211</guid>
		<description><![CDATA[<a href="http://www.motocms.com/blog/flash-software/unity3d-new-reality/"><img src="http://www.motocms.com/wp-content/uploads/2008/12/016-150x150.jpg" title="" alt="" /></a>
I'd like to share with you an inspiring software for 3D developers. You could ask what's so AWESOME in Unity3D? Let me explain and show you. Unity is an integrated authoring tool for creating 3D video games or other interactive content such as architectural visualizations or real-time 3D animations. ]]></description>
			<content:encoded><![CDATA[<p style="text-align: center;"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/12/unity3d/unity3d.jpg" alt="" /></p>
<p>I&#8217;d like to share with you an inspiring software for 3D developers. <a href="http://unity3d.com" onclick="pageTracker._trackPageview('/outgoing/unity3d.com?referer=');">Unity3D</a> new reality, the future of online game industry!<br />
You could ask what&#8217;s so AWESOME in Unity3D? Let me explain or simply show you.<br />
First of all you should install <a rel="nofollow" href="http://unity3d.com/unity/download" onclick="pageTracker._trackPageview('/outgoing/unity3d.com/unity/download?referer=');">Unity3D player</a> which is only 3Mb, after that you could play unity3D projects. Now we could check the samples.</p>
<p><a rel="nofollow" href="http://madfishgames.com/index.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/madfishgames.com/index.html?referer=');"><strong>Dungeonz</strong></a> &#8211; Control the Green Ogre around the maze. Simple but really cool animation. What I really like is load time!</p>
<p><a rel="nofollow" href="http://madfishgames.com/index.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/madfishgames.com/index.html?referer=');"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/12/unity3d/unity3d-dungeonz.jpg" alt="" /></a></p>
<p><a rel="nofollow" href="http://freeverse.com/games/game/?id=7019" target="_blank" onclick="pageTracker._trackPageview('/outgoing/freeverse.com/games/game/?id=7019&amp;referer=');"><strong>Hordes of Orcs</strong></a> &#8211; the best online browser Tower Defense game based on Warcraft World. TERRIFIC!</p>
<p><a rel="nofollow" href="http://freeverse.com/games/game/?id=7019" target="_blank" onclick="pageTracker._trackPageview('/outgoing/freeverse.com/games/game/?id=7019&amp;referer=');"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/12/unity3d/hordes-of-orcs.jpg" alt="" /></a></p>
<p><a rel="nofollow" href="http://games.sector3.com.au/tw_mp.aspx" target="_blank" onclick="pageTracker._trackPageview('/outgoing/games.sector3.com.au/tw_mp.aspx?referer=');"><strong>Turret Wars</strong></a> &#8211; browser online multilayer game from Sector 3 Games. Choose from FOUR different gun turret types, each with slightly different weapon and armor or projectile features!</p>
<p><a rel="nofollow" href="http://games.sector3.com.au/tw_mp.aspx" target="_blank" onclick="pageTracker._trackPageview('/outgoing/games.sector3.com.au/tw_mp.aspx?referer=');"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/12/unity3d/turrentwars.jpg" alt="" /></a></p>
<p><a rel="nofollow" href="http://unity3d.com/gallery/live-demos/avert-fate" target="_blank" onclick="pageTracker._trackPageview('/outgoing/unity3d.com/gallery/live-demos/avert-fate?referer=');"><strong>Avert Fate</strong></a> &#8211; fantastic 3D shooter. Install is so small that you would be amazed of the graphic.</p>
<p><a rel="nofollow" href="http://unity3d.com/gallery/live-demos/avert-fate" target="_blank" onclick="pageTracker._trackPageview('/outgoing/unity3d.com/gallery/live-demos/avert-fate?referer=');"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/12/unity3d/bigrobot.jpg" alt="" /></a></p>
<p><a rel="nofollow" href="http://unity3d.com/gallery/live-demos/shadows" target="_blank" onclick="pageTracker._trackPageview('/outgoing/unity3d.com/gallery/live-demos/shadows?referer=');"><strong>Shadows Demo</strong></a> &#8211; web browse preview or the light and dark side of Unity 3D!</p>
<p><a rel="nofollow" href="http://unity3d.com/gallery/live-demos/shadows" target="_blank" onclick="pageTracker._trackPageview('/outgoing/unity3d.com/gallery/live-demos/shadows?referer=');"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/12/unity3d/unity3d-light.jpg" alt="" /></a></p>
<p><a rel="nofollow" href="http://unity3d.com/gallery/live-demos/tropical-paradise" target="_blank" onclick="pageTracker._trackPageview('/outgoing/unity3d.com/gallery/live-demos/tropical-paradise?referer=');"><strong>Tropical Paradase</strong></a> &#8211; Feel the sun on your skin – right inside your browser. Using streaming, this huge scene loads almost instantly.</p>
<p><a rel="nofollow" href="http://unity3d.com/gallery/live-demos/tropical-paradise" target="_blank" onclick="pageTracker._trackPageview('/outgoing/unity3d.com/gallery/live-demos/tropical-paradise?referer=');"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/12/unity3d/tropical-paradise.jpg" alt="" /></a></p>
<p><a rel="nofollow" href="http://www.bigbrainz.com/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.bigbrainz.com/?referer=');"><strong>Big Brains</strong></a> &#8211; nice logic game with awesome 3D graphic. If you have a kid give them a try.</p>
<p><a rel="nofollow" href="http://www.bigbrainz.com/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.bigbrainz.com/?referer=');"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/12/unity3d/big-brains.jpg" alt="" /></a></p>
<p>I hope you&#8217;ve enjoyed Unity3D with me. Because it&#8217;s really worth your look.<br />
Some cool news for an iPhone owners that you could play all these games at your iPhone.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.motocms.com/blog/flash-software/unity3d-new-reality/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Apple&#039;s Bite!</title>
		<link>http://www.motocms.com/blog/flash-software/apple-bite/</link>
		<comments>http://www.motocms.com/blog/flash-software/apple-bite/#comments</comments>
		<pubDate>Tue, 18 Nov 2008 13:13:01 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Flash Software]]></category>
		<category><![CDATA[apple]]></category>
		<category><![CDATA[flash]]></category>

		<guid isPermaLink="false">http://www.motocms.com/?p=125</guid>
		<description><![CDATA[<a href="http://www.motocms.com/blog/flash-software/apple-bite/"><img src="http://www.motocms.com/wp-content/uploads/2008/11/011-150x150.jpg" title="" alt="" /></a>
According to Steve Jobs Apple is ready to take a bite of Silicon Valley. Why does everyone think so? Currently Apple budget is for about $25 billion. Everyone wants to find the best way to invest their money. This wish is influenced by the economic crisis of 2008. So Apple isn’t an exception.]]></description>
			<content:encoded><![CDATA[<p><img style="padding: 8px; padding-left:0px; padding-right:15px;" src="http://www.motocms.com/wp-content/uploads/2008/11/apple-bite.jpg" alt="Apple Bite" align="left" />According to Steve Jobs Apple is ready to take a bite of Silicon Valley. Why does everyone think so? Currently Apple budget is for about $25 billion. Everyone wants to find the best way to invest their money. This wish is influenced by the economic crisis of 2008. So Apple isn’t an exception.</p>
<p>“This downturn may also present some extraordinary opportunities for companies that have the cash to take advantage of it,” Jobs said.</p>
<p>In the past, the vast majority of Apple acquisitions have been software-related so we could expect it would happen again.</p>
<p>What will be the next Steve’s creation?</p>
<p>The victim is Adobe. I know that everyone is talking about some iPhone development companies but I trust experts. Earlier this year it was announced that Adobe begins work on Flash player for iPhone. This information was announced at Adobe Town Hall press-conference.<br />
You may know that iPhone is the last smartphone that can’t play Flash content. Seems this problem will be solved in the nearest future because Apple is the third-largest mobile supplier in the word.</p>
<p>Though, there are some questions: What is the Apple’s next move? Will Steve Jobs buy a ready-made solution for his “baby” or the entire company?</p>
<p>So what we have now is: Apple+MacOS is one of the best platforms for developers (SUPERfast! 8-)),  the best video editing software &#8211; Final Cut PRO, Unity 3D (only on Mac).<br />
What should we expect in the nearest future?</p>
<p style="text-align: center;"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/11/apple-adobe.jpg" alt="Adobe new logo" /></p>
<p>Would Mac be the only choice for a developer?</p>
]]></content:encoded>
			<wfw:commentRss>http://www.motocms.com/blog/flash-software/apple-bite/feed/</wfw:commentRss>
		<slash:comments>8</slash:comments>
		</item>
		<item>
		<title>Flex &#8211; San Jose conference</title>
		<link>http://www.motocms.com/blog/flash-software/flex-san-jose-conference/</link>
		<comments>http://www.motocms.com/blog/flash-software/flex-san-jose-conference/#comments</comments>
		<pubDate>Fri, 14 Nov 2008 14:01:34 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Flash Software]]></category>
		<category><![CDATA[flex]]></category>

		<guid isPermaLink="false">http://www.motocms.com/?p=101</guid>
		<description><![CDATA[<a href="http://www.motocms.com/blog/flash-software/flex-san-jose-conference/"><img src="http://www.motocms.com/wp-content/uploads/2008/11/010-150x150.jpg" title="" alt="" /></a>
Flex in San Jose is the most popular an well-known con devoted to Flex/AIR. It takes you to the deeps of Flex! That's why when you see some names from the list of 360&#124;Flex be sure that this names know what they are speaking about if they are spelling words Flex &#38; AIR.
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.360flex.com/" rel="nofollow" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.360flex.com/?referer=');">360|Flex</a> in San Jose is the most popular an well-known con devoted to Flex/AIR. It takes you to the deeps of Flex! That&#8217;s why when you see some names from the list of 360|Flex be sure that this names know what they are speaking about if they are spelling words Flex &amp; AIR.</p>
<p>Anyway I won&#8217;t take you long if you are interested in a 360|Flex reviews I suggest you to read this one:<br />
<a rel="nofollow" href="http://www.colettas.org/?p=175" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.colettas.org/?p=175&amp;referer=');">Dave of Buzzword fame</a> (2007 CON)<br />
<a rel="nofollow" href="http://dougmccune.com/blog/2008/03/01/my-360flex-writeup/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/dougmccune.com/blog/2008/03/01/my-360flex-writeup/?referer=');">Doug McCune</a> (2007 CON)<br />
<a rel="nofollow" href="http://polygeek.com/380_adobeflash_360flex-seattle-brain-dump" target="_blank" onclick="pageTracker._trackPageview('/outgoing/polygeek.com/380_adobeflash_360flex-seattle-brain-dump?referer=');">Our boy PolyGeek</a> (2007 CON)<br />
Straight to the point!</p>
<p>Here is some fantastic presentations that were contributed to Flex community by world leaders in Flex development.<br />
<strong>1. Learning Flex from Scratch (LFFS) by Flater &amp; Sheridan</strong> &#8211; <a rel="nofollow" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1743188601?src=mrss" target="_blank" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1743188601?src=mrss&amp;referer=');">presentation</a><br />
<strong>description:</strong> Adam Flater &amp; Scott Sheridan:  The Learning Flex from Scratch series on <a rel="nofollow" href="http://www.insideria.com/ adam_flater_and_scott_sheridan/" onclick="pageTracker._trackPageview('/outgoing/www.insideria.com/_adam_flater_and_scott_sheridan/?referer=');">Inside RIA</a> focused on a non-programmers journey into the world of Flex.</p>
<p><a rel="nofollow" target="_blank" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1743188601?src=mrss" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1743188601?src=mrss&amp;referer=');"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/11/flex-con/1.jpg" alt="" /></a></p>
<p><strong>2. Using Item Renderers in Flex by Mary Mcdonald</strong> &#8211; <a target="_blank" rel="nofollow" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741212621?src=mrss" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741212621?src=mrss&amp;referer=');">presentation</a><br />
<strong>description</strong>: Discusses using item renderers and item editors in Flex to change the look of your data being displayed.  This session has plenty of examples!</p>
<p><a rel="nofollow" target="_blank" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741212621?src=mrss" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741212621?src=mrss&amp;referer=');"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/11/flex-con/2.jpg" alt="" /></a></p>
<p><strong>3. Creating Flex Components by Jeffry Houser</strong> &#8211; <a target="_blank" rel="nofollow" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1740023445?src=mrss" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1740023445?src=mrss&amp;referer=');">presentation</a><br />
<strong>description</strong>: An introductory presentation on creating Flex Components.</p>
<p><a target="_blank" rel="nofollow" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1740023445?src=mrss" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1740023445?src=mrss&amp;referer=');"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/11/flex-con/3.jpg" alt="" /></a></p>
<p><strong>4.  Diving Deep w/ the Flex Component Lifecycle by Owen &amp; Umbaug</strong> &#8211; <a rel="nofollow" target="_blank" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1743188617?src=mrss" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1743188617?src=mrss&amp;referer=');">presentation</a><br />
<strong>description</strong>: RJ Owen &amp; Brad Umbaugh:  In this session, Senior Developers RJ Owen and Brad Umbaugh will explore in depth exactly what happens every time a component is created and rendered in Flex.</p>
<p><a rel="nofollow" target="_blank" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1743188617?src=mrss" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1743188617?src=mrss&amp;referer=');"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/11/flex-con/4.jpg" alt="" /></a></p>
<p><strong>5. Diving in the Data Binding Waters with Michael Labriola</strong> &#8211; <a target="_blank" rel="nofollow" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741212660?src=mrss" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741212660?src=mrss&amp;referer=');">presentation</a><br />
<strong>description</strong>: Just about everyone who uses Flex uses data binding. Now come learn what you are actually doing when you add those curly brackets to your application.</p>
<p><a target="_blank" rel="nofollow" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741212660?src=mrss" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741212660?src=mrss&amp;referer=');"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/11/flex-con/5.jpg" alt="" /></a></p>
<p><strong>6. E4X by Marc Bir</strong> &#8211; <a target="_blank" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741160964?src=mrss" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741160964?src=mrss&amp;referer=');">presentation</a><br />
<strong>description</strong>: What is E4X? How do I use it? Why would I use it? When should I use it?</p>
<p><a target="_blank" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741160964?src=mrss" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741160964?src=mrss&amp;referer=');"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/11/flex-con/6.jpg" alt="" /></a></p>
<p><strong>7. Creating Reusable Components by Ben Clinkinbeard</strong> &#8211; <a target="_blank" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1738803361?src=mrss" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1738803361?src=mrss&amp;referer=');">presentation</a><br />
<strong>description</strong>: This session will talk about what to keep in mind when creating components that go beyond a single use.</p>
<p><a target="_blank" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1738803361?src=mrss" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1738803361?src=mrss&amp;referer=');"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/11/flex-con/7.jpg" alt="" /></a></p>
<p><strong>8. Flex and Acrobat by Joel Geraci</strong> &#8211; <a target="_blank" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1743188604?src=mrss" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1743188604?src=mrss&amp;referer=');">presentation</a><br />
<strong>description</strong>: This session will make you rethink everything you know (or think you know) about PDF.</p>
<p><a target="_blank" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1743188604?src=mrss" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1743188604?src=mrss&amp;referer=');"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/11/flex-con/8.jpg" alt="" /></a></p>
<p><strong>9. Data Visualization and Dashboards by Thomas Gonzalez</strong> &#8211; <a target="_blank" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741234046?src=mrss" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741234046?src=mrss&amp;referer=');">presentation</a><br />
<strong>description</strong>: This session discusses approaches and techniques to implementing Data Visualization and Dashboards within Flex 3.</p>
<p><a target="_blank" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741234046?src=mrss" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741234046?src=mrss&amp;referer=');"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/11/flex-con/9.jpg" alt="" /></a></p>
<p><strong>10. High Definition Video &amp; Flex Hands On by Christopher Keeler</strong> &#8211; <a target="_blank" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741160953?src=mrss" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741160953?src=mrss&amp;referer=');">presentation</a><br />
<strong>description</strong>: This session covers the tools and workflows you need to produce and stream great HD video in the Flash player and Flex.</p>
<p><a target="_blank" href="http://link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741160953?src=mrss" rel="nofollow" onclick="pageTracker._trackPageview('/outgoing/link.brightcove.com/services/link/bcpid1733261879/bclid1729365228/bctid1741160953?src=mrss&amp;referer=');"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/11/flex-con/10.jpg" alt="" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.motocms.com/blog/flash-software/flex-san-jose-conference/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Papervision 3D Flash Gallery Tutorial</title>
		<link>http://www.motocms.com/blog/flash-galleries/papervision3d-flash-gallery-tutorial/</link>
		<comments>http://www.motocms.com/blog/flash-galleries/papervision3d-flash-gallery-tutorial/#comments</comments>
		<pubDate>Thu, 13 Nov 2008 06:46:03 +0000</pubDate>
		<dc:creator>Admin</dc:creator>
				<category><![CDATA[Flash Galleries]]></category>
		<category><![CDATA[Flash Software]]></category>
		<category><![CDATA[gallery]]></category>
		<category><![CDATA[papervision]]></category>
		<category><![CDATA[tutorial]]></category>

		<guid isPermaLink="false">http://www.motocms.com/?p=104</guid>
		<description><![CDATA[<a href="http://www.motocms.com/blog/flash-galleries/papervision3d-flash-gallery-tutorial/"><img src="http://www.motocms.com/wp-content/uploads/2008/11/009-150x150.jpg" title="" alt="" /></a>
In our previous posts we have considered several examples of creating really cool Flash Galleries with the help of 3D. In this tutorial we’ll try to build a Flash Gallery using Papervison 3D. At the same time we would like to discuss all contradictory questions one may face while working with Papervision 3D.]]></description>
			<content:encoded><![CDATA[<p>In our previous posts we have considered several examples of creating really cool Flash Galleries with the help of 3D. As promised, today I’ll try to explain how to make <a title="Papervision Gallery" href="http://www.motocms.com/blog/flash-galleries/papervision-3d-flash-gallery/">papervision gallery</a>. At the end we’ll get something like this – awesome <a href="http://www.motocms.com/wp-content/uploads/2008/11/papervision-gallery-project/index.html" target="_blank">papervision flash gallery</a>. Probably at this stage the gallery looks a bit unfinished, one would wish to add progress bars for the images, image names and descriptions, navigation buttons next &amp; previous, and etc. I’d like to cheer you up by saying it’s just the beginning. In this tutorial we’ll try to write the basics, that is to say an engine for our application. Over the next several steps we&#8217;ll add functionality to this gallery. Note we plan to write more tutorials based on this example.</p>
<p>In this tutorial we’ll try to build a Flash Gallery using Papervison 3D. First of all I’d like to mention that the main aim of this article is passing through all stages of flash application development.  At the same time we would like to discuss all contradictory questions one may face while working with Papervision 3D.  More likely this tutorial will consist of several parts. Together with Papervision 3D library we’ll use <a rel="nofollow" href="http://osflash.org/tweener" target="_blank" onclick="pageTracker._trackPageview('/outgoing/osflash.org/tweener?referer=');">Tweener</a> for a better smooth animation and <a rel="nofollow" href="http://code.google.com/p/bulk-loader/" target="_blank" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/bulk-loader/?referer=');">BulkLoader</a> for a better image preloading.</p>
<p>You’ll need this archive in order to through this tutorial. This archive includes all libraries and applications which are necessary for the final swf creation. Flash CS3 or Flex Builder to be exact. If you know what Flex SDK is and you work with its compiler this archive is really useful for you. There is a lot of information regarding Papervision 3d on the net. You can easily find tutorials which teach how to download and install Papervision 3d and other libraries, how to adjust classpaths, and etc. It’s beside our purpose. Simply download this archive. Note you can use its structure and libraries like a start point for the other projects.</p>
<p style="text-align: center;"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/11/papervision-gallery-code.jpg" alt="Papervision3D gallery" /></p>
<p>Tutorial difficulty level: Basic-Intermediate. We suppose even those of you who are the beginners in Actionscript 3.0 will do this tutorial with awesome results.</p>
<p>If you still wish to download and install Papervision 3d by yourself these links may be useful for you: <a rel="nofollow" href="http://www.madvertices.com/2008/01/papervision-3d-training-videos.html" target="_blank" onclick="pageTracker._trackPageview('/outgoing/www.madvertices.com/2008/01/papervision-3d-training-videos.html?referer=');">Papervision 3D Training Videos</a> and <a rel="nofollow" href="http://archive.pv3d.org/?page_id=29" target="_blank" onclick="pageTracker._trackPageview('/outgoing/archive.pv3d.org/?page_id=29&amp;referer=');">PV3d 2.0 Tutorial List</a>. Having followed these links you can find a lot of interesting tutorials on this application and learn the way it works.</p>
<p>One more thing to mention: in this tutorial we deal with the second version of Papervision 3d. Note this version of Papervision 3d hasn’t been released yet.</p>
<p><strong>1. Initial configuration</strong></p>
<p>So, at the very beginning you should download <a href="http://www.motocms.com/wp-content/uploads/2008/11/papervision-gallery-project/galleryProject_final.zip">papervision gallery source</a> the archive which includes an initial project. Having unpacked the archive you should see the next file structure:<br />
<strong></strong></p>
<p style="padding-left: 30px;"><strong>src </strong>– all necessary “as” files such as Papervision3d, Tweener and BulkLoader will be stored here. These are the libraries we’ll use in order to create the gallery.  All the files we create will be added here as well. Gallery Project is a basic class which is used as Document Class in Flash CS3 and it’s being compiled while creating swf file.  So I’ve put it into root. The other files we create for this project will be stored here  com/flashmoto/gallery.</p>
<p style="padding-left: 30px;"><strong>fla </strong>– this folder will include fla files. It already includes GalleryProject.fla with changed settings: the folder ../src is added to classpath, Document Class is GalleryProject.as<br />
<strong></strong></p>
<p style="padding-left: 30px;"><strong>bin </strong>– the application called GalleryProject.swf is stored here. All xml files and images that make an application work are kept here as well. Saving your time I’ve already created an xml file with images data. All images are stores in images folder.</p>
<p>For the beginning let’s start compiling the application. As I’ve already mentioned there are two ways of compilation: using Flash CS3 and on your own (means using Flex SDK compiler). As a rule experienced users apply Flex SDK compiler while creating Flash movies. They definitely know what one should do with the source code in order to get a working swf. So I’ll describe how you can compile movie in Flash CS3.  To do so I should run GalleryProject.fla from the fla folder and compile the movie having clicked Ctrl+Enter. In the flash output panel you should see something like this &#8211; Welcome to our 3D gallery!</p>
<p style="text-align: center;"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/11/papervision-gallery-01.jpg" alt="Papervision3D gallery" /></p>
<p><strong>2. Problem Description</strong></p>
<p>Let’s build a gallery by following our step-by -step guide. First of all we should decide what to do. So our main tasks are:</p>
<p style="padding-left: 30px;">-  Application Initialization<br />
-  Application Initialization<br />
-  Loading XML Data<br />
-  Loading Images<br />
-  3D Engine Initialization<br />
-  3D Objects Creation<br />
-  Adding Objects to the Stage<br />
-  Adding Interactivity</p>
<p><strong>3. Application Initialization</strong></p>
<p>Let’s open file named src/GalleryProject.as. If you’ve noticed it is set as the Document Class in publish settings of the fla file. So the code which is inside GalleryProject functon (constructor) runs after the application has been launched. As for the start let’s set some stage properties &#8211; align and scaleMode.</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">StageAlign</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">StageScaleMode</span>;<br />
<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> GalleryProject <span style="color: #0066CC;">extends</span> Sprite<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> GalleryProject<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Set some stage properties</span><br />
<span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">align</span> = StageAlign.<span style="color: #006600;">TOP</span>;<br />
<span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">scaleMode</span> = StageScaleMode.<span style="color: #006600;">NO_SCALE</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p>Now we should create another class that will be responsible for gallery creation. It’s the right approach if we want to use it for any of our future applications. Considering the fact that it’ll be an ordinary Sprite we can add it anywhere using addChild() method. We can also change different parameters for its positioning.</p>
<p>Let’s create class called Gallery.as in the src/com/flashmoto/gallery folder. At first it will look this way.</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package com.<span style="color: #006600;">flashmoto</span>.<span style="color: #006600;">gallery</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Gallery <span style="color: #0066CC;">extends</span> Sprite<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">/**<br />
* Gallery Constructor<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Gallery<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p>And we can now add the gallery to our application. To accomplish this we should add some lines to our main file called GalleryProject.as:</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">flashmoto</span>.<span style="color: #006600;">gallery</span>.<span style="color: #006600;">Gallery</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">StageAlign</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">StageScaleMode</span>;<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> GalleryProject <span style="color: #0066CC;">extends</span> Sprite<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> GalleryProject<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Set some stage properties</span><br />
<span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">align</span> = StageAlign.<span style="color: #006600;">TOP</span>;<br />
<span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">scaleMode</span> = StageScaleMode.<span style="color: #006600;">NO_SCALE</span>;<br />
<span style="color: #808080; font-style: italic;">// Create gallery</span><br />
<span style="color: #000000; font-weight: bold;">var</span> gallery:Gallery = <span style="color: #000000; font-weight: bold;">new</span> Gallery<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
addChild<span style="color: #66cc66;">&#40;</span> gallery <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p>All changes are marked with bold type. I always dislike when tutorials which include source code write new lines or code changes separately from the whole class which requires these changes.) It’s always confusing and time taking process to deal with such code. I prefer using more traffic but seeing how the source code receives new functions and expressions with every step I make.</p>
<p>In order to use Gallery class we need to import it first. If you want to make sure that the code is working and the gallery has been really added you can write trace (&#8216;This is your gallery&#8217;) into the gallery class constructor and you’ll see this message in the flash output panel.<br />
Ok, let’s go to the next stage.</p>
<p><strong>4.  Loading XML Data</strong></p>
<p>Now we should get information regarding images and where they should be taken from for download. Of course there is a simpler way to define them as constants directly in our code. Though, this way isn’t very flexible. So all information will be stored in XML file. (If you want to read more about this format you should read <a rel="nofollow" href="http://en.wikipedia.org/wiki/XML" onclick="pageTracker._trackPageview('/outgoing/en.wikipedia.org/wiki/XML?referer=');">Wiki</a>! <img src='http://www.motocms.com/wp-includes/images/smilies/icon_smile.gif' alt=':-)' class='wp-smiley' />  ). At the fist stage all we need is an image file path. So XML file will look like this. (Finished file can be found here: xml/gallery.xml)</p>
<p style="text-align: center;"><img class="aligncenter" src="http://www.motocms.com/wp-content/uploads/2008/11/papervision-gallery-02.jpg" alt="Papervision 3D gallery" /></p>
<p>For xml file and images loading I’ll use <a rel="nofollow" href="http://code.google.com/p/bulk-loader/" onclick="pageTracker._trackPageview('/outgoing/code.google.com/p/bulk-loader/?referer=');">BulkLoader</a>. Let’s add a few function called loadImagesData() which will be called from the Gallery constructor. In this function we’ll initialize a new loader. Having added our xml file to this loader we’ll start to load images and listen for the loader’s progress, complete and error events. After you make the changes the class will look like this. As you’ve probably noticed a lot of new features and functions has appeared. I did my best to write the comprehensive comments for each feature and function, and in front of every line. So I don’t think it’s necessary to describe them in a more detailed way. Just have a look at the code we’ve created.</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package com.<span style="color: #006600;">flashmoto</span>.<span style="color: #006600;">gallery</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">import</span> br.<span style="color: #006600;">com</span>.<span style="color: #006600;">stimuli</span>.<span style="color: #006600;">loading</span>.<span style="color: #006600;">BulkErrorEvent</span>;<br />
<span style="color: #0066CC;">import</span> br.<span style="color: #006600;">com</span>.<span style="color: #006600;">stimuli</span>.<span style="color: #006600;">loading</span>.<span style="color: #006600;">BulkLoader</span>;<br />
<span style="color: #0066CC;">import</span> br.<span style="color: #006600;">com</span>.<span style="color: #006600;">stimuli</span>.<span style="color: #006600;">loading</span>.<span style="color: #006600;">BulkProgressEvent</span>;<br />
<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;<br />
<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;<br />
<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Gallery <span style="color: #0066CC;">extends</span> Sprite<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">/**<br />
* Loader for the gallery xml and gallery images<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> loader:BulkLoader;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Collection of images urls<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> galleryImagesCollection:<span style="color: #0066CC;">Array</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Flag that indicates if xml is loaded<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _galleryXMLLoaded:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Path to the gallery xml file<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const GALLERY_XML:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">'xml/gallery.xml'</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Gallery Constructor<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Gallery<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Load images data</span><br />
loadImagesData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Loads images data from xml file.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> loadImagesData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Create new loader</span><br />
loader = <span style="color: #000000; font-weight: bold;">new</span> BulkLoader<span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'galleryLoader'</span> <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">// Loader events</span><br />
loader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>BulkLoader.<span style="color: #006600;">COMPLETE</span>,<br />
onGalleryLoaded<span style="color: #66cc66;">&#41;</span>;<br />
loader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>BulkLoader.<span style="color: #006600;">PROGRESS</span>,<br />
onGalleryLoadingProgress<span style="color: #66cc66;">&#41;</span>;<br />
loader.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>BulkErrorEvent.<span style="color: #0066CC;">ERROR</span>,<br />
onGalleryLoadingError<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">// Add gallery xml to the quenue</span><br />
loader.<span style="color: #0066CC;">add</span><span style="color: #66cc66;">&#40;</span> GALLERY_XML <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">// Start loading</span><br />
loader.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Parses gallery xml file and starts images loading process.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoaded<span style="color: #66cc66;">&#40;</span> event:Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Start loading images</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Shows loader progress info.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoadingProgress<span style="color: #66cc66;">&#40;</span><br />
event:BulkProgressEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Show gallery xml loading progress</span><br />
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'Loading XML: '</span> + event.<span style="color: #006600;">percentLoaded</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">100</span> + <span style="color: #ff0000;">'%'</span> <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Shows loader error info.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoadingError<span style="color: #66cc66;">&#40;</span><br />
event:BulkErrorEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'ERROR: Data xml loading failed.'</span> <span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p><strong>5. Loading Images</strong></p>
<p>Now we have all image files paths. So we can load images. We have two variants to load images – loading all the images and then adding them to the stage or making the user tired showing a procedure of image load.  For the beginning we’ll follow an easier way and choose the first variant. We’ll add several lines to the methods we already have. Now we should parse loaded xml, choose image file paths and upload the images. Loading status information can be received via onGalleryLoadingProgress method. At this very stage I’ve simply traced this information to the output panel.</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package com.<span style="color: #006600;">flashmoto</span>.<span style="color: #006600;">gallery</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Import statements ...</span><br />
<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Gallery <span style="color: #0066CC;">extends</span> Sprite<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">/**<br />
* Loader for the gallery xml and gallery images<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> loader:BulkLoader;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Collection of images urls<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> galleryImagesCollection:<span style="color: #0066CC;">Array</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Flag that indicates if xml is loaded<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _galleryXMLLoaded:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Path to the gallery xml file<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const GALLERY_XML:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">'xml/gallery.xml'</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Gallery Constructor<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Gallery<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Load images data</span><br />
loadImagesData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Loads images data from xml file.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> loadImagesData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Parses gallery xml file and starts images loading process.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoaded<span style="color: #66cc66;">&#40;</span> event:Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">!</span>_galleryXMLLoaded <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Parse loaded gallery xml</span><br />
galleryImagesCollection = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #000000; font-weight: bold;">var</span> galleryImagesData:<span style="color: #0066CC;">XML</span> = loader.<span style="color: #006600;">getXML</span><span style="color: #66cc66;">&#40;</span><br />
GALLERY_XML, <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #b1b100;">for</span> <span style="color: #b1b100;">each</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> image:<span style="color: #0066CC;">XML</span> <span style="color: #b1b100;">in</span><br />
galleryImagesData.<span style="color: #006600;">elements</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">var</span> imageSrc:<span style="color: #0066CC;">String</span> = image.<span style="color: #66cc66;">@</span>src.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> imageSrc <span style="color: #66cc66;">&amp;</span>amp;<span style="color: #66cc66;">&amp;</span>amp; imageSrc.<span style="color: #0066CC;">length</span> <span style="color: #66cc66;">&amp;</span>gt; <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
galleryImagesCollection.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span> imageSrc <span style="color: #66cc66;">&#41;</span>;<br />
loader.<span style="color: #0066CC;">add</span><span style="color: #66cc66;">&#40;</span> imageSrc <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
_galleryXMLLoaded = <span style="color: #000000; font-weight: bold;">true</span>;<br />
<span style="color: #808080; font-style: italic;">// Start loading images</span><br />
loader.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// TODO: Init 3D components</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Shows loader progress info.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoadingProgress<span style="color: #66cc66;">&#40;</span><br />
event:BulkProgressEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">!</span>_galleryXMLLoaded <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Show gallery xml loading progress</span><br />
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'Loading XML: '</span> +<br />
event.<span style="color: #006600;">percentLoaded</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">100</span> + <span style="color: #ff0000;">'%'</span> <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Show images loading progress</span><br />
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'Loading image: '</span> + event.<span style="color: #006600;">itemsLoaded</span> + <span style="color: #ff0000;">'/'</span> +<br />
event.<span style="color: #006600;">itemsTotal</span> + <span style="color: #ff0000;">',<br />
'</span> + event.<span style="color: #006600;">percentLoaded</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">100</span> + <span style="color: #ff0000;">'%'</span> <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Shows loader error info.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoadingError<span style="color: #66cc66;">&#40;</span><br />
event:BulkErrorEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">!</span>_galleryXMLLoaded <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'ERROR: Data xml loading failed.'</span> <span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span> <span style="color: #ff0000;">'ERROR: Images loading failed.'</span> <span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p>So we are close to Papervision3d. Let’s start…</p>
<p><strong>6.  3D Engine Initialization</strong></p>
<p>In order to use Papervision3d while moving objects in 3d space we should initialize 3D engine first and create all necessary flash components such as viewport, camera, scene and renderer. Let’s write a new function called init3DEngine(). We’ll write a new function named init3DEngine() which will be called in onGalleryLoaded() method after the download has been finished.<span style="text-decoration: underline;"> </span></p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package com.<span style="color: #006600;">flashmoto</span>.<span style="color: #006600;">gallery</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Import statements ...</span><br />
<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Gallery <span style="color: #0066CC;">extends</span> Sprite<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">/**<br />
* Loader for the gallery xml and gallery images<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> loader:BulkLoader;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Papervision3d components - Viewport<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> viewport:Viewport3D;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Papervision3d components - Scene<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> scene:Scene3D;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Papervision3d components - Camera<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">camera</span>:Camera3D;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Papervision3d components - BasicRenderEngine<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> renderer:BasicRenderEngine;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Collection of images urls<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> galleryImagesCollection:<span style="color: #0066CC;">Array</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Flag that indicates if xml is loaded<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _galleryXMLLoaded:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Path to the gallery xml file<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const GALLERY_XML:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">'xml/gallery.xml'</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Viewport width<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const VIEWPORT_WIDTH:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">800</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Viewport &nbsp;height<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const VIEWPORT_HEIGHT:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">800</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Gallery Constructor<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Gallery<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Load images data</span><br />
loadImagesData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Loads images data from xml file.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> loadImagesData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Parses gallery xml file and starts images loading process.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoaded<span style="color: #66cc66;">&#40;</span> event:Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">!</span>_galleryXMLLoaded <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Parse loaded gallery xml</span><br />
galleryImagesCollection = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #000000; font-weight: bold;">var</span> galleryImagesData:<span style="color: #0066CC;">XML</span> = loader.<span style="color: #006600;">getXML</span><span style="color: #66cc66;">&#40;</span><br />
GALLERY_XML, <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #b1b100;">for</span> <span style="color: #b1b100;">each</span> <span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> image:<span style="color: #0066CC;">XML</span> <span style="color: #b1b100;">in</span><br />
galleryImagesData.<span style="color: #006600;">elements</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #000000; font-weight: bold;">var</span> imageSrc:<span style="color: #0066CC;">String</span> = image.<span style="color: #66cc66;">@</span>src.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> imageSrc <span style="color: #66cc66;">&amp;</span>amp;<span style="color: #66cc66;">&amp;</span>amp; imageSrc.<span style="color: #0066CC;">length</span> <span style="color: #66cc66;">&amp;</span>gt; <span style="color: #cc66cc;">0</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
galleryImagesCollection.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span> imageSrc <span style="color: #66cc66;">&#41;</span>;<br />
loader.<span style="color: #0066CC;">add</span><span style="color: #66cc66;">&#40;</span> imageSrc <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
_galleryXMLLoaded = <span style="color: #000000; font-weight: bold;">true</span>;<br />
<span style="color: #808080; font-style: italic;">// Start loading images</span><br />
loader.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Init 3D components</span><br />
init3DEngine<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Shows loader progress info.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoadingProgress<span style="color: #66cc66;">&#40;</span><br />
event:BulkProgressEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Shows loader error info.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoadingError<span style="color: #66cc66;">&#40;</span><br />
event:BulkErrorEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Inits 3D engine. Creates viewport, scene, camera and<br />
* renderer and also creates and adds scene objects.<br />
* Creates event listener for the enter frame event for<br />
* the scene rendering.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> init3DEngine<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Create viewport</span><br />
viewport = <span style="color: #000000; font-weight: bold;">new</span> Viewport3D<span style="color: #66cc66;">&#40;</span> VIEWPORT_WIDTH,<br />
VIEWPORT_HEIGHT, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span>;<br />
addChild<span style="color: #66cc66;">&#40;</span> viewport <span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Create scene</span><br />
scene = <span style="color: #000000; font-weight: bold;">new</span> Scene3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Create camera and set its zoom and focus</span><br />
<span style="color: #0066CC;">camera</span> = <span style="color: #000000; font-weight: bold;">new</span> Camera3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">zoom</span> = <span style="color: #cc66cc;">5</span>;<br />
<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">focus</span> = <span style="color: #cc66cc;">100</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Create BasicRenderEngine</span><br />
renderer = <span style="color: #000000; font-weight: bold;">new</span> BasicRenderEngine<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p>As you can see some new features including two constants such as VIEWPORT_WIDTH and VIEWPORT_HEIGHT have been added. These constants define render area. Seems it would be better to define them while creating Gallery object. I think we’ll correct it a bit later. The case is that at this stage we have the other tasks. The same relates to other engine configurations such as camera zoom and focus, viewport scaling and interactivity. It would be better to change them dynamically from an external text file. I think we’ll do it for sure.</p>
<p><strong>7.  3D Objects Creation</strong></p>
<p>Now we should create objects in order to add them to the stage. Of course we could add them at once. It would make the code simpler but we’ll not go this way. One should understand that the application gains its flexibility thanks to dynamic object placement. So I recommend separating these two actions from the very beginning.  At first we’ll create objects and then set their positions. For this we should update our class a little bit:</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package com.<span style="color: #006600;">flashmoto</span>.<span style="color: #006600;">gallery</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Import statements ...</span><br />
<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Gallery <span style="color: #0066CC;">extends</span> Sprite<br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Collection of images urls<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> galleryImagesCollection:<span style="color: #0066CC;">Array</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Collection of gallery planes to be added to the scene<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> galleryPlanesCollection:<span style="color: #0066CC;">Array</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Flag that indicates if xml is loaded<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _galleryXMLLoaded:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;<br />
<br />
...<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Gallery Constructor<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Gallery<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Load images data</span><br />
loadImagesData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Loads images data from xml file.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> loadImagesData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Parses gallery xml file and starts images loading process.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoaded<span style="color: #66cc66;">&#40;</span> event:Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Shows loader progress info.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoadingProgress<span style="color: #66cc66;">&#40;</span><br />
event:BulkProgressEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Shows loader error info.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoadingError<span style="color: #66cc66;">&#40;</span><br />
event:BulkErrorEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Inits 3D engine. Creates viewport, scene, camera and<br />
* renderer and also creates and adds scene objects.<br />
* Creates event listener for the enter frame event for<br />
* the scene rendering.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> init3DEngine<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Create viewport</span><br />
viewport = <span style="color: #000000; font-weight: bold;">new</span> Viewport3D<span style="color: #66cc66;">&#40;</span> VIEWPORT_WIDTH,<br />
VIEWPORT_HEIGHT, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span>;<br />
addChild<span style="color: #66cc66;">&#40;</span> viewport <span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Create scene</span><br />
scene = <span style="color: #000000; font-weight: bold;">new</span> Scene3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Create camera and set its zoom and focus</span><br />
<span style="color: #0066CC;">camera</span> = <span style="color: #000000; font-weight: bold;">new</span> Camera3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">zoom</span> = <span style="color: #cc66cc;">5</span>;<br />
<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">focus</span> = <span style="color: #cc66cc;">100</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Create BasicRenderEngine</span><br />
renderer = <span style="color: #000000; font-weight: bold;">new</span> BasicRenderEngine<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Create Gallery Planes</span><br />
createGalleryImages<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Creates display objects from loaded images and updates<br />
* gallery objects collection.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createGalleryImages<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
galleryPlanesCollection = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">// Go through all images and create planes</span><br />
<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i:uint=<span style="color: #cc66cc;">0</span>; i<br />
<span style="color: #000000; font-weight: bold;">var</span> galleryPlane:DisplayObject3D =<br />
createGalleryDisplayObject<span style="color: #66cc66;">&#40;</span><br />
galleryImagesCollection<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">// Add plane to collection</span><br />
galleryPlanesCollection.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span> galleryPlane <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Creates gallery 3D object using loaded image bitmap.<br />
*<br />
* The method returns DisplayObject3D object, and gallery<br />
* do not need to know if there is a plane, cube or sphere,<br />
* so later I can rewrite this method to create any objects<br />
* needed.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createGalleryDisplayObject<span style="color: #66cc66;">&#40;</span><br />
image:<span style="color: #0066CC;">String</span> <span style="color: #66cc66;">&#41;</span>:DisplayObject3D<br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Get loaded image bitmap using loader getBitmap method</span><br />
<span style="color: #000000; font-weight: bold;">var</span> bitmap:Bitmap = loader.<span style="color: #006600;">getBitmap</span><span style="color: #66cc66;">&#40;</span> image <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #000000; font-weight: bold;">var</span> bitmapHolder:Sprite = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
bitmapHolder.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span> bitmap <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">// Create movie material for the plane</span><br />
<span style="color: #000000; font-weight: bold;">var</span> material:MovieMaterial =<br />
<span style="color: #000000; font-weight: bold;">new</span> MovieMaterial<span style="color: #66cc66;">&#40;</span>bitmapHolder<span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">// Use new material rect property to crop image if it is</span><br />
<span style="color: #808080; font-style: italic;">// larger that plane's dimensions</span><br />
material.<span style="color: #006600;">rect</span> = <span style="color: #000000; font-weight: bold;">new</span> Rectangle<span style="color: #66cc66;">&#40;</span> <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, GALLERY_PLANE_WIDTH,<br />
GALLERY_PLANE_HEIGHT <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">// Make material double sided and interactive</span><br />
material.<span style="color: #006600;">doubleSided</span> = <span style="color: #000000; font-weight: bold;">true</span>;<br />
material.<span style="color: #006600;">interactive</span> = <span style="color: #000000; font-weight: bold;">true</span>;<br />
<span style="color: #808080; font-style: italic;">// Create and return plane</span><br />
<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">new</span> Plane<span style="color: #66cc66;">&#40;</span> material, GALLERY_PLANE_WIDTH,<br />
GALLERY_PLANE_HEIGHT, GALLERY_PLANE_SEGMENTS_W,<br />
GALLERY_PLANE_SEGMENTS_H <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p>As you see a method called createGalleryDisplayObject() creates a 3D object and this objects isn’t for sure a Plane. It can be any object. So in a case we wish to draw spheres instead of planes we’ll basically have to rewrite this method.</p>
<p><strong>8. Adding Objects to the Stage</strong></p>
<p>As I’ve already mentioned I comment the code without explaining what should be done and how to do it because our code already goes with comprehensive comments. Almost every code line has its own description. So read the code attentively and comment this tutorial in a case you have any questions. I’ll be more than happy to answer your questions.</p>
<p>So we have a collection of 3D objects which can be added to the stage and placed in a way we wish. In the future I plan to update this example in order to develop several image placement strategies. So we could dynamically change the gallery appearance. At the first stage you can see the first variant: I’ve placed images one by one. Let’s add new method called addGalleryImages()</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package com.<span style="color: #006600;">flashmoto</span>.<span style="color: #006600;">gallery</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Import statements ...</span><br />
<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Gallery <span style="color: #0066CC;">extends</span> Sprite<br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Collection of gallery planes to be added to the scene<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> galleryPlanesCollection:<span style="color: #0066CC;">Array</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Collection of scene gallery planes<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">var</span> galleryPlanes:<span style="color: #0066CC;">Array</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Flag that indicates if xml is loaded<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _galleryXMLLoaded:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Holder for the gallery planes<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _planesHolder:DisplayObject3D;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Path to the gallery xml file<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const GALLERY_XML:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">'xml/gallery.xml'</span>;<br />
<br />
...<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Gallery Constructor<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Gallery<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Load images data</span><br />
loadImagesData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Loads images data from xml file.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> loadImagesData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Parses gallery xml file and starts images loading process.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoaded<span style="color: #66cc66;">&#40;</span> event:Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Shows loader progress info.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoadingProgress<span style="color: #66cc66;">&#40;</span><br />
event:BulkProgressEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Shows loader error info.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoadingError<span style="color: #66cc66;">&#40;</span><br />
event:BulkErrorEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Inits 3D engine. Creates viewport, scene, camera and<br />
* renderer and also creates and adds scene objects.<br />
* Creates event listener for the enter frame event for<br />
* the scene rendering.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> init3DEngine<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Create viewport</span><br />
viewport = <span style="color: #000000; font-weight: bold;">new</span> Viewport3D<span style="color: #66cc66;">&#40;</span> VIEWPORT_WIDTH,<br />
VIEWPORT_HEIGHT, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span>;<br />
addChild<span style="color: #66cc66;">&#40;</span> viewport <span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Create scene</span><br />
scene = <span style="color: #000000; font-weight: bold;">new</span> Scene3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Create camera and set its zoom and focus</span><br />
<span style="color: #0066CC;">camera</span> = <span style="color: #000000; font-weight: bold;">new</span> Camera3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">zoom</span> = <span style="color: #cc66cc;">5</span>;<br />
<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">focus</span> = <span style="color: #cc66cc;">100</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Create BasicRenderEngine</span><br />
renderer = <span style="color: #000000; font-weight: bold;">new</span> BasicRenderEngine<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Create Gallery Planes</span><br />
createGalleryImages<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Add Gallery Planes to the scene</span><br />
addGalleryImages<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Creates display objects from loaded images and updates<br />
* gallery objects collection.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createGalleryImages<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Creates gallery 3D object using loaded image bitmap.<br />
*<br />
* The method returns DisplayObject3D object, and gallery<br />
* do not need to know if there is a plane, cube or sphere,<br />
* so later I can rewrite this method to create any objects<br />
* needed.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createGalleryDisplayObject<span style="color: #66cc66;">&#40;</span><br />
image:<span style="color: #0066CC;">String</span> <span style="color: #66cc66;">&#41;</span>:DisplayObject3D<br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Adds gallery display objects to the scene and arranges<br />
* them. Later I will add more arrangent strategies to<br />
* this application, and all I need to do is to update<br />
* this method which will get the stategy name as<br />
* parameter.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> addGalleryImages<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Create holder for the gallery objects</span><br />
_planesHolder = <span style="color: #000000; font-weight: bold;">new</span> DisplayObject3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span> _planesHolder <span style="color: #66cc66;">&#41;</span>;<br />
<br />
galleryPlanes = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Add gallery planes</span><br />
<span style="color: #000000; font-weight: bold;">var</span> flag:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">1</span>;<br />
<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i:uint=<span style="color: #cc66cc;">0</span>; i<br />
<span style="color: #000000; font-weight: bold;">var</span> galleryPlane:Plane = galleryPlanesCollection<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><br />
as Plane;<br />
galleryPlane.<span style="color: #006600;">z</span> = _firstPlaneZ + i<span style="color: #66cc66;">*</span><span style="color: #cc66cc;">200</span>;<br />
galleryPlane.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">5000</span><span style="color: #66cc66;">*</span>flag;<br />
galleryPlanes.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>_planesHolder.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span><br />
galleryPlane<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;<br />
flag <span style="color: #66cc66;">*</span>= -<span style="color: #cc66cc;">1</span>;<br />
Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span> galleryPlane, <span style="color: #66cc66;">&#123;</span><br />
x: <span style="color: #cc66cc;">0</span>,<br />
<span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">2</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#40;</span>galleryPlanesCollection.<span style="color: #006600;">length</span>-i<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">20</span>+<span style="color: #cc66cc;">1</span>,<br />
transition:<span style="color: #ff0000;">&quot;easeOutBack&quot;</span><br />
<span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p><strong>9. Adding Interactivity</strong></p>
<p>The last thing that should be added is interactivity. Seems it should be described in detail.</p>
<p>The first thing you should do to see the objects that have been added to the stage is rendering the stage. In Papervision3d you can do it with this code</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">renderer.<span style="color: #006600;">renderScene</span><span style="color: #66cc66;">&#40;</span> scene, <span style="color: #0066CC;">camera</span>, viewport <span style="color: #66cc66;">&#41;</span>;</div></div>
<p>as you see all 3D engine elements are activated in this code. Having executed this code you’ll see what is added to your stage. However you should remember one thing &#8211; without calling this method you won&#8217;t see such changes as:</p>
<p style="padding-left: 30px;">- changing object location or object properties;<br />
- changing camera position or rotation;<br />
- refreshing something.</p>
<p>Basically it’s called on every onEnterFrame event, but it’s sometimes difficult for browser to accomplish this. Especially if you have a lot of objects and refining or you need fast rendering and good quality graphics.) So Flash developers find various ways to optimize the application. Having analyzed different requirements they define if a stage should be rendered at the moment or not. If to speak about our example the stage should be rendered every moment because our main aim is camera and mouse interaction. So we should continually refresh the image. In the future I’ll add a requirement to avoid such rendering. For instance in a case we’ve clicked the first image and it has been enlarged.</p>
<p>Papervision uses InteractiveScene3DEvent in order to respond to such mouse events as hitting, pointing and tracking. Note if you want these events work the object material and viewpoint should be interactive.</p>
<p>Material has an interactive feature to accomplish this</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">material.<span style="color: #006600;">interactive</span> = <span style="color: #000000; font-weight: bold;">true</span>;</div></div>
<p>Viewport has this feature as well. We set its value while creating – the 4th parameter = true</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">viewport = <span style="color: #000000; font-weight: bold;">new</span> Viewport3D<span style="color: #66cc66;">&#40;</span>VIEWPORT_WIDTH, VIEWPORT_HEIGHT, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;</div></div>
<p>Of course adding interactivity isn’t limited to listening for the mouse events only. It also includes response to these events. This is the way logic is added to the code. Note logic is an inseparable part of the application.</p>
<p>It’s time for the most interesting part which can be difficult for an ordinary animator. So this part is usually done by a Flash programmer. Considering the fact that our tutorial relates to Papervision 3d I suggest you to explore application logic by yourself. Note all application logic is described in event listener handlers such as onPlanePress(), onPlaneOver(), onPlaneOut(). Camera moving logic is described in render() method.</p>
<p>Here is the final code. Let’s try to compile it. You should succeed!</p>
<div class="codecolorer-container actionscript default" style="overflow:auto;white-space:nowrap;border:1px solid #9F9F9F;width:435px;height:300px;"><div class="actionscript codecolorer" style="padding:5px;font:normal 12px/1.4em Monaco, Lucida Console, monospace;white-space:nowrap">package com.<span style="color: #006600;">flashmoto</span>.<span style="color: #006600;">gallery</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Import statements ...</span><br />
<br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Gallery <span style="color: #0066CC;">extends</span> Sprite<br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Holder for the gallery planes<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _planesHolder:DisplayObject3D;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Flag that indicates zoomed image state<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _imageZoomed:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Current plane ( first in the line ) index<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _currentPlaneIndex:uint = <span style="color: #cc66cc;">0</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* First plane z coordinate, planes shift<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _firstPlaneZ:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">0</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Flag that indicates if planes are moving<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _planesAreMoving:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">false</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Path to the gallery xml file<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const GALLERY_XML:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">'xml/gallery.xml'</span>;<br />
<br />
...<br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Gallery Constructor<br />
*/</span><br />
<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Gallery<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Load images data</span><br />
loadImagesData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Loads images data from xml file.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> loadImagesData<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Parses gallery xml file and starts images loading process.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoaded<span style="color: #66cc66;">&#40;</span> event:Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Shows loader progress info.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoadingProgress<span style="color: #66cc66;">&#40;</span><br />
event:BulkProgressEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Shows loader error info.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onGalleryLoadingError<span style="color: #66cc66;">&#40;</span><br />
event:BulkErrorEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Inits 3D engine. Creates viewport, scene, camera and<br />
* renderer and also creates and adds scene objects.<br />
* Creates event listener for the enter frame event for<br />
* the scene rendering.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> init3DEngine<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Create viewport</span><br />
viewport = <span style="color: #000000; font-weight: bold;">new</span> Viewport3D<span style="color: #66cc66;">&#40;</span> VIEWPORT_WIDTH,<br />
VIEWPORT_HEIGHT, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #000000; font-weight: bold;">true</span> <span style="color: #66cc66;">&#41;</span>;<br />
addChild<span style="color: #66cc66;">&#40;</span> viewport <span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Create scene</span><br />
scene = <span style="color: #000000; font-weight: bold;">new</span> Scene3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Create camera and set its zoom and focus</span><br />
<span style="color: #0066CC;">camera</span> = <span style="color: #000000; font-weight: bold;">new</span> Camera3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">zoom</span> = <span style="color: #cc66cc;">5</span>;<br />
<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">focus</span> = <span style="color: #cc66cc;">100</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Create BasicRenderEngine</span><br />
renderer = <span style="color: #000000; font-weight: bold;">new</span> BasicRenderEngine<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Create Gallery Planes</span><br />
createGalleryImages<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Add Gallery Planes to the scene</span><br />
addGalleryImages<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Render the scene every enter frame</span><br />
addEventListener<span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">ENTER_FRAME</span>, render <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Creates display objects from loaded images and updates<br />
* gallery objects collection.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createGalleryImages<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Creates gallery 3D object using loaded image bitmap.<br />
*<br />
* The method returns DisplayObject3D object, and gallery<br />
* do not need to know if there is a plane, cube or sphere,<br />
* so later I can rewrite this method to create any objects<br />
* needed.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> createGalleryDisplayObject<span style="color: #66cc66;">&#40;</span><br />
image:<span style="color: #0066CC;">String</span> <span style="color: #66cc66;">&#41;</span>:DisplayObject3D<br />
<span style="color: #66cc66;">&#123;</span><br />
...<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Adds gallery display objects to the scene and arranges<br />
* them. Later I will add more arrangent strategies to<br />
* this application, and all I need to do is to update<br />
* this method which will get the stategy name as<br />
* parameter.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> addGalleryImages<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Create holder for the gallery objects</span><br />
_planesHolder = <span style="color: #000000; font-weight: bold;">new</span> DisplayObject3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span> _planesHolder <span style="color: #66cc66;">&#41;</span>;<br />
<br />
galleryPlanes = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Array</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;<br />
<br />
<span style="color: #808080; font-style: italic;">// Add gallery planes</span><br />
<span style="color: #000000; font-weight: bold;">var</span> flag:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">1</span>;<br />
<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span> <span style="color: #000000; font-weight: bold;">var</span> i:uint=<span style="color: #cc66cc;">0</span>;<br />
i<br />
<span style="color: #000000; font-weight: bold;">var</span> galleryPlane:Plane =<br />
galleryPlanesCollection<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> as Plane;<br />
galleryPlane.<span style="color: #006600;">z</span> = _firstPlaneZ + i<span style="color: #66cc66;">*</span><span style="color: #cc66cc;">200</span>;<br />
galleryPlane.<span style="color: #006600;">x</span> = <span style="color: #cc66cc;">5000</span><span style="color: #66cc66;">*</span>flag;<br />
galleryPlanes.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span> _planesHolder.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span><br />
galleryPlane <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span>;<br />
flag <span style="color: #66cc66;">*</span>= -<span style="color: #cc66cc;">1</span>;<br />
Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span> galleryPlane, <span style="color: #66cc66;">&#123;</span><br />
x: <span style="color: #cc66cc;">0</span>,<br />
<span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">2</span><span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#40;</span>galleryPlanesCollection.<span style="color: #006600;">length</span>-i<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">20</span>+<span style="color: #cc66cc;">1</span>,<br />
transition:<span style="color: #ff0000;">&quot;easeOutBack&quot;</span><br />
<span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">// Listen for the events only from the first</span><br />
<span style="color: #808080; font-style: italic;">// gallery object</span><br />
galleryPlane =<br />
galleryPlanes<span style="color: #66cc66;">&#91;</span>_currentPlaneIndex<span style="color: #66cc66;">&#93;</span> as Plane;<br />
galleryPlane.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span><br />
InteractiveScene3DEvent.<span style="color: #006600;">OBJECT_PRESS</span>,<br />
onPlanePress <span style="color: #66cc66;">&#41;</span>;<br />
galleryPlane.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span><br />
InteractiveScene3DEvent.<span style="color: #006600;">OBJECT_OVER</span>,<br />
onPlaneOver <span style="color: #66cc66;">&#41;</span>;<br />
galleryPlane.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span><br />
InteractiveScene3DEvent.<span style="color: #006600;">OBJECT_OUT</span>,<br />
onPlaneOut <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Gallery plane mouse over event handler<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onPlaneOver<span style="color: #66cc66;">&#40;</span><br />
event:InteractiveScene3DEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Check for the app state</span><br />
<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">!</span>_imageZoomed <span style="color: #66cc66;">&amp;</span>amp;<span style="color: #66cc66;">&amp;</span>amp; <span style="color: #66cc66;">!</span>_planesAreMoving <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Tween plane</span><br />
<span style="color: #000000; font-weight: bold;">var</span> plane:Plane = event.<span style="color: #0066CC;">target</span> as Plane;<br />
Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span> plane, <span style="color: #66cc66;">&#123;</span><br />
z: _firstPlaneZ-<span style="color: #cc66cc;">200</span>,<br />
<span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">2</span>,<br />
transition:<span style="color: #ff0000;">&quot;easeInSin&quot;</span><br />
<span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Gallery plane mouse out event handler<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onPlaneOut<span style="color: #66cc66;">&#40;</span><br />
event:InteractiveScene3DEvent <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Check for the app state</span><br />
<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">!</span>_imageZoomed <span style="color: #66cc66;">&amp;</span>amp;<span style="color: #66cc66;">&amp;</span>amp; <span style="color: #66cc66;">!</span>_planesAreMoving <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Tween plane</span><br />
<span style="color: #000000; font-weight: bold;">var</span> plane:Plane = event.<span style="color: #0066CC;">target</span> as Plane;<br />
Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span> plane, <span style="color: #66cc66;">&#123;</span><br />
z: _firstPlaneZ,<br />
<span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">2</span>,<br />
transition:<span style="color: #ff0000;">&quot;easeInSin&quot;</span><br />
<span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<br />
<span style="color: #808080; font-style: italic;">/**<br />
* Renders the scene.<br />
*/</span><br />
<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> render<span style="color: #66cc66;">&#40;</span> event:Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><br />
<span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Check for the zoomed image state</span><br />
<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">!</span>_imageZoomed <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span><br />
<span style="color: #808080; font-style: italic;">// Calculate distances</span><br />
<span style="color: #000000; font-weight: bold;">var</span> xDist:<span style="color: #0066CC;">Number</span> =<br />
root.<span style="color: #006600;">mouseX</span> - <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">0.5</span>;<br />
<span style="color: #000000; font-weight: bold;">var</span> yDist:<span style="color: #0066CC;">Number</span> =<br />
root.<span style="color: #006600;">mouseY</span> - <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">0.5</span>;<br />
<span style="color: #000000; font-weight: bold;">var</span> newDist:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">round</span><span style="color: #66cc66;">&#40;</span><br />
<span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">sqrt</span><span style="color: #66cc66;">&#40;</span>xDist<span style="color: #66cc66;">*</span>xDist + yDist<span style="color: #66cc66;">*</span>yDist<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">0.08</span>;<br />
<span style="color: #808080; font-style: italic;">// Calculate camera rotation values</span><br />
<span style="color: #000000; font-weight: bold;">var</span> cameraRotationX : <span style="color: #0066CC;">Number</span> = -xDist <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">0.1</span>;<br />
<span style="color: #000000; font-weight: bold;">var</span> cameraRotationY : <span style="color: #0066CC;">Number</span> = yDist <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">0.1</span>;<br />
<span style="color: #000000; font-weight: bold;">var</span> cameraRotationZ : <span style="color: #0066CC;">Number</span> = <span style="color: #66cc66;">&#40;</span>xDist<span style="color: #66cc66;">*</span>yDist <span style="color: #66cc66;">&amp;</span>gt;= <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><br />
? -<span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">abs</span><span style="color: #66cc66;">&#40;</span>newDist<span style="color: #66cc66;">*</span><span style="color: #cc66cc;">0.1</span><span style="color: #66cc66;">&#41;</span> :<br />
<span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">abs</span><span style="color: #66cc66;">&#40;</span>newDist<span style="color: #66cc66;">*</span><span style="color: #cc66cc;">0.1</span><span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #808080; font-style: italic;">// Tween camera</span><br />
Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span> _planesHolder, <span style="color: #66cc66;">&#123;</span><br />
x: xDist,<br />
y: yDist,<br />
rotationY : cameraRotationX,<br />
rotationX : cameraRotationY,<br />
rotationZ : cameraRotationZ,<br />
<span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">1.2</span>,<br />
transition:<span style="color: #ff0000;">&quot;easeOutCubic&quot;</span><br />
<span style="color: #66cc66;">&#125;</span> <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #808080; font-style: italic;">// Render the scene</span><br />
renderer.<span style="color: #006600;">renderScene</span><span style="color: #66cc66;">&#40;</span> scene, <span style="color: #0066CC;">camera</span>, viewport <span style="color: #66cc66;">&#41;</span>;<br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span><br />
<span style="color: #66cc66;">&#125;</span></div></div>
<p>Please let me know if you have any questions regarding this tutorial. I’ll be pleased to answer them.</p>
<p><strong>10. Conclusion</strong></p>
<p>So we’ve finished a first pass through creating an interactive <a title="Papervision Flash Gallery" href="http://www.motocms.com/wp-content/uploads/2008/11/papervision-gallery-project/index.html">Papervision Flash Gallery</a>. If you are the beginner I advise you to download the <a href="http://www.motocms.com/wp-content/uploads/2008/11/papervision-gallery-project/galleryProject_final.zip">source project</a> and follow it step-by-step. Though, in a case you are an experienced user you can download the complete sources for the gallery.</p>
<p align="center"><a title="Papervision Gallery Source" href="http://www.motocms.com/wp-content/uploads/2008/11/papervision-gallery-project/galleryProject_final.zip"><img src="http://www.motocms.com/wp-content/uploads/2008/11/downloadSourceButton.jpg" alt="" /></a></p>
<p>This tutorial we’ll be of a great help for us in the future. It’ll help us explore the other 3D engine features. Also, I’d like to explore some ways to optimize Papervison3d applications and make them work faster. I plan to learn different ways of image positioning, navigation, dynamic gallery appearance and logic changing, creating reflections, mouse wheel navigation, and etc. New tutorials are waiting for you in the nearest future.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.motocms.com/blog/flash-galleries/papervision3d-flash-gallery-tutorial/feed/</wfw:commentRss>
		<slash:comments>46</slash:comments>
		</item>
	</channel>
</rss>

