Difference between revisions of "FlashApplets"

From WeBWorK_wiki
Jump to navigation Jump to search
Line 22: Line 22:
 
# <code>isActive</code> - a 1 or "true" response by the applet indicates that the applet is loaded, initialized and ready to go.
 
# <code>isActive</code> - a 1 or "true" response by the applet indicates that the applet is loaded, initialized and ready to go.
 
# <code>debug</code> - set when the applet is called from WW. If debug=1 the WW question is in debug mode and if the applet has the ability to issue extra error messages these should be turned on. If debug=0 then these error messages should be turned off.
 
# <code>debug</code> - set when the applet is called from WW. If debug=1 the WW question is in debug mode and if the applet has the ability to issue extra error messages these should be turned on. If debug=0 then these error messages should be turned off.
  +
  +
External interface headers for flashApplets
  +
  +
/////////////////////
  +
// interface callbacks for PG question
  +
/////////////////////
  +
  +
  +
ExternalInterface.addCallback("getXML", getXML);
  +
ExternalInterface.addCallback("setXML", setXML);
  +
ExternalInterface.addCallback("config", config);
  +
ExternalInterface.addCallback("isActive",isActive);
  +
ExternalInterface.addCallback("debug",set_debug);
  +
   
 
[[Category:Problem_Techniques]]
 
[[Category:Problem_Techniques]]

Revision as of 14:43, 25 January 2009

Preliminary documentation at:

http://webwork.maa.org/doc/cvs/pg_CURRENT/lib/Applet.html

and

http://webwork.maa.org/doc/cvs/pg_CURRENT/macros/AppletObjects.pl.html

The interface is still being developed and so expect minor changes to continue along

with significant new features.

Request additional features from the FlashObject working group:

http://webwork.maa.org/wiki/AIM07/Working_Groups

Flash Applets should respond when called by these functions

  1. getXML - the applet is asking for an XML description of the applet's state
  2. setXML - the applet is sending an XML description to reset the applet's state
  3. config - the applet is sending an initial configuration for the applet (should we use initialConfiguation or reset?)
  4. isActive - a 1 or "true" response by the applet indicates that the applet is loaded, initialized and ready to go.
  5. debug - set when the applet is called from WW. If debug=1 the WW question is in debug mode and if the applet has the ability to issue extra error messages these should be turned on. If debug=0 then these error messages should be turned off.

External interface headers for flashApplets

/////////////////////
// interface callbacks for PG question
/////////////////////


ExternalInterface.addCallback("getXML", getXML);
ExternalInterface.addCallback("setXML", setXML);
ExternalInterface.addCallback("config", config);
ExternalInterface.addCallback("isActive",isActive);
ExternalInterface.addCallback("debug",set_debug);