Reading ArrayCollections in Flash

I always thought that arraycollection were only accessible within Flex. Last week however I needed to access some complex data from a webservice in flash. To access the webservice I used a very handy flash extension, which provided the remoting classes from Flex into flash. The result however contained a ArrayCollections. Luckily I found out that is was perfectly possible to parse the data from the arraycollections into arrays and object. I knew that the result had to contain a Clips Array within each Chapter as you can see in the debugger screenshot. Now in flash I could access these Clips like this

var _chapters_ar:Array = _chapters.list.source;

for( var i:int = 0; i < _chapters_ar.length; i++ )
     var _clips_ar:Array =  _chapters_ar[i].Clips.list.source;

     for (var j:int = 0; j < _clips_ar.length; j++)

see screenshot below

debug view in flash

Papervision poetry

Since I started with papervision the library really got me. I didn’t miss any function during the creation of this simple poetry aplication. However I must say that I did not focus on collada and importing 3D models into this little test. One thing that does concern me is the performance, hence I suspect that it is rather the flash player than papervision. Nevertheless this simple test already draws 60 percent off my core2duo laptop.

Application functionalities

This little application makes use of dynamic font loading and uses a seperate class file to give the cubes a movieclip face with a dynamic textfield. Download the papervision-poetry source.

But the fun part stays, creating realtime interactive 3D scene’s. I have a bachelor degree in product design, and some working experience in the field. But none of the 3D things I did back then were realtime, of course you could interact with a 3D model on a very high granular level. I cannot wait to see more interference between 3D and the still flat world of internet.

It struck me that working with papervision is easy and real fun, it provides sufficient functionality to seperate a 3D model be interactive with those seperate parts, keep up the good work!