Keun Lee

Developer Journal

20070323 Friday March 23, 2007

Molecular Models in Papervision 3D

This is an addition to an earlier post I made using papervision 3d. In the Molecular Models section of the showcase, I went and decided to see if I could come up with a simple DNA model. Pretty fun stuff, here’s what I came up with.

Click Here to View Application

Molecules and Stuff

Posted by keunlee | Mar 23 2007, 04:20:13 PM EDT

3D Charting and Molecular Models with papervision 3D

Just recently getting back from Ajaxworld, while I was there, I took it upon myself to see what I could come up with using a few available open source 3D frameworks. One of which is called Sandy and the other Papervision 3D. At this point, I’d say they both have their advantages and disadvantages when comparing the two, but other than that, both of these frameworks are very fine pieces of work, and granted since they are still in development, I imagine they will keep on getting better and better with newer and cooler features in each release.

What’s most surprising is the super ease of use of both frameworks. I found that the APIs were very straightforward and easy to understand. I won’t go so much into the API usage, since these are both open source, but take my word for it, sift through the examples found in the source downloads, and you’ll be sure to catch on pretty quickly :)

So, without any further delay, I created a sample showcase in which I’ll eventually be adding more goodies to later on. The example showcase below uses Papervision 3D.

Click Here to View Application

Matrix Contents

Posted by keunlee | Mar 23 2007, 07:24:01 AM EDT

20070123 Tuesday January 23, 2007

Flex 2 VideoDisplay + Security sandbox violation : BitmapData.draw on RTMP

If you ever tried to do a bitmapdata.draw from an RTMP source, you might’ve gotten the following security Error:

SecurityError: Error #2135: Security sandbox violation: BitmapData.draw: _ cannot access _. RTMP content cannot be accessed using this API.

Last month, Chris Chen posted a snippet on how to get by this error found here. To recap on the solution to the issue, the idea is to detach your netstream before doing your draw method, then to reattach it afterwards. Chris’s method works well for a Video Class coming from the flash.media.* namespace.

However, if you try this with a Flex VideoDisplay component, there is no available way of getting access to the underlying Video Class… or so we thought. Since the videoDisplay component is open source within the Flex 2 source tree, I figure, why not take a peek to see where that Video Class is at. Sure enough, there were several other ( excluded ) classes, in relation to the VideoDisplay component found in ( source/mx/controls/videoClasses ). So, what I needed at this point was a reference to the underlying video and netstream, in which I went ahead and made a modified copy of the default Flex VideoDisplay component along with it’s relevant dependent classes… you can pick those up here.

… and so, now we’re able to do the following with a VideoDisplay component:

video.videoPlayer.attachNetStream( null );
var data:BitmapData = new BitmapData(…);
data.draw( video.videoPlayer );
video.videoPlayer.attachNetStream( video.videoPlayer.ns );



<controls:VideoDisplay id=“video” source=“videos/video.flv” width=“400″ height=“400″/>

Posted by keunlee | Jan 23 2007, 01:00:13 PM EST

20060821 Monday August 21, 2006

An Introduction to Transformation Matrices in AS3

In this lesson, I shall introduce to you, the Matrix Class. Out of all the concepts to cover in Flex 2 and AS3, why did I choose to cover this topic? Well, believe it or not, the Matrix class has been around for quite some time now in Actionscript. If you’re really interested in the idea of 3D vector spaces in Flash/Flex, then this may be a subject that you may want to further look into. For now, we’ll keep this lesson simple and lay off the heavy mathematics that you’d normally find in a full
course study of linear algebra.

Read more...

Posted by keunlee | Aug 21 2006, 08:07:47 AM EDT

20060717 Monday July 17, 2006

Reflection in Actionscript 3.0/Flex 2

In actionscript 3, you may find a set of functions in the “flash.utils” package that provides some facilities for reflection. Do not confuse this with the type of reflection you may get when applied as a visual effect, but the type of reflection that does the following basic things:

Read more...

Posted by keunlee | Jul 17 2006, 05:16:10 AM EDT

20060628 Wednesday June 28, 2006

Flex 2 has gone gold

Flex 2 has gone gold for public release: http://www.adobe.com/flex

Read more...

Posted by keunlee | Jun 28 2006, 11:33:44 AM EDT

Tab Navigator Component w/ an integrated tab-close button

First and foremost, I would’ve opened the source on this but because it was for a client of mine, it must stay closed source. But… that doesn’t mean I can’t tell you how I did it.

First off, you might be thinking that you’ll have to override a slew of components to make this work out for you… That is not the case. I managed this by extending the tab navigator component alone. You see, the tab navigator itself is composed of three other readily available components.

Read more...

Posted by keunlee | Jun 28 2006, 11:00:24 AM EDT

Flex 2 Beta 3 : Sprites

In Flex 1.5, typically if we want to add a shape or graphic to the stage, we would make either make a call to createEmptyMovieClip or utilize the MovieClipLoader and add the graphic to the stage. However, in Flex 2 Beta 3, this has changed slightly.

In the Actionscript 3 spec, we’ve been introduced with a new class called the “Sprite” class. A Sprite object is similar to a movie clip, but does not have a timeline. Sprite is an appropriate base class for objects that do not require timelines. For example, Sprite would be a logical base class for user interface (UI) components that typically do not use the timeline.

Read more...

Posted by keunlee | Jun 28 2006, 10:47:22 AM EDT

20060627 Tuesday June 27, 2006

First Entry - ah-hem...

My opening debut on the official company blog site ^_^ My intentions here are simple... provide industry knowledge in RIA development and to share these ideas with the community. Not to mention, also the common rants, raves, reviews, and opinions... you get the picture. see you on the flip side. Read more...

Posted by keunlee | Jun 27 2006, 08:08:16 PM EDT
XML