Posts tagged as3

Working With Large Arrays in Action Script

0

While working on partly connected system using flex technology I figured out quick enough that working with large data sets (thousands of records) is not applicable. Especially because i held a number of those sets which I needed to  cross reference in number of occasions.

My solution was to create an indexed collection which i can benefit both worlds of Dictionary and ArrayCollection , with that in mind I designed and implemented the IndexedArrayCollection.

The collection extends ArrayCollection and adds the capability of indexing a single member of an object in the collection (I assume that each element is an object).

IndexArrayCollection constructor receives two arguments first is a source array and second is the index field name (attribute name).

Simple Box2D Flex Example

0

following my previous post announcing Box2D Flex framework i want to share some techniques via examples on how to use the library.

First thing we create add a SkinableContentContainer to and drop some contorls inside it

This, still, does not do anything fancy it just initializes box2d and registers & measures all controls inside our physics container.

next step we add some bindable controls that will change our physics gravity and debug

and the bindable properties to our physics container

now we can play with the gravity sliders and see flex controls bounce around

Flex 3 hebrew textbox

0

following my last post on flex3 RTL label , next challenge was input text with RTL support , in that case I decided to cheat and use html input overlying flex.

Not so elegant solution, but a solution non the less. the trick is to pass the flex component coordinate and position the HTML input accordingly , and on the HTML side handle keyboard and mouse event to let the flex developer feel @ home with regular focus and key press events.

Add the following MXML component to your flex project

Add the following code to your html page

box2d flex integration

0

[kml_flashembed publishmethod="static" fversion="10.0.0" movie="/blog/wp-content/uploads/2010/04/Box2DFlex.swf" width="300" height="300" targetclass="flashmovie"]

Get Adobe Flash player

[/kml_flashembed]

Besides collapsing the form you can also drag N drop the items to see collusion and gravity. code will follow soon .. I hope ..

Go to Top