Tag: AS3
Photo Shoot Builder v0.2.3a
by Brian Hodge on Aug.27, 2009, under Actionscript 3.0, FlashDevelop, Flex SDK
I haven’t blogged in some time because many things have been going on. I am no longer working at Streetwise and I am freelancing at home. So far the journey has been pleasant. I now have much more time to work on personal projects and once such project is Photo Shoot Builder. PSB is still alpha quality, but we will be going beta with is soon.
Bram Timmer, a long time friend and very strong designer/photographer, suggested that photographers needed a more elegant method of creating these set lists. Bram soon handed off the creative to me in the form of a PSD, as we usually do, and after a lot of cutting, codeing and compiling, we find ourselves at v0.2.3. Click the link below.
Photo Shoot Builder is merely a drag and drop enabled tool for building a typical set diagram that is rather common in photography. It utilizes many different design patterns, all within context, and the site is very extensible, easy to update, and performs very well. When the end-user is ready, he or she may choose to save as jpg or png. We are close to enabling the Flickr upload mechanism as well. Go play with the application, but remember it isn’t even beta yet. If you are going to leave feedback, please be constructive.
Papervision 3D: Great White and MD2
by Brian Hodge on Feb.27, 2009, under Papervision3D
The studio that I am working at, Streetwise, has had me checking out the various 3D engines available to Actionscript3. I played with Papervision3D first and was immediately disappointed with the lack of tutorials. I then moved onto Away3D because it appeared to have an abundance of tutorials all delivered on an easy to navigate, well constructed website. After a few projects in Away3D it became apparent to me that Away3D is a “PORT” of Papervision3D, meaning it borrows from, or ” EXTENDS”, from Papervision3D. After asking some other developers on stackoverflow.com, I came to the conclusion that I needed to give Papervision3D another shot. Thanks to google, I found more tutorials and a strong backing behind Papervision3D. When I was looking around at was being done out there, I stumbled upon http://www.saveyoursensible.com, a neat little site that utilizes a 3D character that you can interact with. I was reading somewhere where people were discussing this mixture of Papervision3D and an md2 for light-wieght, low poly, character animations. I found a quake model that I like, downloaded the md2 and used the following to produce it in the flash runtime. The following shows how to render and md2 in the flash runtime using the Papervision3D API.
-
- package com.streetwise.ui
- {
- import org.papervision3d.view.Viewport3D;
- import org.papervision3d.scenes.Scene3D;
- import org.papervision3d.cameras.Camera3D;
- import org.papervision3d.events.FileLoadEvent;
- import org.papervision3d.materials.BitmapFileMaterial;
- import org.papervision3d.objects.parsers.MD2;
- import org.papervision3d.render.BasicRenderEngine;
- {
- private var viewport:Viewport3D;
- private var scene:Scene3D;
- private var camera:Camera3D;
- private var _quakeGuy:MD2;
- private var renderer:BasicRenderEngine;
- public function Main():void
- {
- if(stage) init();
- }
- {
- viewport = new Viewport3D(550, 400, false, true);
- addChild(viewport);
- scene = new Scene3D();
- camera = new Camera3D();
- renderer = new BasicRenderEngine();
- camera.zoom = 400;
- camera.focus = 12;
- _quakeGuy = new MD2(false);
- _quakeGuy.rotationX = -90;
- _quakeGuy.rotationY = -90;
- _quakeGuy.addEventListener( FileLoadEvent.ANIMATIONS_COMPLETE, onAnimationsComplete );
- _quakeGuy.load("assets/quakeguy/tris.md2 " , new BitmapFileMaterial("assets/quakeguy/quake.png"));
- scene.addChild( _quakeGuy );
- }
- private function onAnimationsComplete( event:FileLoadEvent ) : void
- {
- _quakeGuy.play();
- }
- {
- renderer.renderScene(scene, camera, viewport);
- }
- }
- }
It is important to try things, play with functionality, learn how to dig into the docs make something new. The more you experiment, the better you get at experimenting. I was in no way the first to do this, but I now have a great understanding.
The next step is to purchase QTiP, a plugin for 3D Studio Max, which enables you to create your own md2 files complete with animation. This is how the developers of the sensibles project above achieved their goal.
AS3 Video Control: Scrubbing and click to point.
by Brian Hodge on Jan.28, 2009, under Uncategorized
Click here to watch the video.
For those of you who are familiar with Lee Brimelow and his works over at www.gotoandlearn.com some of the code may look familiar. This is because I follow his practices as best practices. I wanted to show some more video control functionality so I made a tutorial based off the work I learned from Lee. If you want to see the tutorials that precede this one head over to www.gotoandlearn.com. For the sake of file size and time I start my tutorial with a scrubbing scrollbar that controls nothing, it just merely has mouse input control. Through the tutorial I show how to add smooth and responsive video scrubbing, as well as a click to point method for the track that the scrubber slides on. Clicking the track will move the scrubber centered directly under the mouse.
