Difference between revisions of "Example Widgets"

From Chumby Wiki
Jump to: navigation, search
(added FlashDeveloper virtual keyboard notes)
 
(2 intermediate revisions by 2 users not shown)
Line 5: Line 5:
 
* [[Sample Binary Clock Widget]]
 
* [[Sample Binary Clock Widget]]
 
* [[Sample RSS Widget]]
 
* [[Sample RSS Widget]]
 +
* [[Sample RSS Widget in AS3]]
 
* [[Sample Webcam Widget]]
 
* [[Sample Webcam Widget]]
 
* [[Sample Banner Widget]]
 
* [[Sample Banner Widget]]
Line 12: Line 13:
 
* [[Pendulum Multiplayer]]
 
* [[Pendulum Multiplayer]]
 
* [[RootTools]] (.as files, using mtasc and swfmill)
 
* [[RootTools]] (.as files, using mtasc and swfmill)
 +
 +
Here are sample widgets created using FlashDevelop:
 +
 +
* [[Analog Clock]]
 +
 +
== Virtual Keyboard ==
  
 
Here's the Virtual Keyboard used by the Control Panel:
 
Here's the Virtual Keyboard used by the Control Panel:
Line 17: Line 24:
 
* [http://files.chumby.com/widgetexamples/VirtualKeyboard.tgz VirtualKeyboard.tgz] - requires Flash CS3, uses Actionscript 2
 
* [http://files.chumby.com/widgetexamples/VirtualKeyboard.tgz VirtualKeyboard.tgz] - requires Flash CS3, uses Actionscript 2
  
== Using Virtual Keyboard with FlashDevelop ==
+
=== Using Virtual Keyboard with FlashDevelop ===
  
 
(originally posted on the forums at http://forum.chumby.com/viewtopic.php?pid=27050#p27050 by "occasional")
 
(originally posted on the forums at http://forum.chumby.com/viewtopic.php?pid=27050#p27050 by "occasional")
Line 23: Line 30:
 
Add the VirtualKeyboard.swf as an asset to your FlashDevelop project, then use this code to activate it:
 
Add the VirtualKeyboard.swf as an asset to your FlashDevelop project, then use this code to activate it:
  
[code]
+
  var keyboard:MovieClip = _root.attachMovie("keyboard.swf", "keyboard", _root.getNextHighestDepth());
var keyboard:MovieClip = _root.attachMovie("keyboard.swf", "keyboard", _root.getNextHighestDepth());
+
  keyboard.instance1.accept = function(s:String) {
keyboard.instance1.accept = function(s:String) {
+
 
         // this method is called when the user enters a string with the keyboard and hits return
 
         // this method is called when the user enters a string with the keyboard and hits return
 
         trace("user entered "+s);
 
         trace("user entered "+s);
}
+
  }
[/code]
+

Latest revision as of 13:00, 18 August 2011

Here are some Flash source (.fla) files for various types of widgets:

Here are sample widgets created using FlashDevelop:

Virtual Keyboard

Here's the Virtual Keyboard used by the Control Panel:

Using Virtual Keyboard with FlashDevelop

(originally posted on the forums at http://forum.chumby.com/viewtopic.php?pid=27050#p27050 by "occasional")

Add the VirtualKeyboard.swf as an asset to your FlashDevelop project, then use this code to activate it:

 var keyboard:MovieClip = _root.attachMovie("keyboard.swf", "keyboard", _root.getNextHighestDepth());
 keyboard.instance1.accept = function(s:String) {
       // this method is called when the user enters a string with the keyboard and hits return
       trace("user entered "+s);
 }