EasyManua.ls Logo

Adobe CAPTIVATE 5 - Using XML in Widgets

Adobe CAPTIVATE 5
241 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
124
USING ADOBE CAPTIVATE 5
Widgets
Last updated 4/22/2010
Sample code for defining visibility for different modes
function cpSetValue( variable:String , val )
{
if(variable == 'movieHandle' ) {
movieHandle = val;
mainmov = movieHandle.getMovieProps().variablesHandle;
}
if (variable == 'widgetMode')
{
widgetMode = val;
}
}
this.onEnterFrame = function()
{
var wm:String = widgetMode;//this variable will be provided by Captivate App or Captivate Movie
if(wm == undefined)
{
wm = widgetMode;
}
if(wm == undefined)
wm = 'Stage';
if(wm == 'Edit')//Property inspection inside Captivate app
{
button1._visible=true;
}
else if (wm == 'Preview')
{
button1._visible=false;
}
else //this is the stage mode
{
button1._visible=true;
}
}
Using XML in widgets
Widgets use XML to pass data from Flash to Captivate. The following examples illustrate widgets called by Adobe
Captivate.
Example 1: Creating objects inside Flash ActionScript
var _parameters: Object = new Object();
_parameters.country = txtCountry.text;
return _parameters;
This code segment creates an object named _parameters and assigns the field country to it. When the _parameters
object returns, Adobe Captivate stores it in XML format for future use (for example, for publishing in a certain
language).
DRAFT

Table of Contents

Related product manuals