Using Variables In Widgets; Using Actionscript 3.0 In Widgets - Adobe CAPTIVATE 5 Help Manual

Table of Contents

Advertisement

Last updated 4/22/2010
Example 2: Playing a movie containing a widget
if(movieHandle.widgetParams != undefined && movieHandle.widgetParams != '')//at runtime inside
Captivate movie
{
trace("widgetParams = "+movieHandle.widgetParams);
var x:XML = new XML(movieHandle.widgetParams);
var countryName = x.firstChild.firstChild.firstChild.firstChild.nodeValue;
ShowRandomizedCountryName(countryName);
initDone = true;
}
The visibility state is undefined for widgets. You set this state using the
contains values derived from Adobe Captivate.
The
command prints
trace
using XML. Read the code to understand how your data is stored so that you can reach the node you need. To parse
the string, use XML that is an ActionScript construct. For more information, see the ActionScript documentation in
Flash.
More Help topics
Flash ActionScript Dictionary

Using variables in widgets

To use an Adobe Captivate variable in widgets, specify the variable within $$. You can use both user-defined and
system variables in widgets. The widget can get and set variables within the Captivate demo.
For example, the user-defined variable
it in the certificate.

Using ActionScript 3.0 in widgets

Note: Only ActionScript 3.0 is supported.
Changes in ActionScript from version 2 to version 3 warrant changes in how constructs access Adobe Captivate
demos. Some of the changes are documented here.
To declare
onEnterFrame
Use
instead of
void
Void
External interface takes only two parameters now. For example,
ExternalInterface.addCallback("isStatic",isStatic);
Use
instead of
parent
_parent
Use the following code in the ActionScript file:
DRAFT
, which is a string in XML format. You can access the nodes of the string
widgetParams
in a Certificate widget fetches the name of the user and displays
$$username$$
specify
this.addEventListener("enterFrame",onEnterFrame);
USING ADOBE CAPTIVATE 5
movieHandle.widgetParams
125
Widgets
property, which

Advertisement

Table of Contents
loading

Table of Contents