Wednesday, May 30, 2007

Synthea Status

This is the first detailed status update.


1. Coming Soon =0)


1. Drawing Application
This is just using the flash drawing API. I experimented with some features that add a little spice to the api itself. It still needs to be optimized ALOT, at this point, the way the drawing app is setup, the flash player will use up too much RAM and cause it to render at a very low FPS if the drawing is too complex. (this shouldn't be too difficult to fix)

2. Video Player
Actionscript 3 is quite different from Actionscript 2. There are several ways to add video to a project through AS3. I've been experimenting with the different methods to see which method would be the best to use with Synthea. The classes being experimented with are: Video Class, Video Player Class, Video Error Class, Video Event Class, Video Progress Event Class, Video Scale Mode Class, and Video State Class.

One thing to note: the Video Player Class and the Video Class are very similar, but the Video Player Class seems to be the more powerful version. All are being used with NetConnection Class, and NetSream class to allow the videos to interact with a server interface.

3. XML
XML in AS3 is fun. As I write this, i'm actually taking a break from working on a new class that will handle recorded drawings. The way the drawings will work is...

As the video plays, it has a timestamp thats formatted like 00:00:00:00, Hh:Mm:Ss:MSms (hours:minutes:seconds:miliseconds). As the video plays, the timestamp increases like so; 00:00:00:01, 00:00:00:02 ... 00:01:12:65, etc...

When the Mouse is pressed down and moved simultaneously the timestamp is recorded in an xml object in flash (i may record it in an array, then add it to the xml object later, not sure yet). Anyhow, along with the timestamp, a few other attributes are stored. The X and Y position of the mouse, the Size, and the Color of the drawing.

The one big problem i've run into with this method is duplicate timestamps. If not programmed correctly, the application will simply skip over all the duplicate timestamps and will not redraw the points that it recorded.

My workaround for this is to modify the framerate of the flash SWF dyanmically to always match the framerate of the flv. When the video is paused, the framerate will continue on the same as it was before the video is paused. At this point all the points in the xml node will be nested within that node. Once the video is played again it will continue to add new xml nodes along with their properties.

Im sure there are some issues with this method, but they'll pop up later and I can worry about them then.


1. Integrate the drawing app into a video and record the drawing in xml.
2. Create a database to hold the xml and videonames. (im debating whether or not i should store the XML itself in the database or create an XML file and load it in during playback).


Theres much more and I'll post on it all as it comes to mind.