Flex Wares

Sample Components, Apps, Demos for Adobe Flex 2.0. Everything posted here is freeware. The code is available under MIT License. Please do send me a note if you are using it on a public url.
Feeds Feed Burner, Atom

Monday, October 30, 2006

3D Wireframe renderer for Flex

This is a 3D Wireframe renderer. It can read 3 filetypes:

1. 3DS Max ASE format
2. xml mesh data - generated by 3D Flash Studio converter
3. Mesh data in the form of name,value pairs


The loader and renderer are completely decoupled, you can use a different loader or a different renderer. Also the loader can be easily extended to support other file formats.

The camera position, orientation is customizable.

Thanks to Vic's 3DLib tutorial which I used as a starting point to develop this component. It had to be ported to AS3 first though.

The 3D object can be drag rotated with the mouse. While drag/rotating, the renderer automatically drops polys to achieve a smooth drag. I have been able to get decent results with upto 25000 triangles.

To use the component, place the following code in any mxml file.

<Lib3D:ASELoader id="l3" url="assets/plane.ase" objectloaded="r3.model = l3.obj;">
<Lib3D:Renderer3D id="r3" width="400" height="400" animate="false" scale="1.5"
pitch="1.57" detail="high">


I would want to add texture mapping to this later.

Demo
Source

Thursday, October 19, 2006

Winamp on Flex


Presenting Winamp on Flex, this has been implemented completely in Flex.

The Application is skinnable using any winamp classic skin. Just put the skin in the assets folder (lowercase file names please).
It can read pls and m3u playlist. Currently supported controls are Rev, Fwd, Play, Pause, Stop, Volume.

Skins can be changed on the fly by just calling the setSkin function. I have not skinned the playlist because people would want to customize it.

Made this quite a while ago, but was not getting time to make it a bit robust.



Source

The SoundPlayer class posted in the source implements play, pause, stop and error / state management. There is no UI in this class. The UI is implemented by WinampClassicUI component.

Eject button does not do anything currently. Any custom code can be added to it.

If there are any bugs, please just post a note and I will post a fix.