Adobe Captivate CS 5.5, Mac, DVD, ENG Especificaciones Pagina 146

  • Descarga
  • Añadir a mis manuales
  • Imprimir
  • Pagina
    / 264
  • Tabla de contenidos
  • SOLUCIÓN DE PROBLEMAS
  • MARCADORES
  • Valorado. / 5. Basado en revisión del cliente
Vista de pagina 145
140
USING CAPTIVATE
Widgets
Last updated 9/28/2011
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 movieHandle.widgetParams property, which
contains values derived from Adobe Captivate.
The trace command prints widgetParams, which is a string in XML format. You can access the nodes of the string
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 $$username$$ in a Certificate widget fetches the name of the user and displays
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 specify this.addEventListener("enterFrame",onEnterFrame);
Use void instead of Void
External interface takes only two parameters now. For example,
ExternalInterface.addCallback("isStatic",isStatic);
Use parent instead of _parent
Use the following code in the ActionScript file:
Vista de pagina 145
1 2 ... 141 142 143 144 145 146 147 148 149 150 151 ... 263 264

Comentarios a estos manuales

Sin comentarios