Difference between revisions of "Widget Parameter Example"

From Chumby Wiki
Jump to: navigation, search
Line 6: Line 6:
  
 
Source files (FlashDevelop):  [http://www.clearsync.com/public/chumby/SampleConfigurationWidget.zip SampleConfigurationWidget.zip]
 
Source files (FlashDevelop):  [http://www.clearsync.com/public/chumby/SampleConfigurationWidget.zip SampleConfigurationWidget.zip]
 +
 +
Here is another configuration widget example done with [http://www.openlaszlo.org/ Openlazlo] 4.8.0. It saves but doesn't retrieve parameters.
 +
 +
Source files (Openlazlo): [http://www.chummix.org/chummix/services/viewsource.php?src=config chummix_config.lzx] which depends on [http://www.chummix.org/chummix/services/viewsource.php?src=xmlhttprequest xmlhttprequest.lzx]

Revision as of 20:49, 20 August 2010

This example demonstrates how to upload and download widget parameters. Uploaded parameters are available to a widget swf (and configuration swf) at runtime as key/value pairs in _root. You may upload and download parameters from a configuration swf on chumby.com, or from a widget swf running on a physical chumby (code in this example applies to both scenarios). In this particular example, the configuration swf uploads two values. When the widget runs, if the values exist it displays them.

Source files (Flash 8): widget_parameters_example.zip

Here is a similar configuration widget example done completely with FlashDevelop. It saves and retrieves name and password parameters.

Source files (FlashDevelop): SampleConfigurationWidget.zip

Here is another configuration widget example done with Openlazlo 4.8.0. It saves but doesn't retrieve parameters.

Source files (Openlazlo): chummix_config.lzx which depends on xmlhttprequest.lzx