Difference between revisions of "User:Thinkquick"
From Chumby Wiki
Thinkquick (Talk | contribs) (Initial creation of my user page) |
Thinkquick (Talk | contribs) (Added source code examples) |
||
Line 1: | Line 1: | ||
+ | =thinkQuick software= | ||
+ | |||
[http://www.thinkquick.com.au thinkQuick software] is an Australian based business. | [http://www.thinkquick.com.au thinkQuick software] is an Australian based business. | ||
+ | |||
They are always keen to work on innovative new projects involving modern techniques like Flash/Flex, AJAX (Asyncronous Javascript & XML), Facebook, etc. | They are always keen to work on innovative new projects involving modern techniques like Flash/Flex, AJAX (Asyncronous Javascript & XML), Facebook, etc. | ||
+ | |||
+ | ==Some handy source code examples by thinkQuick== | ||
+ | |||
+ | Actionscript for a test harness for the accelerometer (simulates shaking). This example loads a local swf, which is the accelgraph example in this case.: | ||
+ | |||
+ | var my_mc:MovieClip = _root.createEmptyMovieClip("my_mc",_root.getNextHighestDepth()); | ||
+ | var my_mcl:MovieClipLoader = new MovieClipLoader(); | ||
+ | var my_listener:Object = new Object(); | ||
+ | my_mcl.addListener(my_listener); | ||
+ | my_listener.onLoadComplete =function(the_mc:MovieClip) { | ||
+ | the_mc.ASnative = function(n1,n2) { | ||
+ | my_accelerometer = function(n) { | ||
+ | return Math.random()*50 - 50; | ||
+ | } | ||
+ | return my_accelerometer; | ||
+ | } | ||
+ | } | ||
+ | my_mcl.loadClip("accelgraph.swf", my_mc); | ||
+ | |||
+ | In this example, the pendulum will stay still. It appears 2000 is the 'still' value (for the virtual chumby version, at least). | ||
+ | |||
+ | var my_mc:MovieClip = _root.createEmptyMovieClip("my_mc",_root.getNextHighestDepth()); | ||
+ | var my_mcl:MovieClipLoader = new MovieClipLoader(); | ||
+ | var my_listener:Object = new Object(); | ||
+ | my_mcl.addListener(my_listener); | ||
+ | my_listener.onLoadComplete =function(the_mc:MovieClip) { | ||
+ | the_mc.ASnative = function(n1,n2) { | ||
+ | my_accelerometer = function(n) { | ||
+ | return 2000; | ||
+ | } | ||
+ | return my_accelerometer; | ||
+ | } | ||
+ | } | ||
+ | my_mcl.loadClip("<nowiki>http://www.chumby.com/xml/movies/59D1E5A0-AC29-11DB-8062-0030485A78AA</nowiki>", my_mc); |
Latest revision as of 03:50, 5 April 2008
thinkQuick software
thinkQuick software is an Australian based business.
They are always keen to work on innovative new projects involving modern techniques like Flash/Flex, AJAX (Asyncronous Javascript & XML), Facebook, etc.
Some handy source code examples by thinkQuick
Actionscript for a test harness for the accelerometer (simulates shaking). This example loads a local swf, which is the accelgraph example in this case.:
var my_mc:MovieClip = _root.createEmptyMovieClip("my_mc",_root.getNextHighestDepth()); var my_mcl:MovieClipLoader = new MovieClipLoader(); var my_listener:Object = new Object(); my_mcl.addListener(my_listener); my_listener.onLoadComplete =function(the_mc:MovieClip) { the_mc.ASnative = function(n1,n2) { my_accelerometer = function(n) { return Math.random()*50 - 50; } return my_accelerometer; } } my_mcl.loadClip("accelgraph.swf", my_mc);
In this example, the pendulum will stay still. It appears 2000 is the 'still' value (for the virtual chumby version, at least).
var my_mc:MovieClip = _root.createEmptyMovieClip("my_mc",_root.getNextHighestDepth()); var my_mcl:MovieClipLoader = new MovieClipLoader(); var my_listener:Object = new Object(); my_mcl.addListener(my_listener); my_listener.onLoadComplete =function(the_mc:MovieClip) { the_mc.ASnative = function(n1,n2) { my_accelerometer = function(n) { return 2000; } return my_accelerometer; } } my_mcl.loadClip("http://www.chumby.com/xml/movies/59D1E5A0-AC29-11DB-8062-0030485A78AA", my_mc);