<?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>hydrotik &#124; flash development &#124; actionscript &#124; creative &#187; Papervision</title>
	<atom:link href="http://blog.hydrotik.com/category/papervision/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.hydrotik.com</link>
	<description>actionscript and creative playground of Donovan Adams</description>
	<lastBuildDate>Tue, 04 May 2010 15:24:15 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.6</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>11 Must Have Flash Resources and 11 Must Have Utilities For 2009</title>
		<link>http://blog.hydrotik.com/2008/11/23/11-must-have-flash-resources-and-11-must-have-utilities-for-2009/</link>
		<comments>http://blog.hydrotik.com/2008/11/23/11-must-have-flash-resources-and-11-must-have-utilities-for-2009/#comments</comments>
		<pubDate>Mon, 24 Nov 2008 00:44:21 +0000</pubDate>
		<dc:creator>djdonovan</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Design]]></category>
		<category><![CDATA[FDT]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[GO]]></category>
		<category><![CDATA[Papervision]]></category>
		<category><![CDATA[QueueLoader]]></category>

		<guid isPermaLink="false">http://blog.hydrotik.com/?p=256</guid>
		<description><![CDATA[Here's my list of 11 shweet resources and utilities for Flash Developers for the upcoming year. Some of these will look familiar to you from 2008 and possibly even earlier, but their significance and continued development will see them into 2009 and beyond. With the release of CS4, expect to see upgrades and revitalization of [...]]]></description>
			<content:encoded><![CDATA[<p>Here's my list of 11 shweet resources and utilities for Flash Developers for the upcoming year. Some of these will look familiar to you from 2008 and possibly even earlier, but their significance and continued development will see them into 2009 and beyond. With the release of CS4, expect to see upgrades and revitalization of a number of projects as new features of the latest version of Flash are incorporated.</p>
<h4>Resources:</h4>
<p>
<strong>1. <a href="http://code.google.com/p/papervision3d/" target="_blank">Papervision 3D</a> + <a href="http://code.google.com/p/vectorvision/" target="_blank">VectorVision</a></strong><br />
Now that Papervision has taken hold of the Flash community, what next? I decided to add it to this list, as I believe 2009 to be the year of PV3D optimization and streamlining. With the new features of CS4, along with GPU processing being utilized for rendering outside of full-screen mode, the upcoming year will see those chugging experiments running smoother with significant FPS gains. In Flash 10, the Graphics.drawTriangles method gives us the ability to draw triangles using UV and UVW coordinates natively which will strip a lot of code out of the engine. This will help enable the team to squeeze every ounce of efficiency out of Papervision which is the key to Papervision evolving and making it a lasting tool. All that being said, expect to see more pushing of the envelope and more amazing experiments. Along with Papervision, I'm excited to see the evolution of Vectorvision, the vector based add-on to the Papervision library. Creating font class files that can then be used to create 3D display objects, gives us another color in the artists palette. I'm hoping to see more drawing capabilities added very soon.</p>
<p><strong>UPDATE</strong>: Vectorvision's Mark Barcinski is now a member of the Papervision team.   Vectorvision code will get folded into the library making things a bit more convenient with updates. Also Tim Knip has released a triangulation lib which makes it easy to convert a Vectorvision object to DisplayObject3D. This provides shading, texturing, and quadrant engine functionality. This will also lead the way for extrusion!</p>
<p><strong>2. <a href="http://www.ribbit.com/platform/" target="_blank">Ribbit</a></strong><br />
One of the coolest things to come out of 2008 is Ribbit. So cool, that I have also added it to my 2009 list. The creative possibilities with Ribbit are endless. Imagine plugging your Flash application into a phone jack. Keep an eye out for Ribbit's Killer App Contest which will generate a great deal of ideas. I see a significant increase in viral development using Ribbit in 2009, as well as incorporated into social networking, digital artistic pieces, and more.</p>
<p><strong>3. <a href="http://www.goasap.org/" target="_blank">Go</a> + <a href="http://code.google.com/p/goplayground/" target="_blank">HydroTween</a></strong><br />
This is 1 of 2 of my shameless plugs, but try and think of this in terms of the big picture. Forgetting Hydrotween, Go is more then a foundation for a Tweening engine. It's the pulse for anything that has a beginning, an end, or any level  of frequency. Go made a modest dent in the development community in 2008, but I feel the best is yet to come. I'm hopeful that physics, more creative Tweening utilities, and even more 3D control and deforming modifiers will find their way to goplayground in 2009.</p>
<p><strong>4. <a href="http://unity3d.com/" target="_blank">Unity3D</a></strong><br />
It's very easy to get set in your ways when dealing with a ubiquitous platform such as Flash. With an over 90% penetration rate, one silently cringes when thinking of integrating another web platform on top of the Flash environment. That all gets thrown out the window after experiencing the pure awesomeness of the Unity3D plug-in. Well, O.K. The concerns are still there, but this is definitely something to keep an eye out for. As communication between Unity and Flash flourishes, this wil become standard for more robust 3D games and applications. I wouldn't be surprised if we see some sort of relationship between Adobe and Unity.</p>
<p><strong>5. <a href="http://fdt.powerflasher.com/" target="_blank">F.D.T.</a></strong><br />
It's easy to become an evangelist for FDT. The Powerflasher team is doing a great job of listening to the Flash community effectively which is great because I am one of those people that is quick to point out its occasional hiccups. 3.1 Standalone was a  and the foundation for further updates. Soon we will see MXML support in early 2009 as well as the Obfuscator which the team is working on with Nicolas Cannasse (HaXe). FDT is looking to bridge the gap between the design process and the development process as well as enhance the management. With the work that is being done to provide MXML support, the FDT engine is no longer tied to a specific coding language. What this means is that special projects such as as UML functionality, or an FDT configuration specifically for designers, can be undertaken without modifying the core.</p>
<p><strong>6. <a href="http://www.adobe.com/" target="_blank">Adobe Flash CS4</a></strong><br />
Hard to go down the list without mentioning the recent release of Flash CS4. The addition of the new Vector class will help to speed iteration processes by providing strict/strong typing of an array. In many cases, casting an object's type in a parameter will speed complex calculations. Following that concept, by defining an array's type at the onset, the iteration focuses on accessing its contents instead of what it contains. You can find a good example of this at <a href="http://thebackbutton.com/blog/65/new-vector-actionscript-3s-typed-array/" target="_blank">Alex Bustin's Blog</a>. Also in recent news from Adobe, <a href="http://labs.adobe.com/technologies/alchemy/" target="_blank">Alchemy</a> (which allows you to compile C and C++ code into AS using llvm-gcc) will open the doors for many Actionscript developers. For ultimate cool factor, look out for the NES emulator running ROMS ported to AS3! (<a href="http://llvm.org/devmtg/2008-08/" target="_blank">FlaCC</a> &#8211; at the bottom) Also <a href="http://labs.adobe.com/technologies/flashcatalyst/" target="_blank">Catalyst</a> (formerly known as Thermo), should hopefully make the relationship between designer and developer easier when it comes to wire-framing out concepts.</p>
<p><strong>7. <a href="http://osflash.org/red5" target="_blank">Red5</a></strong><br />
When it comes to a server solution for Flash deployment, there are pretty much two options. One is the Flash Media Server which starts at around $5000 and the other is the free and open source Red5. It features streaming of FLV and MP3, recording of client FLV streams, remoting, and shared objects just to name a few. An admin tool has been added in 0.6.3 as well as stream listeners. For 2009, the Red5 team is introducing Server-Side AS3. This will allow you to write code on the server without knowing Java extending the flexibility and accessibility of Red5 for developers. Whole applications can be developed on the server for things such as Social Networking, media manipulation, and so much more. Red5 is poised to hit the 1.0 version mark pretty soon which will help in making it even more competitive with Flash Media Server as stable platform.</p>
<p><strong>8. <a href="http://www.amfphp.org/" target="_blank">AMFPHP</a></strong><br />
This overlaps with Red5 a tad, but I added it because it is something that I find quick and easy to use on a per project basis. Fairly straightforward as it provides communication between a PHP server and Flash applications. Another standard addition to this is Danny Patterson's <a href="http://osflash.org/as3lrf" target="_blank">AS3 Lightweight Remoting Framework</a>.</p>
<p><strong>9. <a href="http://www.pranaframework.org" target="_blank">Spring Actionscript/Prana</a></strong><br />
Prana is an Inversion of Control container for AS3. This topic very easily requires its own post, but in simplest terms, Prana lets you configure your Application's components using an external XML file and initializing them at runtime. For large scale projects this is important as it lets you define your framework and allow for changes and management of dependent classes. The best place to get an overview of how this works is <a href="http://www.martinfowler.com/articles/injection.html" target="_blank">here</a>. You can also find an example of an <a href="http://sleepydesign.blogspot.com/2008/10/prana-hello-world-prana-minimalist.html" target="_blank">AS3 only version</a>. Because Prana uses a Spring complient XML structure, it's being made into a Spring Extension and being renamed "Spring Actionscript". Adding it to a family of other IoC frameworks on other platforms.</p>
<p><strong>10. <a href="http://code.google.com/p/popforge/" target="_blank">PopForge</a></strong><br />
Pop Forge has already gained a great deal of notoriety this year with Andre and Joa's exploit of the ByteArray hack. With the ability to write Byte level code directly to the Sound object in Flash 10, expect to see this library trimed down even further with more effects and added forms of sound manipulation. I'm looking forward to seeing signs of formant filtering as well as additive and spectral synthesis. How about routing L.F.O. control to other things like the Graphics class? Or better yet, routing graphical output to the envelope of a sound? Maybe some cross pollination of <a href="http://www.kaourantin.net/2008/10/audio-mixing-with-pixel-bender.html" target="_blank">PixelBender with PopForge</a>? Which of course brings me to my next item in the list&#8230;</p>
<p><strong>11. <a href="http://labs.adobe.com/technologies/pixelbender/" target="_blank">Pixel Bender</a></strong><br />
Pixel Bender is Adobe's new kernal language used to manipulate pixels in new and creative ways. Pixel Bender runs on multiple Adobe products which opens up the ability to write uber-cool filters for static and motion graphics. Pixel Bender focuses heavily on the GPU to perform its tasks, making it much more efficient and capable of complex operations. Photoshop, Flash, and After Effects will all benefit from the experimental work being done with this tool and a number of innovative examples have already surfaced. <a href="http://www.subblue.com/projects/droste" target="_blank">Escher's Droste Effect</a> is one such effect that "spiralizes" a circular pattern and even works with a video source. Another is the ability to do <a href="http://mike.newgrounds.com/" target="_blank">Ray Tracing</a> and shading. I expect to see more of this trickle into Papervision and Bitmap processing libraries in the not so distant future.</p>
<h4>Utilities and Helpful Approaches:</h4>
<p>
<strong>1. <a href="http://code.google.com/p/swfobject/" target="_blank">SWFObject 2.0</a></strong><br />
The standard for embedding anything with a swf at the end of the file path. 2.2 development has been started with plans to address OnHold/ FixedIn2.2AlphaX. Expect a number of Flash 10 enhancements to come shortly for things such as express installer, wmode, etc.</p>
<p><strong>2. <a href="http://www.paultondeur.com/2008/11/12/unity3d-communication-with-browser-and-flash/" target="_blank">Unity Object</a></strong><br />
Awesome and useful example of how to communicate between a Unity3D app and Flash.</p>
<p><strong>3. <a href="http://code.google.com/p/queueloader-as3/" target="_blank">QueueLoader 3.1</a></strong><br />
My last shameless plug. I chose to add this because of the significant re-write of the utility and ease in which people can add their own extras. With the new structure in place, be on the lookout for more loadable items and useful preloading processes similar to the drawFrames (lets you draw the frames of an external SWF to an array of bitmaps) feature.</p>
<p><strong>4. <a href="http://rockonflash.wordpress.com/2008/10/01/how-to-detect-when-a-textarea-is-full-paging/" target="_blank">TextArea Paging</a></strong><br />
A great trick for detecting the overflow of a TextArea for spilling into another TextArea. Perfect for creating "news" style layouts and working around images.</p>
<p><strong>5. <a href="http://ntt.cc/2008/11/21/tutorials-about-using-flash-player-10-to-verify-the-files-type-filereference.html" target="_blank">FileReference Verification of File Type</a></strong><br />
Cool utility for detecting file types of uploaded assets using the FileReference class.</p>
<p><strong>6. <a href="http://dispatchevent.org/mims/version-checking/#more-446" target="_blank">Libary Code Version Checking</a></strong><br />
Cool technique for checking the version of your code when initializing. Helps to keep track of what version of a library you are using in a project to avoid conflicts.</p>
<p><strong>7. <a href="http://www.bigroom.co.uk/blog/object-pool-class" target="_blank">Object Pooling Class</a></strong><br />
Object Pooling is a technique for centralizing the management of instantiated objects. Having an object instantiated and ready for use can reduce bottlenecks and offers the ability to limit unique creation. This is perfect for particle engines as it's used above. If you've seen one of <a href="http://www.sebleedelisle.com/?p=187" target="_blank">Seb Lee-Delisle's</a> particle talks at a conference, then you've seen this in action with how he's recycling the particles.</p>
<p><strong>8. <a href="http://blog.mosessupposes.com/?p=47" target="_blank">SelectiveBitmapDraw</a></strong><br />
One other thing that gets Moses Gunesch really excited besides the mechanics of motion, is finding easy ways of compositing or capturing elements of a display hierarchy and manipulating them in fun ways. His SelectiveBitmapDraw Class lets you take a group of nested DisplayObjects and flag them for compositing into another Bitmap object. What makes this even cooler is that you can omit different items in the hierarchy. On top of that, you can use this with Papervision and apply it to DisplayObject3D items in your scene!</p>
<p><strong>9. <a href="http://www.libspark.org/wiki/saqoosha/FLARToolKit" target="_blank">FLARToolKit</a></strong><br />
This is one of those things you need to see with a <a href="http://drawlogic.com/2008/11/17/as3-augmented-reality-in-flash-and-papervision-3d-flartoolkit/" target="_blank">video</a>. The FLARToolKit is used for creating "Augmented Reality" experiences. The way it works is by locking  onto visual targets as reference points for creating motion and mapping points. Also check out the post of <a href="http://www.mikkoh.com/blog/?p=129" target="_blank">Mikkoh Haapoja's</a>. A great video example can be found at <a href="http://www.todayandtomorrow.net/2008/09/01/desktop-fireworks/" target="_blank">today and tomorrow</a>.</p>
<p><strong>10. <a href="http://code.google.com/p/mrdoob/wiki/stats" target="_blank">HiReS! SWF Stats</a></strong><br />
Mr. Doob has a well done dashboard for continuously outputting a running swf's performance. We've all used the frames-per-second bar, memory output meter, ms time in troubleshooting our applications. What his utility also gives you, is a visual graph of the data in real-time in a nice complete package.</p>
<p><strong>11. Orchid</strong><br />
If you've heard of Saffron (Samuel Agesilas' Actionscript based UML utility for creating stub code in a graphical user interface), then you've heard of Orchid. Orchid is an open source UI framework that works using the concept of Signals and Slots. Saffron has long been shrouded in mystery and this is most likely the case due to the fact it was picked up by a well known software development company. Rumors that it was purchased by Microsoft popped up, then there have been ramblings of Adobe buying the code. Regardless of what the case is, having seen the interface work that Sam has done on Saffron, it's easy to get a sense of the capabilities and flexibility of the Orchid architecture.</p>
<p>In addition to the items above, there are a number of other interesting things worth mentioning. <a href="http://animoto.com/" target="_blank">Animoto</a> is a cool application that takes user submitted media, and creates a music video based on your settings and creative genius. <a href="http://aviary.com/" target="_blank">Aviary</a> is a group of software tools that let you edit images, generate color palettes, and visual effects. <a href="http://labs.blitzagency.com/?p=61" target="_blank">X-Ray</a> is a fairly well known and already established debugging utility that makes tracking trace statements, errors, and resources much easier. <a href="http://rockonflash.wordpress.com/2008/10/28/papervision3d-xray-introspection-finally/" target="_blank">John Grden</a> was able to make some changes for the Flex crowd recently and I'm looking forward to seeing how this progresses even further.</p>
<p>So that's the list! Because there is so much exciting stuff coming in the new year, I'm considering adding a user submitted list. What do you think? Contact me and let's get another list going!</p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hydrotik.com/2008/11/23/11-must-have-flash-resources-and-11-must-have-utilities-for-2009/feed/</wfw:commentRss>
		<slash:comments>9</slash:comments>
		</item>
		<item>
		<title>Flashbelt 2008 + Animation to Go + HydroTween + Papervision3D</title>
		<link>http://blog.hydrotik.com/2008/06/08/flashbelt-2008-animation-to-go-hydrotween-papervision3d/</link>
		<comments>http://blog.hydrotik.com/2008/06/08/flashbelt-2008-animation-to-go-hydrotween-papervision3d/#comments</comments>
		<pubDate>Sun, 08 Jun 2008 15:20:22 +0000</pubDate>
		<dc:creator>djdonovan</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flashbelt 08]]></category>
		<category><![CDATA[GO]]></category>
		<category><![CDATA[Making Things]]></category>
		<category><![CDATA[Papervision]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://blog.hydrotik.com/2008/06/08/flashbelt-2008-animation-to-go-hydrotween-papervision3d/</guid>
		<description><![CDATA[Getting ready to leave for MN and I'm very excited to be a part of Moses' presentation at Flashbelt 2008! I will be providing a brief introduction to  HydroTween. HydroTween is a multi-purpose tweening parser that runs on top of the Go framework. If you are familiar with ZigoEngine, Fuse, or Tweener, then using [...]]]></description>
			<content:encoded><![CDATA[<p>Getting ready to leave for MN and I'm very excited to be a part of Moses' presentation at Flashbelt 2008! I will be providing a brief introduction to  HydroTween. HydroTween is a multi-purpose tweening parser that runs on top of the Go framework. If you are familiar with ZigoEngine, Fuse, or Tweener, then using HydroTween should be a seamless transition. In this post, you will find the examples shown during the presentation. I've also put together an online version of what I will be showing. I was hoping to also include a demonstration of the Making Things controller running a tween on a servo, but my laptop isn't being cooperative. I will provide a separate post with an update on that as well as a library I am working on for controlling modules.</p>
<p>Back to the subject at hand, here are the 3 examples that I will be showing. The first is an example of generic tweening with most of the basic properties, filters, and image/hsb tweening. The second is a Fuse type example using navigation with multiple tweening properties running at once. The last is a Papervision3D example that is tweening a number of properties including brightness. Thanks to Andy Zupko's heroic efforts of merging the GreatWhite and Effects branches of Papervision together, we have alpha and the other none-positioning properties at our tweening disposal for 3D objects!</p>
<p><a href="/wp-content/flashbelt2008/" target="_blank">Here is the link to the presentation along with the examples.</a> &#8211; Click into the SWF, then use the forward and back arrows to navigate.</p>
<p>I also urge you to check out my previous post that has useful information and source examples, along with changes and important features that have been added. HydroTween will call you renderer for automatic updating of your Papervision scene by registering with HydroTween using the init3D() method. One important new addition is the ability to pass a DisplayObject3D target into this init method for automatic use of the lookAt() method.</p>
<p><a href="http://blog.hydrotik.com/2008/05/13/go-048jg1-hydrotween-rev30-guide-source-code/">Here is the link to the previous post with more information about using HydroTween.</a></p>
<p>If you'd like to go directly to the examples:<br />
<a href="/wp-content/flashbelt2008/hydrotween.html" target="_blank">Generic HydroTween</a><br />
<a href="/wp-content/flashbelt2008/fuse.html" target="_blank">Fuse Style Tweening</a><br />
<a href="/wp-content/flashbelt2008/papervision.html" target="_blank">Papervision3D</a> &#8211; Clicking on an image will bring it up.</p>
<p>Looking forward to seeing everyone there!</p>
<p>And of course, the source! I have included everything in the examples, including the presentation!</p>
<hr />
<a href="/wp-content/flashbelt2008/FlashBelt%20Presentation.zip">Flashbelt2008 HydroTween Source and Examples</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hydrotik.com/2008/06/08/flashbelt-2008-animation-to-go-hydrotween-papervision3d/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Papervision3D 2.0 + Go Tweening &#8211; Flipping Banner (Part 1)</title>
		<link>http://blog.hydrotik.com/2007/12/10/papervision3d-20-go-tweening-flipping-banner-part-1/</link>
		<comments>http://blog.hydrotik.com/2007/12/10/papervision3d-20-go-tweening-flipping-banner-part-1/#comments</comments>
		<pubDate>Tue, 11 Dec 2007 03:01:02 +0000</pubDate>
		<dc:creator>djdonovan</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[GO]]></category>
		<category><![CDATA[Papervision]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://blog.hydrotik.com/2007/12/10/papervision3d-20-go-tweening-flipping-banner-part-1/</guid>
		<description><![CDATA[Set up PapervisionTween to automatically render:

PapervisionTween.init&#40;renderer, scene, camera, viewport&#41;;

Calling PapervisionTween to tween a plane:

var b:PapervisionTween = new PapervisionTween&#40;_planeArray&#91;0&#93;, &#123;rotationY:0&#125;, 0, 1, Quintic.easeInOut, onFlipDone&#41;;
b.start&#40;&#41;;

I've also included the PapervisionTween code in the post in addition to the source files below, but let's move on the flipping code.
Here's the Core class that calls the Flip class:

package com.hydrotik.bannerflip3d &#123;
	/**
	 [...]]]></description>
			<content:encoded><![CDATA[<p>Set up PapervisionTween to automatically render:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">PapervisionTween.<span style="color: #006600;">init</span><span style="color: #66cc66;">&#40;</span>renderer, scene, <span style="color: #0066CC;">camera</span>, viewport<span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>Calling PapervisionTween to tween a plane:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">var</span> b:PapervisionTween = <span style="color: #000000; font-weight: bold;">new</span> PapervisionTween<span style="color: #66cc66;">&#40;</span>_planeArray<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>, <span style="color: #66cc66;">&#123;</span>rotationY:<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#125;</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">1</span>, Quintic.<span style="color: #006600;">easeInOut</span>, onFlipDone<span style="color: #66cc66;">&#41;</span>;
b.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;</pre></div></div>

<p>I've also included the PapervisionTween code in the post in addition to the source files below, but let's move on the flipping code.</p>
<p><strong>Here's the Core class that calls the Flip class:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">bannerflip3d</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #808080; font-style: italic;">/**
	 * @author Donovan Adams
	 * @version December 10, 2007
	 * @description Papervision Page flip example
	 * 
	 */</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">Stage</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">navigateToURL</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">bannerflip3d</span>.<span style="color: #006600;">Flip</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">bannerflip3d</span>.<span style="color: #006600;">FlipEvent</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">utils</span>.<span style="color: #006600;">XMLLoader</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">utils</span>.<span style="color: #006600;">XMLLoaderEvent</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">system</span>.<span style="color: #0066CC;">Capabilities</span>;	
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Core <span style="color: #0066CC;">extends</span> Sprite <span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _scope:<span style="color: #0066CC;">MovieClip</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _stage:<span style="color: #0066CC;">Stage</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _xml:<span style="color: #0066CC;">XML</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">_url</span>:<span style="color: #0066CC;">String</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _hit: Sprite;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _targ : <span style="color: #0066CC;">String</span>;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Core<span style="color: #66cc66;">&#40;</span>scope:<span style="color: #0066CC;">MovieClip</span>, <span style="color: #0066CC;">stage</span>:<span style="color: #0066CC;">Stage</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			_scope = scope;
			_stage = <span style="color: #0066CC;">stage</span>;
			<span style="color: #000000; font-weight: bold;">var</span> p:<span style="color: #0066CC;">String</span>;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">playerType</span> == <span style="color: #ff0000;">&quot;External&quot;</span> <span style="color: #66cc66;">||</span> <span style="color: #0066CC;">Capabilities</span>.<span style="color: #0066CC;">playerType</span> == <span style="color: #ff0000;">&quot;StandAlone&quot;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				p = <span style="color: #ff0000;">&quot;../includes/admin/flippingbanner.xml&quot;</span>;
			<span style="color: #66cc66;">&#125;</span> <span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
			    p = <span style="color: #ff0000;">&quot;/wp-content/flippingbanner2/includes/admin/flippingbanner.xml&quot;</span>;
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">xml</span>:XMLLoader = <span style="color: #000000; font-weight: bold;">new</span> XMLLoader<span style="color: #66cc66;">&#40;</span>p<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">xml</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>XMLLoaderEvent.<span style="color: #006600;">COMPLETE</span>, onXMLComplete<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">xml</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>XMLLoaderEvent.<span style="color: #0066CC;">ERROR</span>, onXMLError<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onXMLError<span style="color: #66cc66;">&#40;</span>event : XMLLoaderEvent<span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>event<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">// --== Private Methods ==--</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onXMLComplete<span style="color: #66cc66;">&#40;</span>event:XMLLoaderEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:: onXMLComplete:&quot;</span><span style="color: #66cc66;">&#41;</span>;
			_xml = event.<span style="color: #0066CC;">xml</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> _oFlip:Flip = <span style="color: #000000; font-weight: bold;">new</span> Flip<span style="color: #66cc66;">&#40;</span>_scope, _stage, <span style="color: #0066CC;">this</span>, event.<span style="color: #0066CC;">xml</span>.<span style="color: #006600;">banner</span>.<span style="color: #006600;">children</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #ff0000;">&quot;&quot;</span>, <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#40;</span>_xml.<span style="color: #006600;">attribute</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;seconds&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
			_oFlip.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FlipEvent.<span style="color: #006600;">COMPLETE</span>, onCompleteHandler<span style="color: #66cc66;">&#41;</span>;
			_oFlip.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FlipEvent.<span style="color: #006600;">ON_FLIP</span>, onFlipHandler<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			_hit = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			_hit.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0x660000, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
			_hit.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">drawRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, _stage.<span style="color: #006600;">stageWidth</span>, _stage.<span style="color: #006600;">stageHeight</span><span style="color: #66cc66;">&#41;</span>;
			_scope.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>_hit<span style="color: #66cc66;">&#41;</span>;
			_hit.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, onClickHandler<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			_hit.<span style="color: #006600;">buttonMode</span> = <span style="color: #000000; font-weight: bold;">true</span>;
			_hit.<span style="color: #0066CC;">useHandCursor</span> = <span style="color: #000000; font-weight: bold;">true</span>;
			_hit.<span style="color: #006600;">mouseEnabled</span> = <span style="color: #000000; font-weight: bold;">true</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onClickHandler<span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			navigateToURL<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_url</span><span style="color: #66cc66;">&#41;</span>, _targ<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onCompleteHandler<span style="color: #66cc66;">&#40;</span>event:FlipEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">_url</span> = event.<span style="color: #006600;">link</span>;
			_targ = event.<span style="color: #006600;">targ</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onFlipHandler<span style="color: #66cc66;">&#40;</span>event:FlipEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">_url</span> = event.<span style="color: #006600;">link</span>;
			_targ = event.<span style="color: #006600;">targ</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><strong>Here's the updated Flip class using the Go tweening engine:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">bannerflip3d</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #808080; font-style: italic;">/**
	 * @author Donovan Adams
	 * @version December 9, 2007
	 * @usage Example:&lt;code&gt;&lt;/code&gt;
	 * @description
	 * @history
	 * @sends
	 * @todo
	 * 
	 */</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">EventDispatcher</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">TimerEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Timer</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">setTimeout</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">cameras</span>.<span style="color: #006600;">Camera3D</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">proto</span>.<span style="color: #006600;">SceneObject3D</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">FileLoadEvent</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #006600;">BitmapFileMaterial</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #006600;">ColorMaterial</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">objects</span>.<span style="color: #006600;">DisplayObject3D</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">objects</span>.<span style="color: #006600;">primitives</span>.<span style="color: #006600;">Plane</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">render</span>.<span style="color: #006600;">BasicRenderEngine</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">scenes</span>.<span style="color: #006600;">Scene3D</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">view</span>.<span style="color: #006600;">Viewport3D</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">go</span>.<span style="color: #006600;">PapervisionTween</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> fl.<span style="color: #006600;">motion</span>.<span style="color: #006600;">easing</span>.<span style="color: #66cc66;">*</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">proto</span>.<span style="color: #006600;">MaterialObject3D</span>;
&nbsp;
	<span style="color: #66cc66;">&#91;</span>Event<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;COMPLETE&quot;</span>, <span style="color: #0066CC;">type</span>=<span style="color: #ff0000;">&quot;com.hydrotik.bannerflip3d.FlipEvent&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
&nbsp;
	<span style="color: #66cc66;">&#91;</span>Event<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">name</span>=<span style="color: #ff0000;">&quot;ON_FLIP&quot;</span>, <span style="color: #0066CC;">type</span>=<span style="color: #ff0000;">&quot;com.hydrotik.bannerflip3d.FlipEvent&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Flip <span style="color: #0066CC;">extends</span> EventDispatcher <span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> const VERBOSE:<span style="color: #0066CC;">Boolean</span> = <span style="color: #000000; font-weight: bold;">true</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _scope:Sprite;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _stage:<span style="color: #0066CC;">Stage</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _oCore:<span style="color: #66cc66;">*</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _assetPath:<span style="color: #0066CC;">String</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _materialArray:<span style="color: #0066CC;">Array</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _planeArray:<span style="color: #0066CC;">Array</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _array:XMLList;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _count:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _next:<span style="color: #0066CC;">int</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _prev:<span style="color: #0066CC;">int</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _loader:Sprite;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _seconds:<span style="color: #0066CC;">int</span>;
&nbsp;
		<span style="color: #808080; font-style: italic;">//New 2.0 Privates</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> renderer:BasicRenderEngine;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">camera</span>:Camera3D;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> viewport:Viewport3D;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> debug : <span style="color: #000000; font-weight: bold;">Function</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> scene : Scene3D;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> white : MaterialObject3D;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> bg : Plane;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Flip<span style="color: #66cc66;">&#40;</span>scope:Sprite, <span style="color: #0066CC;">stage</span>:<span style="color: #0066CC;">Stage</span>, core:<span style="color: #66cc66;">*</span>, a:XMLList, assetPath:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;../flashassets/&quot;</span>, s:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			debug = <span style="color: #0066CC;">trace</span>;
			<span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">align</span> = StageAlign.<span style="color: #006600;">TOP_LEFT</span>;
			<span style="color: #0066CC;">stage</span>.<span style="color: #0066CC;">scaleMode</span> = StageScaleMode.<span style="color: #006600;">NO_SCALE</span>;
			_scope = scope;
			_stage = <span style="color: #0066CC;">stage</span>;
			_oCore = core;
			_array = a;
			_assetPath = assetPath;
			_seconds = s;
			_materialArray = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
			_planeArray = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
&nbsp;
			scene = <span style="color: #000000; font-weight: bold;">new</span> Scene3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			renderer = <span style="color: #000000; font-weight: bold;">new</span> BasicRenderEngine<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<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>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">z</span> = -<span style="color: #cc66cc;">100</span>;
			viewport = <span style="color: #000000; font-weight: bold;">new</span> Viewport3D<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">500</span>,<span style="color: #cc66cc;">300</span>,<span style="color: #000000; font-weight: bold;">true</span><span style="color: #66cc66;">&#41;</span>;
			viewport.<span style="color: #006600;">alpha</span> = <span style="color: #cc66cc;">0</span>;
&nbsp;
			_scope.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>viewport<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			white = <span style="color: #000000; font-weight: bold;">new</span> ColorMaterial<span style="color: #66cc66;">&#40;</span>0xFFFFFF<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			setTimeout<span style="color: #66cc66;">&#40;</span>addedToStage, <span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> addedToStage<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>VERBOSE<span style="color: #66cc66;">&#41;</span> debug<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\n</span><span style="color: #000099; font-weight: bold;">\n</span>&gt;&gt; Flip.addedToStage(); - args: &quot;</span>+<span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			_loader = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			_loader.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0x000000<span style="color: #66cc66;">&#41;</span>;
			_loader.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">drawRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span>;
			_scope.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>_loader<span style="color: #66cc66;">&#41;</span>;
			_loader.<span style="color: #006600;">x</span> = <span style="color: #66cc66;">&#40;</span>_stage.<span style="color: #006600;">stageWidth</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span> - <span style="color: #cc66cc;">50</span>;
			_loader.<span style="color: #006600;">y</span> = <span style="color: #66cc66;">&#40;</span>_stage.<span style="color: #006600;">stageHeight</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span> - <span style="color: #cc66cc;">2</span>;
&nbsp;
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> _array.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				_materialArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> BitmapFileMaterial<span style="color: #66cc66;">&#40;</span>_array<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">attribute</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'src'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
				_materialArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">oneSide</span> = <span style="color: #000000; font-weight: bold;">true</span>;
				_materialArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">smooth</span> = <span style="color: #000000; font-weight: bold;">true</span>;
				_materialArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FileLoadEvent.<span style="color: #006600;">LOAD_PROGRESS</span>, onFileProgress<span style="color: #66cc66;">&#41;</span>;
				_materialArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FileLoadEvent.<span style="color: #006600;">LOAD_COMPLETE</span>, onFileComplete<span style="color: #66cc66;">&#41;</span>;
				_planeArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> Plane<span style="color: #66cc66;">&#40;</span> _materialArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>, <span style="color: #cc66cc;">300</span>, <span style="color: #cc66cc;">156</span>, <span style="color: #cc66cc;">6</span>, <span style="color: #cc66cc;">6</span><span style="color: #66cc66;">&#41;</span>;
				scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>_planeArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
				_planeArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">name</span> = i.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
				_planeArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">rotationY</span> = -<span style="color: #cc66cc;">180</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #808080; font-style: italic;">// PapervisionTween is extending LinearGo. PapervisionTween is a custom extension using custom syntax, running on the Go system	</span>
			<span style="color: #808080; font-style: italic;">// The init function passes the rendering info so that PapervisionTween can take care of updating the renderer</span>
			PapervisionTween.<span style="color: #006600;">init</span><span style="color: #66cc66;">&#40;</span>renderer, scene, <span style="color: #0066CC;">camera</span>, viewport<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onFileProgress<span style="color: #66cc66;">&#40;</span>event:FileLoadEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>VERBOSE<span style="color: #66cc66;">&#41;</span> debug<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span> percentage: &quot;</span>+<span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">round</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #0066CC;">bytesLoaded</span><span style="color: #66cc66;">/</span>event.<span style="color: #0066CC;">bytesTotal</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #ff0000;">&quot;%&quot;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> sec:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">100</span><span style="color: #66cc66;">/</span>_array.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			_loader.<span style="color: #0066CC;">width</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>_count <span style="color: #66cc66;">*</span> sec<span style="color: #66cc66;">&#41;</span> + <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #0066CC;">bytesLoaded</span><span style="color: #66cc66;">/</span>event.<span style="color: #0066CC;">bytesTotal</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> sec<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onFileComplete<span style="color: #66cc66;">&#40;</span>event:FileLoadEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>VERBOSE<span style="color: #66cc66;">&#41;</span> debug<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;complete!&quot;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #808080; font-style: italic;">//</span>
			_count++;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_count == _array.<span style="color: #0066CC;">length</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>
				onImageQueueCompleteHandler<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onImageQueueCompleteHandler<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
			<span style="color: #808080; font-style: italic;">// PapervisionTween is extending LinearGo. PapervisionTween is a custom extension using custom syntax, running on the Go system		</span>
			<span style="color: #000000; font-weight: bold;">var</span> l:PapervisionTween = <span style="color: #000000; font-weight: bold;">new</span> PapervisionTween<span style="color: #66cc66;">&#40;</span>_loader, <span style="color: #66cc66;">&#123;</span>alpha:<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#125;</span>, <span style="color: #cc66cc;">0</span>, .2, Quintic.<span style="color: #006600;">easeInOut</span>, loaderFade<span style="color: #66cc66;">&#41;</span>;
			l.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// PapervisionTween is extending LinearGo. PapervisionTween is a custom extension using custom syntax, running on the Go system		</span>
			<span style="color: #000000; font-weight: bold;">var</span> b:PapervisionTween = <span style="color: #000000; font-weight: bold;">new</span> PapervisionTween<span style="color: #66cc66;">&#40;</span>_planeArray<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>, <span style="color: #66cc66;">&#123;</span>rotationY:<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#125;</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">1</span>, Quintic.<span style="color: #006600;">easeInOut</span>, onFlipDone<span style="color: #66cc66;">&#41;</span>;
			b.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// PapervisionTween is extending LinearGo. PapervisionTween is a custom extension using custom syntax, running on the Go system		</span>
			<span style="color: #000000; font-weight: bold;">var</span> c:PapervisionTween = <span style="color: #000000; font-weight: bold;">new</span> PapervisionTween<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">camera</span>, <span style="color: #66cc66;">&#123;</span>z:-<span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#125;</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">1</span>, Quintic.<span style="color: #006600;">easeInOut</span>, onFlipDone<span style="color: #66cc66;">&#41;</span>;
			c.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			_next = <span style="color: #cc66cc;">0</span>;
&nbsp;
			_count = -<span style="color: #cc66cc;">1</span>;
&nbsp;
			bg = <span style="color: #000000; font-weight: bold;">new</span> Plane<span style="color: #66cc66;">&#40;</span>white,<span style="color: #cc66cc;">5120</span>,<span style="color: #cc66cc;">2560</span>,<span style="color: #cc66cc;">10</span>,<span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;
			bg.<span style="color: #006600;">y</span> = -<span style="color: #cc66cc;">200</span>;
			bg.<span style="color: #006600;">z</span> = <span style="color: #cc66cc;">500</span>;
			bg.<span style="color: #006600;">pitch</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>bg<span style="color: #66cc66;">&#41;</span>;
			dispatchEvent<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> FlipEvent<span style="color: #66cc66;">&#40;</span>FlipEvent.<span style="color: #006600;">COMPLETE</span>, _next, _array<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">attribute</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'link'</span><span style="color: #66cc66;">&#41;</span>, _array<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">attribute</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'target'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> myTimer:Timer = <span style="color: #000000; font-weight: bold;">new</span> Timer<span style="color: #66cc66;">&#40;</span>_seconds <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">1000</span><span style="color: #66cc66;">&#41;</span>;
			myTimer.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>TimerEvent.<span style="color: #006600;">TIMER</span>, timerHandler<span style="color: #66cc66;">&#41;</span>;
			myTimer.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> flip<span style="color: #66cc66;">&#40;</span>id:<span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #808080; font-style: italic;">// PapervisionTween is extending LinearGo. PapervisionTween is a custom extension using custom syntax, running on the Go system				</span>
			<span style="color: #000000; font-weight: bold;">var</span> a:PapervisionTween = <span style="color: #000000; font-weight: bold;">new</span> PapervisionTween<span style="color: #66cc66;">&#40;</span>_planeArray<span style="color: #66cc66;">&#91;</span>_next<span style="color: #66cc66;">&#93;</span>, <span style="color: #66cc66;">&#123;</span>rotationY:<span style="color: #cc66cc;">180</span><span style="color: #66cc66;">&#125;</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">1</span>, Quintic.<span style="color: #006600;">easeInOut</span>, onOldFlipDone<span style="color: #66cc66;">&#41;</span>;
			a.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Update Data</span>
			_prev = _next;
			_next = <span style="color: #66cc66;">&#40;</span>id == _array.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> ? <span style="color: #cc66cc;">0</span> : id + <span style="color: #cc66cc;">1</span>;
			<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">url</span>:<span style="color: #0066CC;">String</span> = _array<span style="color: #66cc66;">&#91;</span>_next<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">attribute</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'link'</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> targ:<span style="color: #0066CC;">String</span> = _array<span style="color: #66cc66;">&#91;</span>_next<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">attribute</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'target'</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">url</span>, targ<span style="color: #66cc66;">&#41;</span>;
			dispatchEvent<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> FlipEvent<span style="color: #66cc66;">&#40;</span>FlipEvent.<span style="color: #006600;">ON_FLIP</span>, _next, <span style="color: #0066CC;">url</span>, targ<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// PapervisionTween is extending LinearGo. PapervisionTween is a custom extension using custom syntax, running on the Go system		</span>
			<span style="color: #000000; font-weight: bold;">var</span> b:PapervisionTween = <span style="color: #000000; font-weight: bold;">new</span> PapervisionTween<span style="color: #66cc66;">&#40;</span>_planeArray<span style="color: #66cc66;">&#91;</span>_next<span style="color: #66cc66;">&#93;</span>, <span style="color: #66cc66;">&#123;</span>rotationY:<span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#125;</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">1</span>, Quintic.<span style="color: #006600;">easeInOut</span>, onFlipDone<span style="color: #66cc66;">&#41;</span>;
			b.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// PapervisionTween is extending LinearGo. PapervisionTween is a custom extension using custom syntax, running on the Go system		</span>
			<span style="color: #000000; font-weight: bold;">var</span> c:PapervisionTween = <span style="color: #000000; font-weight: bold;">new</span> PapervisionTween<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">camera</span>, <span style="color: #66cc66;">&#123;</span>z:-<span style="color: #cc66cc;">350</span><span style="color: #66cc66;">&#125;</span>, <span style="color: #cc66cc;">0</span>, .5, Quintic.<span style="color: #006600;">easeIn</span>, onCameraHalf<span style="color: #66cc66;">&#41;</span>;
			c.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onCameraHalf<span style="color: #66cc66;">&#40;</span>event:Event = <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			viewport.<span style="color: #006600;">alpha</span> 	= <span style="color: #cc66cc;">1</span>;
			<span style="color: #000000; font-weight: bold;">var</span> c:PapervisionTween = <span style="color: #000000; font-weight: bold;">new</span> PapervisionTween<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">camera</span>, <span style="color: #66cc66;">&#123;</span>z:-<span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#125;</span>, <span style="color: #cc66cc;">0</span>, .5, Quintic.<span style="color: #006600;">easeOut</span><span style="color: #66cc66;">&#41;</span>;
			c.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> timerHandler<span style="color: #66cc66;">&#40;</span>event:TimerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>VERBOSE<span style="color: #66cc66;">&#41;</span> debug<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;timerHandler: &quot;</span> + event<span style="color: #66cc66;">&#41;</span>;
			_count = <span style="color: #66cc66;">&#40;</span>_count == _array.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> ? <span style="color: #cc66cc;">0</span> : _count + <span style="color: #cc66cc;">1</span>;
			flip<span style="color: #66cc66;">&#40;</span>_count<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onFlipDone<span style="color: #66cc66;">&#40;</span>event:Event = <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>VERBOSE<span style="color: #66cc66;">&#41;</span> debug<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;flip done!&quot;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> loaderFade<span style="color: #66cc66;">&#40;</span>event:Event = <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			viewport.<span style="color: #006600;">alpha</span> 	= <span style="color: #cc66cc;">1</span>;
			_scope.<span style="color: #006600;">removeChild</span><span style="color: #66cc66;">&#40;</span>_loader<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onOldFlipDone<span style="color: #66cc66;">&#40;</span>event:Event = <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>VERBOSE<span style="color: #66cc66;">&#41;</span> debug<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;old flip done!&quot;</span><span style="color: #66cc66;">&#41;</span>;
			_planeArray<span style="color: #66cc66;">&#91;</span>_prev<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">rotationY</span> = -<span style="color: #cc66cc;">180</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p><strong>And if you are curious here is the PapervisionTween extension of Go:</strong></p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;"><span style="color: #808080; font-style: italic;">/**
 * Copyright (c) 2007 Moses Gunesch, MosesSupposes.com - Donovan Adams, blog.hydrotik.com
 * 
 * Permission is hereby granted, free of charge, to any person obtaining a copy
 * of this software and associated documentation files (the &quot;Software&quot;), to deal
 * in the Software without restriction, including without limitation the rights
 * to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
 * copies of the Software, and to permit persons to whom the Software is
 * furnished to do so, subject to the following conditions:
 * 
 * The above copyright notice and this permission notice shall be included in
 * all copies or substantial portions of the Software.
 * 
 * THE SOFTWARE IS PROVIDED &quot;AS IS&quot;, WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
 * FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
 * AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
 * LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
 * THE SOFTWARE.
 */</span>
&nbsp;
package com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">go</span> <span style="color: #66cc66;">&#123;</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">DisplayObject</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">fuseproject</span>.<span style="color: #006600;">go</span>.<span style="color: #006600;">items</span>.<span style="color: #006600;">LinearGo</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">objects</span>.<span style="color: #006600;">DisplayObject3D</span>;
&nbsp;
	<span style="color: #808080; font-style: italic;">//import flash.geom.ColorTransform;</span>
	<span style="color: #808080; font-style: italic;">//import flash.filters.BlurFilter;</span>
	<span style="color: #808080; font-style: italic;">//import flash.geom.Point;	</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">/**
	 * A basic example of how you could build a tween on LinearGo.
	 */</span>
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> PapervisionTween <span style="color: #0066CC;">extends</span> LinearGo <span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">// -== Public Properties ==-</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> <span style="color: #0066CC;">width</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">Number</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> _rotationY;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> <span style="color: #0066CC;">width</span><span style="color: #66cc66;">&#40;</span>value : <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_state == STOPPED<span style="color: #66cc66;">&#41;</span>
				_rotationY = value;
		<span style="color: #66cc66;">&#125;</span> 		
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> startWidth<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">Number</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> _startRotationY;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> startWidth<span style="color: #66cc66;">&#40;</span>value : <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_state == STOPPED<span style="color: #66cc66;">&#41;</span>
				_startRotationY = value;
		<span style="color: #66cc66;">&#125;</span> 		
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">get</span> <span style="color: #0066CC;">target</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> : DisplayObject <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">return</span> <span style="color: #0066CC;">_target</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">set</span> <span style="color: #0066CC;">target</span><span style="color: #66cc66;">&#40;</span>obj : DisplayObject<span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_state == STOPPED<span style="color: #66cc66;">&#41;</span>
				<span style="color: #0066CC;">_target</span> = obj;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">// -== Protected Properties ==-</span>
		protected <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">_target</span> : <span style="color: #66cc66;">*</span>;
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">var</span> _rotationY : <span style="color: #0066CC;">Number</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> _viewport:<span style="color: #66cc66;">*</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> _camera:<span style="color: #66cc66;">*</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> _scene:<span style="color: #66cc66;">*</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">var</span> _renderer : <span style="color: #66cc66;">*</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _closure : <span style="color: #000000; font-weight: bold;">Function</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> debug : <span style="color: #000000; font-weight: bold;">Function</span>;
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">var</span> _startRotationY : <span style="color: #0066CC;">Number</span>;
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">var</span> _changeRotationY : <span style="color: #0066CC;">Number</span>;
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">var</span> _startProps : <span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span>;
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">var</span> _changeProps : <span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span>;
&nbsp;
		protected <span style="color: #000000; font-weight: bold;">var</span> _propsTo : <span style="color: #0066CC;">Object</span> = <span style="color: #66cc66;">&#123;</span><span style="color: #66cc66;">&#125;</span>;
&nbsp;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #0066CC;">static</span> <span style="color: #000000; font-weight: bold;">function</span> init<span style="color: #66cc66;">&#40;</span>renderer:<span style="color: #66cc66;">*</span>, scene:<span style="color: #66cc66;">*</span>, <span style="color: #0066CC;">camera</span>:<span style="color: #66cc66;">*</span>, viewport:<span style="color: #66cc66;">*</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
			_renderer = renderer;
			_scene = scene;
			_camera = <span style="color: #0066CC;">camera</span>;
			_viewport = viewport;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">// -== Public Methods ==-</span>
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> PapervisionTween<span style="color: #66cc66;">&#40;</span>
					<span style="color: #0066CC;">target</span>:<span style="color: #66cc66;">*</span> = <span style="color: #000000; font-weight: bold;">null</span>,
					propsTo:<span style="color: #0066CC;">Object</span> = <span style="color: #000000; font-weight: bold;">null</span>,
					delay:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">NaN</span>,
					<span style="color: #0066CC;">duration</span>:<span style="color: #0066CC;">Number</span> = <span style="color: #0066CC;">NaN</span>,
					easing:<span style="color: #000000; font-weight: bold;">Function</span> = <span style="color: #000000; font-weight: bold;">null</span>,
					closure:<span style="color: #000000; font-weight: bold;">Function</span> = <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>
		<span style="color: #66cc66;">&#123;</span>			
			<span style="color: #0066CC;">super</span><span style="color: #66cc66;">&#40;</span>delay, <span style="color: #0066CC;">duration</span>, easing<span style="color: #66cc66;">&#41;</span>;
			debug = <span style="color: #0066CC;">trace</span>;
			<span style="color: #0066CC;">_target</span> = <span style="color: #0066CC;">target</span>;
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>closure <span style="color: #66cc66;">!</span>= <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span> addCallback<span style="color: #66cc66;">&#40;</span>closure<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> prop <span style="color: #b1b100;">in</span> propsTo<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> 
				<span style="color: #b1b100;">switch</span> <span style="color: #66cc66;">&#40;</span>prop<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					<span style="color: #b1b100;">case</span> <span style="color: #ff0000;">&quot;alpha&quot;</span>:
						<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_target</span> is DisplayObject<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
							_propsTo<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> = <span style="color: #66cc66;">&#40;</span>propsTo<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">!</span>= <span style="color: #0066CC;">undefined</span><span style="color: #66cc66;">&#41;</span> ? propsTo<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> : <span style="color: #0066CC;">_target</span><span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span>;	
						<span style="color: #66cc66;">&#125;</span>
						<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_target</span> is DisplayObject3D<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
							<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>propsTo<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">!</span>= <span style="color: #0066CC;">undefined</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
								_propsTo<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> = propsTo<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span>;
							<span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span>
								<span style="color: #0066CC;">_target</span>.<span style="color: #006600;">extra</span><span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
								_propsTo<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> = <span style="color: #0066CC;">_target</span>.<span style="color: #006600;">extra</span><span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> = <span style="color: #0066CC;">_target</span>.<span style="color: #006600;">extra</span><span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span>;
							<span style="color: #66cc66;">&#125;</span>
						<span style="color: #66cc66;">&#125;</span>
						<span style="color: #b1b100;">break</span>;
					<span style="color: #000000; font-weight: bold;">default</span>:
						_propsTo<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> = <span style="color: #66cc66;">&#40;</span>propsTo<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">!</span>= <span style="color: #0066CC;">undefined</span><span style="color: #66cc66;">&#41;</span> ? propsTo<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> : <span style="color: #0066CC;">_target</span><span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span>;
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		override <span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span> <span style="color: #66cc66;">&#41;</span> :<span style="color: #0066CC;">Boolean</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">!</span><span style="color: #0066CC;">_target</span><span style="color: #66cc66;">&#41;</span> <span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">false</span>;
			<span style="color: #000000; font-weight: bold;">var</span> prop:<span style="color: #0066CC;">String</span>;
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>prop <span style="color: #b1b100;">in</span> _propsTo<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> 
				<span style="color: #b1b100;">switch</span> <span style="color: #66cc66;">&#40;</span>prop<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					<span style="color: #b1b100;">case</span> <span style="color: #ff0000;">&quot;alpha&quot;</span>:
						<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_target</span> is DisplayObject<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
							_startProps<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> = <span style="color: #0066CC;">_target</span><span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span>;
						<span style="color: #66cc66;">&#125;</span>
						<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_target</span> is DisplayObject3D<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
							<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;start: &quot;</span>+<span style="color: #0066CC;">_target</span>.<span style="color: #006600;">extra</span><span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
							_startProps<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> = <span style="color: #0066CC;">_target</span>.<span style="color: #006600;">extra</span><span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span>;	
						<span style="color: #66cc66;">&#125;</span>
						<span style="color: #b1b100;">break</span>;
					<span style="color: #000000; font-weight: bold;">default</span>:
						_startProps<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> = <span style="color: #0066CC;">_target</span><span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span>;
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>useRelative<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>prop <span style="color: #b1b100;">in</span> _propsTo<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> 
				    _changeProps<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> = _propsTo<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span>;
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #b1b100;">else</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span>prop <span style="color: #b1b100;">in</span> _propsTo<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> 
				    _changeProps<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> = <span style="color: #66cc66;">&#40;</span>_propsTo<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> - _startProps<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>; <span style="color: #808080; font-style: italic;">//_propsTo[prop];</span>
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #b1b100;">return</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">super</span>.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #808080; font-style: italic;">//TODO add alpha tweening syntax when released in 2.0 update</span>
		override protected <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">onUpdate</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">type</span>:<span style="color: #0066CC;">String</span><span style="color: #66cc66;">&#41;</span> : <span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> prop <span style="color: #b1b100;">in</span> _propsTo<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span> 
				<span style="color: #b1b100;">switch</span> <span style="color: #66cc66;">&#40;</span>prop<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					<span style="color: #b1b100;">case</span> <span style="color: #ff0000;">&quot;alpha&quot;</span>:
						<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_target</span> is DisplayObject3D<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
							<span style="color: #808080; font-style: italic;">//var val:Number = super.correctValue(_startProps[prop] + _changeProps[prop] * _position);</span>
							<span style="color: #808080; font-style: italic;">//_target.material.bitmap.colorTransform(_target.material.bitmap.rect, new ColorTransform(1, 1, 1, val, 0, 0, 0, 0));</span>
							<span style="color: #808080; font-style: italic;">//_target.extra[prop] = val;</span>
							debug<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;Current version of Pv3D does not support alpha tweening&quot;</span><span style="color: #66cc66;">&#41;</span>;
						<span style="color: #66cc66;">&#125;</span>
						<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_target</span> is DisplayObject<span style="color: #66cc66;">&#41;</span> <span style="color: #0066CC;">_target</span><span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> = <span style="color: #0066CC;">super</span>.<span style="color: #006600;">correctValue</span><span style="color: #66cc66;">&#40;</span>_startProps<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> + _changeProps<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">*</span> _position<span style="color: #66cc66;">&#41;</span>;
						<span style="color: #b1b100;">break</span>;
					<span style="color: #000000; font-weight: bold;">default</span>:
						<span style="color: #0066CC;">_target</span><span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> = <span style="color: #0066CC;">super</span>.<span style="color: #006600;">correctValue</span><span style="color: #66cc66;">&#40;</span>_startProps<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> + _changeProps<span style="color: #66cc66;">&#91;</span>prop<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">*</span> _position<span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
			<span style="color: #66cc66;">&#125;</span>
			<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">_target</span> is DisplayObject3D<span style="color: #66cc66;">&#41;</span> _renderer.<span style="color: #006600;">renderScene</span><span style="color: #66cc66;">&#40;</span>_scene,_camera,_viewport<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>I plan on adding effects as well as the alpha property when 2.0 is able to support that. Shadows, layer effects, and more still to come!</p>
<hr />
<a href='http://blog.hydrotik.com/wp-content/flipping_banner_2_part1.zip' title='Papervision 2.0 Flipping Banner Source Part 1'>Papervision 2.0 Flipping Banner Source Part 1</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hydrotik.com/2007/12/10/papervision3d-20-go-tweening-flipping-banner-part-1/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
		<item>
		<title>Papervision 2.0</title>
		<link>http://blog.hydrotik.com/2007/12/04/papervision-20/</link>
		<comments>http://blog.hydrotik.com/2007/12/04/papervision-20/#comments</comments>
		<pubDate>Tue, 04 Dec 2007 04:19:03 +0000</pubDate>
		<dc:creator>djdonovan</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[FDT]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[General]]></category>
		<category><![CDATA[Papervision]]></category>

		<guid isPermaLink="false">http://blog.hydrotik.com/2007/12/04/papervision-20/</guid>
		<description><![CDATA[Had a great time at the Papervision 2.0 seminar with John Grden and Andy Zupko here in NYC. Lot of eager people braving the cold snowy weather. It was slow at times trying to get everyone going on Flex. This gave me time to get the demos working in AS3 only FDT projects. Hopefully with [...]]]></description>
			<content:encoded><![CDATA[<p>Had a great time at the Papervision 2.0 seminar with <a href="http://www.rockonflash.com/blog/" target="_blank">John Grden</a> and <a href="http://blog.zupko.info/" target="_blank">Andy Zupko</a> here in NYC. Lot of eager people braving the cold snowy weather. It was slow at times trying to get everyone going on Flex. This gave me time to get the demos working in AS3 only FDT projects. Hopefully with John's and Andy's blessing I can put those demos here on the blog <img src='http://blog.hydrotik.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hydrotik.com/2007/12/04/papervision-20/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>AS3 Papervision + Sound Visualizer + Line3D + Tweener &#8211; Part 2 FF07</title>
		<link>http://blog.hydrotik.com/2007/09/20/as3-papervision-sound-visualizer-line3d-tweener-part-2/</link>
		<comments>http://blog.hydrotik.com/2007/09/20/as3-papervision-sound-visualizer-line3d-tweener-part-2/#comments</comments>
		<pubDate>Fri, 21 Sep 2007 01:43:31 +0000</pubDate>
		<dc:creator>djdonovan</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Flash Forward 07]]></category>
		<category><![CDATA[Papervision]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://blog.hydrotik.com/2007/09/20/as3-papervision-sound-visualizer-line3d-tweener-part-2/</guid>
		<description><![CDATA[So here's my Flash Forward inspired piece!
Once again used Andy's great Line3D class and gave it a Flash Forward 07 twist.

package com.hydrotik &#123;
&#160;
	import flash.events.Event;
	import flash.display.*;
	import flash.net.URLRequest;
	import flash.media.Sound;
	import flash.media.SoundChannel;
	import flash.media.SoundMixer;
	import flash.utils.ByteArray;
	import caurina.transitions.Tweener;
	import org.papervision3d.core.proto.*;
	import org.papervision3d.core.geom.*;
	import org.papervision3d.scenes.*;
	import org.papervision3d.cameras.*;
	import org.papervision3d.objects.*;
	import org.papervision3d.materials.*;
&#160;
	public class Hydro3D extends Sprite &#123;
&#160;
		private static const LOOP:String = &#34;../flashassets/mp3/jens_buchert.mp3&#34;;
&#160;
		private const STAGE_WIDTH		:Number = 600;
		private const STAGE_HEIGHT		:Number = 300;
		private [...]]]></description>
			<content:encoded><![CDATA[<p>So here's my Flash Forward inspired piece!</p>
<p>Once again used <a href="http://blog.zupko.info/" target="_blank">Andy's</a> great Line3D class and gave it a Flash Forward 07 twist.</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package com.<span style="color: #006600;">hydrotik</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #0066CC;">Sound</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #006600;">SoundChannel</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">media</span>.<span style="color: #006600;">SoundMixer</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">ByteArray</span>;
	<span style="color: #0066CC;">import</span> caurina.<span style="color: #006600;">transitions</span>.<span style="color: #006600;">Tweener</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">proto</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">geom</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">scenes</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">cameras</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">objects</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #66cc66;">*</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Hydro3D <span style="color: #0066CC;">extends</span> Sprite <span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #0066CC;">static</span> const LOOP:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;../flashassets/mp3/jens_buchert.mp3&quot;</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> const STAGE_WIDTH		:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">600</span>;
		<span style="color: #0066CC;">private</span> const STAGE_HEIGHT		:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">300</span>;
		<span style="color: #0066CC;">private</span> const ANIMATION_TIME	:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">1</span>;
		<span style="color: #0066CC;">private</span> const ANIMATION_TYPE	:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;easeoutquad&quot;</span>;
		<span style="color: #0066CC;">private</span> const MULT				:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">10</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> controlPoints		:<span style="color: #0066CC;">Array</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> itemArray			:<span style="color: #0066CC;">Array</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> trailArray			:<span style="color: #0066CC;">Array</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> currTrailArray		:<span style="color: #0066CC;">Array</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> lineArray			:<span style="color: #0066CC;">Array</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> count				:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> container 			:Sprite;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> scene     			:MovieScene3D;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">camera</span>    			:Camera3D;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> sc					:SoundChannel;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> s					:<span style="color: #0066CC;">Sound</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> lines	  			:Line3D;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Hydro3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
			controlPoints = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
			itemArray = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
			trailArray = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
			currTrailArray = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
			lineArray = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
&nbsp;
			s = <span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Sound</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			s.<span style="color: #0066CC;">load</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span>LOOP<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
			sc = s.<span style="color: #0066CC;">play</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">1000</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">//container</span>
			container = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			container.<span style="color: #006600;">cacheAsBitmap</span> = <span style="color: #000000; font-weight: bold;">true</span>;
			addChild<span style="color: #66cc66;">&#40;</span> container <span style="color: #66cc66;">&#41;</span>;
			container.<span style="color: #006600;">x</span> = STAGE_WIDTH<span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span>;
			container.<span style="color: #006600;">y</span> = STAGE_HEIGHT<span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">//scene</span>
			scene = <span style="color: #000000; font-weight: bold;">new</span> MovieScene3D<span style="color: #66cc66;">&#40;</span> container <span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">//camera</span>
			<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>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">z</span> = -<span style="color: #cc66cc;">200</span>;
&nbsp;
			addEventListener<span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">ENTER_FRAME</span>, <span style="color: #0066CC;">onEnterFrame</span> <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">onEnterFrame</span><span style="color: #66cc66;">&#40;</span> event: Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">x</span> +=<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>container.<span style="color: #006600;">mouseX</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span> - <span style="color: #0066CC;">camera</span>.<span style="color: #006600;">x</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">0.005</span>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">y</span> +=<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>container.<span style="color: #006600;">mouseY</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span> - <span style="color: #0066CC;">camera</span>.<span style="color: #006600;">y</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">0.005</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> bytes:ByteArray = <span style="color: #000000; font-weight: bold;">new</span> ByteArray<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			SoundMixer.<span style="color: #006600;">computeSpectrum</span><span style="color: #66cc66;">&#40;</span>bytes, <span style="color: #000000; font-weight: bold;">false</span>, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> amp:<span style="color: #0066CC;">Number</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>sc.<span style="color: #006600;">leftPeak</span> + sc.<span style="color: #006600;">rightPeak</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			lineArray<span style="color: #66cc66;">&#91;</span>count<span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> Line3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span><span style="color: #000000; font-weight: bold;">new</span> Vertex3D<span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">128</span>, <span style="color: #cc66cc;">0</span>, -<span style="color: #66cc66;">&#40;</span>count <span style="color: #66cc66;">*</span> MULT<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>, rgbToHex<span style="color: #66cc66;">&#40;</span>count<span style="color: #66cc66;">/</span><span style="color: #cc66cc;">4</span>, count<span style="color: #66cc66;">/</span><span style="color: #cc66cc;">6</span>, count<span style="color: #66cc66;">&#41;</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
			scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>lineArray<span style="color: #66cc66;">&#91;</span>count<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #b1b100;">for</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">256</span>; i++<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
				<span style="color: #000000; font-weight: bold;">var</span> v:Vertex3D = <span style="color: #000000; font-weight: bold;">new</span> Vertex3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>i<span style="color: #66cc66;">*</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span> - <span style="color: #cc66cc;">128</span>, bytes.<span style="color: #006600;">readFloat</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">300</span>, -<span style="color: #66cc66;">&#40;</span>count <span style="color: #66cc66;">*</span> MULT<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
				lineArray<span style="color: #66cc66;">&#91;</span>count<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">addVertex</span><span style="color: #66cc66;">&#40;</span>v<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>lineArray<span style="color: #66cc66;">&#91;</span>count<span style="color: #66cc66;">&#93;</span>, <span style="color: #66cc66;">&#123;</span>
						alpha:<span style="color: #cc66cc;">0</span>,
						<span style="color: #0066CC;">time</span>:ANIMATION_TIME,
						transition:ANIMATION_TYPE,
						onComplete:removeLine,
						onCompleteParams:<span style="color: #66cc66;">&#91;</span>lineArray<span style="color: #66cc66;">&#91;</span>count<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#93;</span>
					<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			scene.<span style="color: #006600;">renderCamera</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">camera</span> <span style="color: #66cc66;">&#41;</span>;
			count = <span style="color: #66cc66;">&#40;</span>count <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">50</span><span style="color: #66cc66;">&#41;</span> ? count + <span style="color: #cc66cc;">1</span> : <span style="color: #cc66cc;">0</span>;
		<span style="color: #66cc66;">&#125;</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> removeLine<span style="color: #66cc66;">&#40;</span>l:Line3D = <span style="color: #000000; font-weight: bold;">null</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span><span style="color: #66cc66;">&#123;</span>
			scene.<span style="color: #006600;">removeChild</span><span style="color: #66cc66;">&#40;</span>l<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> rgbToHex<span style="color: #66cc66;">&#40;</span>uR:uint, uG:uint, uB:uint<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#123;</span>
            <span style="color: #000000; font-weight: bold;">var</span> uColor:uint;
            uColor =  <span style="color: #66cc66;">&#40;</span>uR <span style="color: #66cc66;">&amp;</span> <span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;&lt;</span> <span style="color: #cc66cc;">16</span>;
            uColor += <span style="color: #66cc66;">&#40;</span>uG <span style="color: #66cc66;">&amp;</span> <span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&lt;&lt;</span> <span style="color: #cc66cc;">8</span>;
            uColor += <span style="color: #66cc66;">&#40;</span>uB <span style="color: #66cc66;">&amp;</span> <span style="color: #cc66cc;">255</span><span style="color: #66cc66;">&#41;</span>;
            <span style="color: #b1b100;">return</span> uColor;
        <span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>I didn't do anything with the amplitude but I left it in there if you decide you want to play with it. It's somewhat processor intensive. I wish external mp3's would loop. You'd think Adobe would have addressed that by now. Because of that, you'd want to attach it from your library, but I think it's ok for testing. Helps you find a good loop that gives you good results when playing with a visualizer. Just overwrite the mp3 file or switch the path.</p>
<p>Once again the loop I'm using: </p>
<p><a href="http://phobos.apple.com/WebObjects/MZStore.woa/wa/viewAlbum?id=184808563&#038;s=143441" target="_blank"><img src="http://a1.phobos.apple.com/r10/Music/dc/f9/46/mzi.pglxnrzy.170x170-75.jpg" alt="Jens Buchert" /></a><br />
The music is the song "Mélange Eléctrique" from Jens Buchert's album <em>Spa Lounge</em>. Great downtempo album.</p>
<hr />
<p><a href='http://blog.hydrotik.com/wp-content/lines3d_part2.zip' title='Lines3D Part 2 Source'>Lines3D Part 2 Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hydrotik.com/2007/09/20/as3-papervision-sound-visualizer-line3d-tweener-part-2/feed/</wfw:commentRss>
		<slash:comments>6</slash:comments>
		</item>
		<item>
		<title>Papervision + Tweener + AS3 &#8211; Flipping Banner</title>
		<link>http://blog.hydrotik.com/2007/09/16/papervision-as3-flipping-banner/</link>
		<comments>http://blog.hydrotik.com/2007/09/16/papervision-as3-flipping-banner/#comments</comments>
		<pubDate>Mon, 17 Sep 2007 02:43:12 +0000</pubDate>
		<dc:creator>djdonovan</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Papervision]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://blog.hydrotik.com/2007/09/16/papervision-as3-flipping-banner/</guid>
		<description><![CDATA[UPDATE: Since I'm having problems with the SWF embedding, download the files to preview. Also be sure to check out the newer version with PV3D 2.0
Here's a little simple and practical application I had to put together for work using papervision.  Nothing to write home about. Just a real world example that proves how [...]]]></description>
			<content:encoded><![CDATA[<p><strong>UPDATE: Since I'm having problems with the SWF embedding, download the files to preview. Also be sure to check out the newer version with PV3D 2.0</strong></p>
<p>Here's a little simple and practical application I had to put together for work using papervision.  Nothing to write home about. Just a real world example that proves how easy it is to add papervision to your daily workflow. All this does is load a set of images from an XML file and papervision transitions from one to the other by flipping the plane using Tweener.</p>
<p>Core class:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">pageflip</span><span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">/**
	 * @author Donovan Adams
	 * @version Sept 16, 2007
	 * @description Papervision Page flip example
	 * 
	 */</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLLoader</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">URLRequest</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">net</span>.<span style="color: #006600;">navigateToURL</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">Stage</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">DisplayObject</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Shape</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #006600;">StyleSheet</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextField</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #0066CC;">TextFormat</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #0066CC;">text</span>.<span style="color: #006600;">TextFieldAutoSize</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">filters</span>.<span style="color: #006600;">BlurFilter</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> caurina.<span style="color: #006600;">transitions</span>.<span style="color: #006600;">Tweener</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">utils</span>.<span style="color: #006600;">XMLManager</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">pageflip</span>.<span style="color: #006600;">Flip</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">pageflip</span>.<span style="color: #006600;">FlipEvent</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Core <span style="color: #0066CC;">extends</span> Sprite <span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _scope:<span style="color: #0066CC;">MovieClip</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _stage:<span style="color: #0066CC;">Stage</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">_url</span>:<span style="color: #0066CC;">String</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _xml:<span style="color: #0066CC;">XML</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">url</span>:<span style="color: #0066CC;">String</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _hit:Sprite;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Core<span style="color: #66cc66;">&#40;</span>scope:<span style="color: #0066CC;">MovieClip</span>, <span style="color: #0066CC;">stage</span>:<span style="color: #0066CC;">Stage</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			_scope = scope;
			_stage = <span style="color: #0066CC;">stage</span>;
			<span style="color: #0066CC;">_url</span> = _scope.<span style="color: #006600;">loaderInfo</span>.<span style="color: #0066CC;">url</span>;
			<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">xml</span>:XMLManager = <span style="color: #000000; font-weight: bold;">new</span> XMLManager<span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;../includes/admin/flippingbanner.xml&quot;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">xml</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;evtXMLLoaded&quot;</span>, onXMLComplete<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #808080; font-style: italic;">// --== Private Methods ==--</span>
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onXMLComplete<span style="color: #66cc66;">&#40;</span>event:Event<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;:: onXMLComplete:&quot;</span><span style="color: #66cc66;">&#41;</span>;
			_xml = event.<span style="color: #0066CC;">target</span>.<span style="color: #0066CC;">xml</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> _oFlip:Flip = <span style="color: #000000; font-weight: bold;">new</span> Flip<span style="color: #66cc66;">&#40;</span>_scope, _stage, <span style="color: #0066CC;">this</span>, _xml.<span style="color: #006600;">banner</span>.<span style="color: #006600;">children</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>, _xml.<span style="color: #006600;">attribute</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;seconds&quot;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
			_oFlip.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FlipEvent.<span style="color: #006600;">COMPLETE</span>, onCompleteHandler<span style="color: #66cc66;">&#41;</span>;
			_oFlip.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FlipEvent.<span style="color: #006600;">ON_FLIP</span>, onFlipHandler<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			_hit = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			_hit.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0x660000, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>;
			_hit.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">drawRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">300</span>, <span style="color: #cc66cc;">156</span><span style="color: #66cc66;">&#41;</span>;
			_scope.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>_hit<span style="color: #66cc66;">&#41;</span>;
			_hit.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>MouseEvent.<span style="color: #006600;">CLICK</span>, onClickHandler<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			_hit.<span style="color: #006600;">buttonMode</span> = <span style="color: #000000; font-weight: bold;">true</span>;
			_hit.<span style="color: #0066CC;">useHandCursor</span> = <span style="color: #000000; font-weight: bold;">true</span>;
			_hit.<span style="color: #006600;">mouseEnabled</span> = <span style="color: #000000; font-weight: bold;">true</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onClickHandler<span style="color: #66cc66;">&#40;</span>event:MouseEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;url: &quot;</span> + <span style="color: #0066CC;">url</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> request:URLRequest = <span style="color: #000000; font-weight: bold;">new</span> URLRequest<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">url</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">try</span> <span style="color: #66cc66;">&#123;</span>
				navigateToURL<span style="color: #66cc66;">&#40;</span>request, <span style="color: #ff0000;">&quot;_self&quot;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span> <span style="color: #0066CC;">catch</span> <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">e</span>:<span style="color: #0066CC;">Error</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				<span style="color: #808080; font-style: italic;">// handle error here</span>
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onCompleteHandler<span style="color: #66cc66;">&#40;</span>event:FlipEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>event<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">url</span> = event.<span style="color: #0066CC;">url</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onFlipHandler<span style="color: #66cc66;">&#40;</span>event:FlipEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span>event<span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">url</span> = event.<span style="color: #0066CC;">url</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Flipping code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">pageflip</span><span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #808080; font-style: italic;">/**
	 * @author Donovan Adams
	 * @version July 10, 2007
	 * @usage Example:&lt;code&gt;&lt;/code&gt;
	 * @description
	 * @history
	 * @sends
	 * @todo
	 * 
	 */</span>
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">EventDispatcher</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">MouseEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">filters</span>.<span style="color: #006600;">BitmapFilter</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">filters</span>.<span style="color: #006600;">BitmapFilterQuality</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">filters</span>.<span style="color: #006600;">BlurFilter</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">utils</span>.<span style="color: #006600;">Timer</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">TimerEvent</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">cameras</span>.<span style="color: #006600;">FreeCamera3D</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">core</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">geom</span>.<span style="color: #006600;">Vertex3D</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #006600;">InteractiveMovieAssetMaterial</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #006600;">BitmapFileMaterial</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #006600;">ColorMaterial</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">objects</span>.<span style="color: #006600;">Plane</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">scenes</span>.<span style="color: #006600;">InteractiveScene3D</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">InteractiveScene3DEvent</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">events</span>.<span style="color: #006600;">FileLoadEvent</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">utils</span>.<span style="color: #66cc66;">*</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> caurina.<span style="color: #006600;">transitions</span>.<span style="color: #006600;">Tweener</span>;
&nbsp;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">hydrotik</span>.<span style="color: #006600;">pageflip</span>.<span style="color: #006600;">FlipEvent</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Flip <span style="color: #0066CC;">extends</span> EventDispatcher <span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _scope:Sprite;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _stage:<span style="color: #0066CC;">Stage</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _oCore:<span style="color: #66cc66;">*</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _assetPath:<span style="color: #0066CC;">String</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> container:Sprite;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> scene:InteractiveScene3D;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">camera</span>:FreeCamera3D;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _materialArray:<span style="color: #0066CC;">Array</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _planeArray:<span style="color: #0066CC;">Array</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _array:XMLList;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _count:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _next:Plane;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _prev:Plane;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _shadowPlane:Plane;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _loader:Sprite;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">url</span>:<span style="color: #0066CC;">String</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _id:<span style="color: #0066CC;">int</span>;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> _seconds:<span style="color: #0066CC;">int</span>;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Flip<span style="color: #66cc66;">&#40;</span>scope:Sprite, <span style="color: #0066CC;">stage</span>:<span style="color: #0066CC;">Stage</span>, core:<span style="color: #66cc66;">*</span>, a:XMLList, assetPath:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;../flashassets/&quot;</span>, s:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			_scope = scope;
			_stage = <span style="color: #0066CC;">stage</span>;
			_oCore = core;
			_array = a;
			_assetPath = assetPath;
			_seconds = s;
			_materialArray = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
			_planeArray = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Add Container</span>
			container = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			container.<span style="color: #006600;">x</span> = <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span>;
			container.<span style="color: #006600;">y</span> = <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span>;
			_scope.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span> container <span style="color: #66cc66;">&#41;</span>;
&nbsp;
			scene = <span style="color: #000000; font-weight: bold;">new</span> InteractiveScene3D<span style="color: #66cc66;">&#40;</span> container <span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #0066CC;">camera</span> = <span style="color: #000000; font-weight: bold;">new</span> FreeCamera3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">z</span> = -<span style="color: #cc66cc;">500</span>;
&nbsp;
			_loader = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			_loader.<span style="color: #006600;">graphics</span>.<span style="color: #0066CC;">beginFill</span><span style="color: #66cc66;">&#40;</span>0x000000<span style="color: #66cc66;">&#41;</span>;
			_loader.<span style="color: #006600;">graphics</span>.<span style="color: #006600;">drawRect</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">4</span><span style="color: #66cc66;">&#41;</span>;
			_scope.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>_loader<span style="color: #66cc66;">&#41;</span>;
			_loader.<span style="color: #006600;">x</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span> - <span style="color: #cc66cc;">50</span>;
			_loader.<span style="color: #006600;">y</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span><span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span> - <span style="color: #cc66cc;">2</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> colorMaterial:ColorMaterial = <span style="color: #000000; font-weight: bold;">new</span> ColorMaterial<span style="color: #66cc66;">&#40;</span>0x000000, .2<span style="color: #66cc66;">&#41;</span>;
			_shadowPlane = <span style="color: #000000; font-weight: bold;">new</span> Plane<span style="color: #66cc66;">&#40;</span> colorMaterial, <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span>, <span style="color: #cc66cc;">50</span>, <span style="color: #cc66cc;">6</span>, <span style="color: #cc66cc;">6</span><span style="color: #66cc66;">&#41;</span>;
			_shadowPlane.<span style="color: #006600;">y</span> = -<span style="color: #cc66cc;">150</span>;
			_shadowPlane.<span style="color: #006600;">z</span> = <span style="color: #cc66cc;">50</span>;
			_shadowPlane.<span style="color: #006600;">rotationX</span> = -<span style="color: #cc66cc;">90</span>;
			_shadowPlane.<span style="color: #006600;">rotationY</span> = -<span style="color: #cc66cc;">180</span>;
			scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>_shadowPlane<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> filter:BitmapFilter = getBitmapFilter<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> myFilters:<span style="color: #0066CC;">Array</span> = <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>;
			myFilters.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span>filter<span style="color: #66cc66;">&#41;</span>;
			_shadowPlane.<span style="color: #006600;">container</span>.<span style="color: #006600;">filters</span> = myFilters;
			_shadowPlane.<span style="color: #006600;">container</span>.<span style="color: #006600;">alpha</span> = <span style="color: #cc66cc;">0</span>;
&nbsp;
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> _array.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				_materialArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> BitmapFileMaterial<span style="color: #66cc66;">&#40;</span>_array<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">attribute</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'src'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
				_materialArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">doubleSided</span> = <span style="color: #000000; font-weight: bold;">false</span>;
				_materialArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">smooth</span> = <span style="color: #000000; font-weight: bold;">true</span>;
				_materialArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FileLoadEvent.<span style="color: #006600;">LOAD_PROGRESS</span>, onFileProgress<span style="color: #66cc66;">&#41;</span>;
				_materialArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>FileLoadEvent.<span style="color: #006600;">LOAD_COMPLETE</span>, onFileComplete<span style="color: #66cc66;">&#41;</span>;
				_planeArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> Plane<span style="color: #66cc66;">&#40;</span> _materialArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>, <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageWidth</span>, <span style="color: #0066CC;">stage</span>.<span style="color: #006600;">stageHeight</span>, <span style="color: #cc66cc;">6</span>, <span style="color: #cc66cc;">6</span><span style="color: #66cc66;">&#41;</span>;
				scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span> _planeArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> <span style="color: #66cc66;">&#41;</span>;
				_planeArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #0066CC;">name</span> = i.<span style="color: #0066CC;">toString</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
				_planeArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">rotationY</span> = -<span style="color: #cc66cc;">180</span>;
				_planeArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">container</span>.<span style="color: #006600;">alpha</span> = <span style="color: #cc66cc;">0</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
			<span style="color: #808080; font-style: italic;">// render the scene once</span>
			scene.<span style="color: #006600;">renderCamera</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">camera</span> <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> flip<span style="color: #66cc66;">&#40;</span>id:<span style="color: #0066CC;">int</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>_next.<span style="color: #006600;">container</span>, <span style="color: #66cc66;">&#123;</span>
				alpha:<span style="color: #cc66cc;">0</span>,
				<span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">1</span>,
				transition:<span style="color: #ff0000;">&quot;easeoutquint&quot;</span>
			<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span>_next, _shadowPlane<span style="color: #66cc66;">&#93;</span>, <span style="color: #66cc66;">&#123;</span>
				rotationY:<span style="color: #cc66cc;">180</span>,
				<span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">1</span>,
				transition:<span style="color: #ff0000;">&quot;easeoutquint&quot;</span>,
				onComplete:onOldFlipDone
			<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">// Update Data</span>
			_prev = _next;
			_id = <span style="color: #66cc66;">&#40;</span>id == _array.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> ? <span style="color: #cc66cc;">0</span> : id + <span style="color: #cc66cc;">1</span>;
			_next = _planeArray<span style="color: #66cc66;">&#91;</span>_id<span style="color: #66cc66;">&#93;</span>;
			<span style="color: #0066CC;">url</span> = _array<span style="color: #66cc66;">&#91;</span>_id<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">attribute</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'link'</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			dispatchEvent<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> FlipEvent<span style="color: #66cc66;">&#40;</span>FlipEvent.<span style="color: #006600;">ON_FLIP</span>, _id, _next.<span style="color: #006600;">container</span>, <span style="color: #0066CC;">url</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>_next.<span style="color: #006600;">container</span>, <span style="color: #66cc66;">&#123;</span>
				alpha:<span style="color: #cc66cc;">1</span>,
				<span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">1</span>,
				transition:<span style="color: #ff0000;">&quot;easeoutquint&quot;</span>
			<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span>_next<span style="color: #66cc66;">&#93;</span>, <span style="color: #66cc66;">&#123;</span>
				rotationY:<span style="color: #cc66cc;">0</span>,
				<span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">1</span>,
				transition:<span style="color: #ff0000;">&quot;easeoutquint&quot;</span>,
				<span style="color: #0066CC;">onUpdate</span>:draw,
				onComplete:onFlipDone
			<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">camera</span>, <span style="color: #66cc66;">&#123;</span>
				z:-<span style="color: #cc66cc;">100</span>,
				_bezier:<span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#123;</span>z:-<span style="color: #cc66cc;">350</span><span style="color: #66cc66;">&#125;</span>, <span style="color: #66cc66;">&#123;</span>z:-<span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#93;</span>,
				<span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">2</span>,
				transition:<span style="color: #ff0000;">&quot;easeoutquint&quot;</span>
			<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onFileProgress<span style="color: #66cc66;">&#40;</span>event:FileLoadEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;<span style="color: #000099; font-weight: bold;">\t</span> percentage: &quot;</span>+<span style="color: #0066CC;">Math</span>.<span style="color: #0066CC;">round</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #0066CC;">bytesLoaded</span><span style="color: #66cc66;">/</span>event.<span style="color: #0066CC;">bytesTotal</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">100</span><span style="color: #66cc66;">&#41;</span> + <span style="color: #ff0000;">&quot;%&quot;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> sec:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">100</span><span style="color: #66cc66;">/</span>_array.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			_loader.<span style="color: #0066CC;">width</span> = <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>_count <span style="color: #66cc66;">*</span> sec<span style="color: #66cc66;">&#41;</span> + <span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>event.<span style="color: #0066CC;">bytesLoaded</span><span style="color: #66cc66;">/</span>event.<span style="color: #0066CC;">bytesTotal</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> sec<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onFileComplete<span style="color: #66cc66;">&#40;</span>event:FileLoadEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;complete!&quot;</span><span style="color: #66cc66;">&#41;</span>;
			scene.<span style="color: #006600;">renderCamera</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">camera</span> <span style="color: #66cc66;">&#41;</span>;
			_count++;
			<span style="color: #b1b100;">if</span> <span style="color: #66cc66;">&#40;</span>_count == _array.<span style="color: #0066CC;">length</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>
				onImageQueueCompleteHandler<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onImageQueueCompleteHandler<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			dispatchEvent<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> FlipEvent<span style="color: #66cc66;">&#40;</span>FlipEvent.<span style="color: #006600;">COMPLETE</span>, <span style="color: #cc66cc;">0</span>, _planeArray<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">container</span>, _array<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">attribute</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">'link'</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
			Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>_loader, <span style="color: #66cc66;">&#123;</span>
				alpha:<span style="color: #cc66cc;">0</span>,
				<span style="color: #0066CC;">time</span>:.2,
				transition:<span style="color: #ff0000;">&quot;easeoutquint&quot;</span>,
				onComplete:loaderFade
			<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
&nbsp;
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;** papervision queue complete!!&quot;</span><span style="color: #66cc66;">&#41;</span>;
			Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span>_planeArray<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">container</span>, _shadowPlane.<span style="color: #006600;">container</span><span style="color: #66cc66;">&#93;</span>, <span style="color: #66cc66;">&#123;</span>
				alpha:<span style="color: #cc66cc;">1</span>,
				<span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">1</span>,
				transition:<span style="color: #ff0000;">&quot;easeoutquint&quot;</span>
			<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span>_planeArray<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>, _shadowPlane<span style="color: #66cc66;">&#93;</span>, <span style="color: #66cc66;">&#123;</span>
				rotationY:<span style="color: #cc66cc;">0</span>,
				<span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">1</span>,
				transition:<span style="color: #ff0000;">&quot;easeoutquint&quot;</span>,
				<span style="color: #0066CC;">onUpdate</span>:draw,
				onComplete:onFlipDone
			<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">camera</span>, <span style="color: #66cc66;">&#123;</span>
				z:-<span style="color: #cc66cc;">100</span>,
				<span style="color: #0066CC;">time</span>:<span style="color: #cc66cc;">1</span>,
				transition:<span style="color: #ff0000;">&quot;easeoutquint&quot;</span>
			<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
			_next = _planeArray<span style="color: #66cc66;">&#91;</span><span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#93;</span>;
&nbsp;
			_count = -<span style="color: #cc66cc;">1</span>;
&nbsp;
			<span style="color: #000000; font-weight: bold;">var</span> myTimer:Timer = <span style="color: #000000; font-weight: bold;">new</span> Timer<span style="color: #66cc66;">&#40;</span>_seconds <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">1000</span><span style="color: #66cc66;">&#41;</span>;
			myTimer.<span style="color: #006600;">addEventListener</span><span style="color: #66cc66;">&#40;</span>TimerEvent.<span style="color: #006600;">TIMER</span>, timerHandler<span style="color: #66cc66;">&#41;</span>;
			myTimer.<span style="color: #0066CC;">start</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> timerHandler<span style="color: #66cc66;">&#40;</span>event:TimerEvent<span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;timerHandler: &quot;</span> + event<span style="color: #66cc66;">&#41;</span>;
			_count = <span style="color: #66cc66;">&#40;</span>_count == _array.<span style="color: #0066CC;">length</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span> - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span> ? <span style="color: #cc66cc;">0</span> : _count + <span style="color: #cc66cc;">1</span>;
			flip<span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> <span style="color: #0066CC;">Number</span><span style="color: #66cc66;">&#40;</span>_count<span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> draw<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			scene.<span style="color: #006600;">renderCamera</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">camera</span> <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onFlipDone<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;flip done!&quot;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> loaderFade<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			_scope.<span style="color: #006600;">removeChild</span><span style="color: #66cc66;">&#40;</span>_loader<span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> onOldFlipDone<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">trace</span><span style="color: #66cc66;">&#40;</span><span style="color: #ff0000;">&quot;old flip done!&quot;</span><span style="color: #66cc66;">&#41;</span>;
			_prev.<span style="color: #006600;">rotationY</span> = -<span style="color: #cc66cc;">180</span>;
			_shadowPlane.<span style="color: #006600;">rotationY</span> = <span style="color: #cc66cc;">0</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> getBitmapFilter<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:BitmapFilter <span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> blurX:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">5</span>;
			<span style="color: #000000; font-weight: bold;">var</span> blurY:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">5</span>;
			<span style="color: #b1b100;">return</span> <span style="color: #000000; font-weight: bold;">new</span> BlurFilter<span style="color: #66cc66;">&#40;</span>blurX,blurY,BitmapFilterQuality.<span style="color: #006600;">HIGH</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>Papervision is constantly going through new revs so keep in mind this is not the most recent. You'll see the Flip custom event, and a little XML loading utility in the source. Note that the Core file is just the main class. It could be your main timeline for all intents and purposes. Also the loader calculates the total images. I added  a shadow plane just for a slight touch but that would lend itself to a white background and fixed banner sizes. A little breathing room for the shadow would be good if you wanted to enhance the effect. It's just a jumping off point for more, so have fun! <img src='http://blog.hydrotik.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Like I said, nothing too fancy. Enjoy!</p>
<hr />
<a href='http://blog.hydrotik.com/wp-content/flipping_banner.zip' title='Papervision Flipping Banner Source'>Papervision Flipping Banner Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hydrotik.com/2007/09/16/papervision-as3-flipping-banner/feed/</wfw:commentRss>
		<slash:comments>15</slash:comments>
		</item>
		<item>
		<title>Papervision 3D + Line3D + Tweener  &#8211; Part 1</title>
		<link>http://blog.hydrotik.com/2007/08/30/papervision-3d-line3d-tweener-part-1/</link>
		<comments>http://blog.hydrotik.com/2007/08/30/papervision-3d-line3d-tweener-part-1/#comments</comments>
		<pubDate>Thu, 30 Aug 2007 21:11:51 +0000</pubDate>
		<dc:creator>djdonovan</dc:creator>
				<category><![CDATA[AS3]]></category>
		<category><![CDATA[Flash]]></category>
		<category><![CDATA[Papervision]]></category>
		<category><![CDATA[Source Code]]></category>

		<guid isPermaLink="false">http://blog.hydrotik.com/2007/08/30/papervision-3d-line3d-tweener-part-1/</guid>
		<description><![CDATA[Here's my initial experiment using the new Line3D class addition to papervision from Andy Zupko. My example is in its early stages, needs some fade and remove functionality, possibly use of a Null 3D object for the lines to draw from,. Becuase of this it has obvious performance issues after it draw for a bit. [...]]]></description>
			<content:encoded><![CDATA[<p>Here's my initial experiment using the new Line3D class addition to papervision from <a href="http://blog.zupko.info/" target="_blank">Andy Zupko</a>. My example is in its early stages, needs some fade and remove functionality, possibly use of a Null 3D object for the lines to draw from,. Becuase of this it has obvious performance issues after it draw for a bit. Hence the "Part 1&#8243; <img src='http://blog.hydrotik.com/wp-includes/images/smilies/icon_wink.gif' alt=';)' class='wp-smiley' /> </p>
<p><strong>Update &#8211; I decided to remove the example as it bogs down the page if it's running for a while. It's in dire need of incremental removal and garbage collection.</strong></p>
<p>I don't think the Line3D object has been merged into the regular updates to pv3d, but you can get the class in the source files below and from Andy's site as well.</p>
<p>Back Story: I came up with an AS3 version of a 2D version of this inspired by Felix Turner and his <a href="http://www.airtightinteractive.com/news/?p=38" target="_blank">Bezier Tween AS2 Class</a>. I'll post the code for that soon since I seem to be in the spirit of doing everything backwards these days.</p>
<p>Here's the code:</p>

<div class="wp_syntax"><div class="code"><pre class="actionscript" style="font-family:monospace;">package com.<span style="color: #006600;">hydrotik</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">events</span>.<span style="color: #006600;">Event</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">MovieClip</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #0066CC;">Stage</span>;
	<span style="color: #0066CC;">import</span> flash.<span style="color: #006600;">display</span>.<span style="color: #006600;">Sprite</span>;
	<span style="color: #0066CC;">import</span> caurina.<span style="color: #006600;">transitions</span>.<span style="color: #006600;">Tweener</span>;
	<span style="color: #0066CC;">import</span> com.<span style="color: #006600;">ascb</span>.<span style="color: #006600;">util</span>.<span style="color: #006600;">NumberUtilities</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">proto</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">core</span>.<span style="color: #006600;">geom</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">scenes</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">cameras</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">objects</span>.<span style="color: #66cc66;">*</span>;
	<span style="color: #0066CC;">import</span> org.<span style="color: #006600;">papervision3d</span>.<span style="color: #006600;">materials</span>.<span style="color: #66cc66;">*</span>;
&nbsp;
	<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">class</span> Hydro3D <span style="color: #0066CC;">extends</span> Sprite <span style="color: #66cc66;">&#123;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> const STAGE_WIDTH		:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">500</span>;
		<span style="color: #0066CC;">private</span> const STAGE_HEIGHT		:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">300</span>;
		<span style="color: #0066CC;">private</span> const ANIMATION_TIME	:<span style="color: #0066CC;">Number</span> = <span style="color: #cc66cc;">8</span>;
		<span style="color: #0066CC;">private</span> const ANIMATION_TYPE	:<span style="color: #0066CC;">String</span> = <span style="color: #ff0000;">&quot;easeoutquad&quot;</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> controlPoints		:<span style="color: #0066CC;">Array</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> itemArray			:<span style="color: #0066CC;">Array</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> trailArray			:<span style="color: #0066CC;">Array</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> currTrailArray		:<span style="color: #0066CC;">Array</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> lineArray			:<span style="color: #0066CC;">Array</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> count				:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> container 			:Sprite;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> scene     			:MovieScene3D;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">camera</span>    			:Camera3D;
&nbsp;
&nbsp;
		<span style="color: #0066CC;">public</span> <span style="color: #000000; font-weight: bold;">function</span> Hydro3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
			controlPoints = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
			itemArray = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
			trailArray = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
			currTrailArray = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
			lineArray = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
&nbsp;
&nbsp;
			<span style="color: #808080; font-style: italic;">//container</span>
			container = <span style="color: #000000; font-weight: bold;">new</span> Sprite<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
			addChild<span style="color: #66cc66;">&#40;</span> container <span style="color: #66cc66;">&#41;</span>;
			container.<span style="color: #006600;">x</span> = STAGE_WIDTH<span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span>;
			container.<span style="color: #006600;">y</span> = STAGE_HEIGHT<span style="color: #66cc66;">/</span><span style="color: #cc66cc;">2</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">//scene</span>
			scene = <span style="color: #000000; font-weight: bold;">new</span> MovieScene3D<span style="color: #66cc66;">&#40;</span> container <span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">//camera</span>
			<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>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">z</span> = -<span style="color: #cc66cc;">200</span>;
&nbsp;
			<span style="color: #808080; font-style: italic;">//Dot color</span>
			<span style="color: #000000; font-weight: bold;">var</span> <span style="color: #0066CC;">color</span>:ColorMaterial = <span style="color: #000000; font-weight: bold;">new</span> ColorMaterial<span style="color: #66cc66;">&#40;</span>0x666666, .5<span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<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 <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">2</span>; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
				trailArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> Sphere<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span>, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">2</span>, <span style="color: #cc66cc;">2</span><span style="color: #66cc66;">&#41;</span>;
				scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>trailArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
				itemArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> Sphere<span style="color: #66cc66;">&#40;</span><span style="color: #0066CC;">color</span>, <span style="color: #cc66cc;">5</span>, <span style="color: #cc66cc;">5</span>, <span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span>;
				scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>itemArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
				lineArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span> = <span style="color: #000000; font-weight: bold;">new</span> Line3D<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#91;</span><span style="color: #000000; font-weight: bold;">new</span> Vertex3D<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span>, <span style="color: #000000; font-weight: bold;">new</span> Vertex3D<span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span>, <span style="color: #cc66cc;">0</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#93;</span>, 0x333333, <span style="color: #cc66cc;">1</span>, <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span>;
				scene.<span style="color: #006600;">addChild</span><span style="color: #66cc66;">&#40;</span>lineArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			addEventListener<span style="color: #66cc66;">&#40;</span> Event.<span style="color: #006600;">ENTER_FRAME</span>, <span style="color: #0066CC;">onEnterFrame</span> <span style="color: #66cc66;">&#41;</span>;
&nbsp;
			moveIt<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> moveIt<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #000000; font-weight: bold;">var</span> deltaX:<span style="color: #0066CC;">Number</span> = NumberUtilities.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">800</span>, <span style="color: #cc66cc;">800</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> deltaY:<span style="color: #0066CC;">Number</span> = NumberUtilities.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">800</span>, <span style="color: #cc66cc;">800</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #000000; font-weight: bold;">var</span> deltaZ:<span style="color: #0066CC;">Number</span> = NumberUtilities.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">800</span>, <span style="color: #cc66cc;">800</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
			<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 <span style="color: #66cc66;">&lt;</span> itemArray.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
&nbsp;
				<span style="color: #000000; font-weight: bold;">var</span> trailList:<span style="color: #0066CC;">Array</span> = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
				<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> q:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; q <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">10</span>; q++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					trailList.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span>
						x:NumberUtilities.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, STAGE_WIDTH<span style="color: #66cc66;">&#41;</span>,
						y:NumberUtilities.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, STAGE_HEIGHT<span style="color: #66cc66;">&#41;</span>,
						z:NumberUtilities.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">200</span>, <span style="color: #cc66cc;">200</span><span style="color: #66cc66;">&#41;</span>
					<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
				Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>trailArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>, <span style="color: #66cc66;">&#123;</span>
					x:deltaX,
					y:deltaY,
					z:deltaZ,
					_bezier:trailList,
					<span style="color: #0066CC;">time</span>:ANIMATION_TIME,
					transition:ANIMATION_TYPE
				<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
&nbsp;
&nbsp;
				<span style="color: #000000; font-weight: bold;">var</span> bezierList:<span style="color: #0066CC;">Array</span> = <span style="color: #66cc66;">&#91;</span><span style="color: #66cc66;">&#93;</span>;
				<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> v:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; v <span style="color: #66cc66;">&lt;</span> <span style="color: #cc66cc;">10</span>; v++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
					bezierList.<span style="color: #0066CC;">push</span><span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#123;</span>
						x:NumberUtilities.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, STAGE_WIDTH<span style="color: #66cc66;">&#41;</span>,
						y:NumberUtilities.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span><span style="color: #cc66cc;">0</span>, STAGE_HEIGHT<span style="color: #66cc66;">&#41;</span>,
						z:NumberUtilities.<span style="color: #0066CC;">random</span><span style="color: #66cc66;">&#40;</span>-<span style="color: #cc66cc;">200</span>, <span style="color: #cc66cc;">200</span><span style="color: #66cc66;">&#41;</span>
					<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
&nbsp;
				<span style="color: #b1b100;">if</span><span style="color: #66cc66;">&#40;</span>i == itemArray.<span style="color: #0066CC;">length</span> - <span style="color: #cc66cc;">1</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#123;</span>
					Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>itemArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>, <span style="color: #66cc66;">&#123;</span>
						x:deltaX,
						y:deltaY,
						z:deltaZ,
						_bezier:bezierList,
						<span style="color: #0066CC;">time</span>:ANIMATION_TIME,
						transition:ANIMATION_TYPE,
						onComplete: moveIt
					<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span><span style="color: #b1b100;">else</span><span style="color: #66cc66;">&#123;</span>
					Tweener.<span style="color: #006600;">addTween</span><span style="color: #66cc66;">&#40;</span>itemArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>, <span style="color: #66cc66;">&#123;</span>
						x:deltaX,
						y:deltaY,
						z:deltaZ,
						_bezier:bezierList,
						<span style="color: #0066CC;">time</span>:ANIMATION_TIME,
						transition:ANIMATION_TYPE
					<span style="color: #66cc66;">&#125;</span><span style="color: #66cc66;">&#41;</span>;
				<span style="color: #66cc66;">&#125;</span>
&nbsp;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #66cc66;">&#125;</span>
&nbsp;
		<span style="color: #0066CC;">private</span> <span style="color: #000000; font-weight: bold;">function</span> <span style="color: #0066CC;">onEnterFrame</span><span style="color: #66cc66;">&#40;</span> event: Event <span style="color: #66cc66;">&#41;</span>:<span style="color: #0066CC;">void</span> <span style="color: #66cc66;">&#123;</span>
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">x</span> +=<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>container.<span style="color: #006600;">mouseX</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span> - <span style="color: #0066CC;">camera</span>.<span style="color: #006600;">x</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">0.005</span>;
			<span style="color: #0066CC;">camera</span>.<span style="color: #006600;">y</span> +=<span style="color: #66cc66;">&#40;</span><span style="color: #66cc66;">&#40;</span>container.<span style="color: #006600;">mouseY</span><span style="color: #66cc66;">*</span><span style="color: #cc66cc;">10</span><span style="color: #66cc66;">&#41;</span> - <span style="color: #0066CC;">camera</span>.<span style="color: #006600;">y</span><span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">*</span> <span style="color: #cc66cc;">0.005</span>;
&nbsp;
&nbsp;
			<span style="color: #b1b100;">for</span> <span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">var</span> i:<span style="color: #0066CC;">int</span> = <span style="color: #cc66cc;">0</span>; i <span style="color: #66cc66;">&lt;</span> itemArray.<span style="color: #0066CC;">length</span>; i++<span style="color: #66cc66;">&#41;</span> <span style="color: #66cc66;">&#123;</span>
				lineArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">addVertex</span><span style="color: #66cc66;">&#40;</span><span style="color: #000000; font-weight: bold;">new</span> Vertex3D<span style="color: #66cc66;">&#40;</span>trailArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">x</span>, trailArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">y</span>, trailArray<span style="color: #66cc66;">&#91;</span>i<span style="color: #66cc66;">&#93;</span>.<span style="color: #006600;">z</span><span style="color: #66cc66;">&#41;</span><span style="color: #66cc66;">&#41;</span>;
			<span style="color: #66cc66;">&#125;</span>
&nbsp;
			scene.<span style="color: #006600;">renderCamera</span><span style="color: #66cc66;">&#40;</span> <span style="color: #0066CC;">camera</span> <span style="color: #66cc66;">&#41;</span>;
		<span style="color: #66cc66;">&#125;</span>;
&nbsp;
	<span style="color: #66cc66;">&#125;</span>
<span style="color: #66cc66;">&#125;</span></pre></div></div>

<p>I'm almost positive there is a smoother and more efficient way to do this mathematically but I'm no math whiz. So in the meantime&#8230;</p>
<hr />
<p><a href='http://blog.hydrotik.com/wp-content/lines3d_part1.zip' title='Lines3D Source'>Lines3D Source</a></p>
]]></content:encoded>
			<wfw:commentRss>http://blog.hydrotik.com/2007/08/30/papervision-3d-line3d-tweener-part-1/feed/</wfw:commentRss>
		<slash:comments>4</slash:comments>
		</item>
	</channel>
</rss>
