Archive for the ‘ AS3 ’ Category

NEW: Papervision3D Component 2.1

I’ve just posted the latest version of the component for the Flash IDE:

It’s been a long long wait and I’ve been handing the component out at Flash conferences and classes that I’ve taught, but was waiting for Flash CS4 to be fixed to work with my component.  CS4 has alot of known issues with components, Adobe is well aware of the issues that cause my component not to work and I’m sure it’ll be fixed down the road sometime.

So for now, the component will only work in Flash CS3 IDE.

New Features and bug fixes:

1.  new Materials panel – now you can deal with your materials through this panel that Andy Zupko added oh so long ago 😉

2.  Code Templates:  I’ve put in 2 templates for writing code against the component all flushed out with all the event listeners etc.

3.  Many bugs fixed

Thanks all, and enjoy!


Flash on Tap Slides:

Flash on Tap was a GREAT conference – unbeleivably cool and laid back (at least for me it was).  It was truly great to see old friends again and hang out a bit.  Last time I went to a conference I was so stressed about about getting hours in on a project, I couldn’t enjoy Brighton.  It was a shame really.  But this time around, I really took the time to enjoy myself and just do what I wanted.  The class went great on Thursday, and the 3D panel discussion today was very cool.  I was nice to get to voice some opinions about about Flash, Unity and 3D in general.

Anyway, I rushed through my Papervision to Unity to iPhone session like mad at the end and promised I’d post the slides, so click on the image above or here.  I’d clearly planned to talk about way too much in my presentation, but I was at least able to do the sample demo app I’d put together of the obstacle course.  I was happy that people enjoyed seeing Unity in action and creating a simple game, but was bummed I didn’t even get the chance to show some scripting so they could see how very similar Unity’s Javascript is to ActionScript3.

There’s always next time!!

Seb’s Papervision black hole

THIS rocks!  I just had to give a shout out to Seb for giving me my first Papervision3D inspiration of the year!

I’d try to explain it, but I think you should just check it out for yourself 😉

Setting focus on TextFields not on stage – Papervision3D

Well, I finally came up with a fix for this issue and thought to archive it.  Basically, the issue is that when you have textfields in a Sprite that you use for a material source for Papervision3D, you want to be able to set focus to those text fields.  Without them being on stage, however, it doesn’t work to say “stage.focus = myTextField”.

So, very simply, all you have to do is add the textfield to the stage, then use stage.focus = myTextField, then re-add back to your Sprite.  Bingo, you have focus in your TextField.  Now, I should say, that i’ve seen it work with just using stage.focus = myTextField, but in this particular situation, adding it to the stage first, then setting focus, then adding it back worked.  So give it a whirl either way.


stage.focus = myTextField;

Bam! done.  As long as you’re redrawing your material so that you can see what you’re typing ( bitmapMaterial.drawBitmap()), it’ll work just fine.

Tabbing is controlled easily with:

protected function handleKeyUp(e:KeyboardEvent):void
if( e.keyCode == 9 ) // tab
if( currentField == username )
else if( currentField == password )

hope that helps someone!

Papervision3D + Xray Introspection = FINALLY

Man, after nearly 2 years of working with Papervision3D I FINALLY sat down and made it work with Papervision3D (and alot of other things).  Turns out it wasn’t that hard, I just needed to flip a switch to let other objects besides pure Objects and Array’s pass through to the interface.  It’s been digging through all of Papervision’s stuff all this time now, and I just needed to turn the key 😉  Well, there was a bit more with fixing a bug to support Dictionary’s now in Xray, but that’s all fixed now.


You can see in this picture that I’m looking at a DisplayObject3D which is actually a child object of the loaded DAE.  You can change any of the properties you see there at runtime.  This makes it an extremely useful tool for debugging, but also for learning someone else’s application as well as optimization.  You can go through and change nearly any property at runtime to see who’s causin’ the problems.

The image below shows you the fix for Dictionarys.  DisplayObject3D’s children object is a Dictionary, and so now you can see all of it’s children and continue to click your way through to the end.  This is the group of panels in the QuadTree demo and you can see each one in the list of children.

I’ve committed the code and you can check out Xray here with your favorite svn client:

You can get the Xray interface here:

The version you see in the video is the new AIR version which runs really well and as soon as I have time to package it up properly, I’ll release that version.

To get it working, put this in your code:

// create public var:
public var xray:Xray = new Xray();

// then, after you’re sure the stage is there in the main application:

Then just fire up the Xray Interface and hit the “go” button to take a snapshot and get started

On Demand Papervision Course: Optimization Techniques

For a few months now, I’ve been doing live workshops online through RMI and those have been going very well.  So finally, after this last run, we archived the class (recorded it) and are offering it up as an on demand course you can take any time you like!

We’d received alot of feed back to provide an on demand version since not everyone can make it on the days we hold them.  Given that a fair amount of you are coming from over seas, it’s even more difficult to make the time slots.  One person was taking the class at 1am in the morning 😉  So I think this will help!

This course covers the Winter Wonder Land animation and engine.  You get all the source files for the application along with alot of other demo files that I typically hand out when I teach.  It covers:

  • Materials preparation and best usage with animation
  • BitmapData concepts to replace traditional MovieClip animations at runtime
  • SWF settings that can cause better performance (or worse)
  • Using multiple viewports and BitmapViewport3D
  • Simple tricks for getting decent effects (cheaply on the cpu)
  • Shaders ( bonus material )

Title: Papervision3D 2.0 Optimization

Duration:~200 minutes

Description: We’re going to take the Winter Wonderland demo from Zero fps to the 20’s by practicing a few some less known and some well known tips and tricks concerning both the Flash Player and Papervision3D. We’ll cover image preparation and rules, the Flash Player’s idiosyncrasies and what makes Papervision3D really sing. The Winter Wonderland animation started out as slow as 2fps and ended up in the mid 20’s after all of these techniques were applied. That leaves plenty of room for additional animations and bells and whistles later on! We’ll take the source for Winter Wonderland and crawl through it together to squeeze every last FPS out possible.

Who this course is for: Flash designers / developers with Papervision3D experience.

Check it out here

Xray short walk-through video

After seeing some of the replies on my last post, I thought doing a little video on what the AS3 version is capable would be a good idea.  So here’s a little walk through: