David Harris's Technology Blog

ColdFusion, Flex, and other stuff...   (and 323,446 hours, 19 mins in to my plan for global domination)

Search:

Calendar:

Sun Mon Tue Wed Thu Fri Sat
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    

Subscribe:

Enter your email address to subscribe to this blog.

Archives By Subject:

Tags:

adobe air ajax cfug coldfusion flash flex frameworks free software fxug general jpgmetadatareader mac off topic opensource papervision spry

Recent Entries:

Top Posts:

Recent Comments:

Top Commenters:

My Links:

RSS:


Train + Flex2 + PaperVision =

It's been a while since I have looked at PaperVision3D, so I have been using the train trip home to refresh and learn more.

In my Geek Gift entry I wanted to have it so that it was possible to click on a single Cube and spin that one, and not the whole lot. Due to my approach and "newbe" to PV3D I never worked out how to do this.

In the new PV3D there have been lots of improvements to help people like me do stuff like that.

To show this I have added a hover event to each cube, and when your mouse hovers over a cube, that cube will spin.

If you click on a cube, filter effects are changed a bit, but that happens to all of the cubes

Hope you like it!

My Flex Playing requires Adobe Flash Player 9. Get Adobe Flash..

Simple PaperVision3D Blurring example : source code

As promised, here is the source code for the simple blurring example:

<?xml version="1.0" encoding="utf-8"?>
<mx:Application
   xmlns:mx="http://www.adobe.com/2006/mxml"
   backgroundColor="0x000000"   
   creationCompleteEffect="Fade"
   creationComplete="handleCreationComplete()"
   >

   
   <mx:Script>
      <![CDATA[
         import org.papervision3d.objects.Cube;
         
         //Do the imports
         import org.papervision3d.objects.DisplayObject3D;
         import org.papervision3d.cameras.Camera3D;
         import org.papervision3d.scenes.Scene3D;
         import org.papervision3d.objects.Plane;
         import org.papervision3d.materials.BitmapMaterial;
         import org.papervision3d.core.proto.MaterialObject3D;
      
         
         public var scene:Scene3D;
         public var camera:Camera3D;

         public var posX:Number;
         public var posY:Number;

         public function handleCreationComplete():void
         {
            
            camera = new Camera3D( new DisplayObject3D() );//make a camera             
            camera.zoom = 20;//zoom it             
            scene   = new Scene3D( sceneTarget );//make my scene             
            
            //Add my first cube
            var   c:Cube   = scene.addChild( new Cube(null,15,15,200,2,2,2) , "oneCube") as Cube;               

            //set the container of the cube...
            //because I am using "Scene3D" the container isn't automatically created
            c.container   = sceneTarget;         
            
            addEventListener( Event.ENTER_FRAME , handleEnterFrame );
            
            
         }
         
         
         public function handleEnterFrame( event:Event ):void
         {
            
            posX   = (mouseX / width) - 0.5;
            posY   = (mouseY / height) - 0.5;
            
            var factor:Number   = 50;
            
            //get the cube
            var c:Cube = scene.getChildByName( "oneCube" ) as Cube;
            
            //blur it
            var blur:BlurFilter   = new BlurFilter();
            
            blur.blurX = Math.abs( factor * posX );
            blur.blurY = Math.abs( factor * posY );
            
            c.container.filters   = [blur];
            
            //spin it...
            c.rotationX += factor * posY;
            c.rotationY += factor * posX;
         
            scene.renderCamera( camera );
         
            
         
         }
         
      ]]>
   </mx:Script>
   
   
   
   
   <mx:Panel
      width="100%"
      height="100%"
      verticalAlign="middle"
      horizontalAlign="center"
   >

      <mx:Canvas
         id="sceneTarget"
      />

   </mx:Panel>
   
</mx:Application>

...file attached to for your downloading pleasure...

yes, it is very simple, but I was learning how to work with filters...and nothing else! ;-)

Simple PaperVision3D Blurring example

I did this to work out how to do blurring in PaperVision.

It is very simple, but for some reason I spent ages looking at it and spinning it round...

...do you know why?

'ave a look

My PaperVision Playing requires Adobe Flash Player 9. Get Adobe Flash..

PS: I'll tidy up the code and post it soon... *promise!*

PaperVision3D is good for cubes! - a "geek" gift

At my current work place (http://www.straker.co.nz) a work mate left, so I decided to "give" her a geek gift, using Flex2 and PaperVision3D

I enjoyed doing this, and learnt lots about working with Bitmaps in ActionScript while messing with my work mate's faces!

enough words... 'ave a look!

My PaperVision Playing requires Adobe Flash Player 9. Get Adobe Flash..

PS: All the best Ant!

Paper Vision 3D Sphere - Carousels on Steroids!

Check this out.

A bit more fun with a Carousel.

What I have done is added multiple carousels (9 in fact) with different number of pictures and radius settings.

The effect is quite fun!

'ave a look:

[More]

PaperVision Carousel0.3 - one step closer to the master plan!

Ok, I admit it, this is more for fun than anything...

I am working towards a finished idea, but this is a small step towards it...

Hope you like it!

[More]

Carousel v0.2 - source code

the source code for my Carousel thus far is attached to this entry.

Click on the "download" button at the bottom.

Enjoy!

you can get PaperVision from here: PaperVision Wiki.

PaperVision3D/Flex2 Carousel v0.2

I've been chatting online to someone who knows more 3D than me (which isn't hard to know more!), and her advice to me was "Maths is your friend".

This is good advice, and I am attempting to learn about the "z" and radians etc...

...but...

in my previous post I put up a version of a Carousel I am working with and the images in the carousel didn't face away from the center correctly.

[More]

Paper Vision, Flex2 and my daughter on a carousel

This isn't perfect, but I'm getting there.

I have a master plan I am working towards, and it involves displaying images in a carousel...

This is where I am at so far:

[More]

PaperVision, Flex2 and my daughter all playing together!

In my ever increasing quest for cramming my head with stuff, I have been attempting to learn 3D stuff, using PaperVision3D.

Here is my first example! Very basic compared with what others are doing, but *I* did this one!

I've still got lots to learn, but in the mean time, 'ave a look!

My PaperVision Playing requires Adobe Flash Player 9. Get Adobe Flash..

Thanks to Campbell Anderson for his help!