Papervision 3D Programming Tutorial - Creating a Papervision Component
See how Papervision can be packaged into a SWC Flash component, which allows you to drag and drop Papervision into any Flex or Flash application. Demo and source code included.
For all of Papervision's technical brilliance, there is one major factor that prevents it being used in more Flash applications: it's complicated. You need a good understanding of ActionScript, 3D concepts and some fairly low level resource loading and handling techniques in order to use Papervision, which are skills that very few artists have. For those used to drawing and animating an image, and maybe dropping a button or two onto a canvas, Papervision is just something that is too complicated to use.
Fortunately Flash has introduced the concept of components, which allows you to create a UI element that can be dropped onto a Flash application and edited just like you would a button or a combo box. It removed the need to know anything about ActionScript because all the properties can be accessed and modified by the graphical editor.
Technically speaking these components are just subclasses of the UIComponent class. Those who have been following my posts will realised that I have already extended the UIComponent class for the EngineManager. However there are a few more functions that need to be overridden before you can use Papervision as a drag and drop component. I won't go into the details of how to create a Flash component, but you can find the details at http://s.scribd.com/doc/136930/Creating-and-Extending-Flex-Components.
As you can see (if you look at the source code) once Papervision has been packed into a SWC component it is simply a matter of dropping it onto you application and modifying a few parameters. The actual code from the end users point of view is next to nothing (see the ModelViewerTestApp.mxml file for an example).
Check out the demo here, and download the source code here.

Nothing Found!
Why not submit your own content? Signup here.
-
Javascript functions for : trim, right trim, left trim, no Apostrophe, is Empty , is Digit , VarChar To Number , is integer , check Is Zero , Get Que | By xxris | in Programming
Javascript functions for : trim, right trim, left trim, no Apostrophe, is Empty , is Digit , VarChar To Number , i...
-
How to access and use a Window's command line | By MaxwellPayne | in Programming
Learn about the Window's command line in DOS and how to use it....
-
Zen Cart Development – Improved Open Source for Shopping Cart | By dainawill | in Programming
Main task of every online merchant is not only to launch the online store successfully but to keep it on the same l...
-
How to Learn to Program Your Computer | By dsj8760 | in Programming
This article is about learning to program a computer. It is a general article giving tips on how to learn about pro...
-
Jailbroken iPhones get RickRolled | By explorer | in Programming
First iPhone worm, attacks via SSH and does the classic rick roll gag on the user....
-
Away3D Programming Tutorial - Environment Material | By mcasperson | in Programming
See how to use the EnviroBitmapMaterial to create a real time reflective look in Away3D. Demo and source code inclu...
-
Away3D Programming Tutorial - Primitives | By mcasperson | in Programming
See how easy it is to use the build in primitive shapes supplied with Away3D. Demo and source code included....
-
Away3D Programming Tutorial - Mouse Interaction | By mcasperson | in Programming
Learn how to respond to mouse events in Away3D. Demo and source code included....
-
Away3D Programming Tutorial - Effects | By mcasperson | in Programming
See how you can add the standard Flash filters to any Away3D object to easily create advanced effects. Demo and sou...
-
Away3D Programming Tutorials - Getting Started | By mcasperson | in Programming
Learn how to get started with the Away3D Flash 3D engine with this detailed, step by step tutorial. Demo and source...








No comments yet.