Back to TreeGrid home

Dynamic Adobe Flash objects in cells

This example works only in browsers with installed Adobe Flash Player 8.0+ plugin. The plugin can be downloaded from http://www.adobe.com/products/flashplayer/.

In some browsers and Flash versions this example cannot be run locally from file system.

This example demonstrates how to display any Flash object inside TreeGrid cells.
Also demonstrates dynamical creating / updating the Flash objects according to some condition, for example value in other cell.
And finally demonstrates displaying HTML content and Flash object within one cell.

This example uses FlashCanvas.swf file as base source for all Flash objects in grid. This swf canvas defines all External Interface API functions used by example. If you want to use other Flash graphic functions, you must prepare your custom FlashCanvas.swf with these functions revealed to JavaScript.
The TreeGrid xml source is defined in Flash.xml.
The main work is done by JavaScript funtion Draw included in this HTML page. This function is called from various events to (re) draw the Flash object. There is no external script file needed for this example.

In the Number column are custom numbers. In the Flash column is drawn an ellipse by Flash plugin and text value as standard HTML text. The width of the ellipse and the HTML text is related to Number column value.
You can edit Number column values, sort rows, filter rows, copy&paste rows, delete rows, add new rows and drag rows by mouse. You can see that the Flash column values are always updated.