|
AdobeBridgeCS5SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Object | +--FlashDemo
Shows how to communicate with a ScriptUI FlashPlayer in Adobe Bridge using ActionScript
This sample shows how to use the ScriptUI FlashPlayer element to invoke JavaScript functions in ActionScript, and ActionsScript functions in JavaScript. It passes simple data between the two scripting environments, and displays passed values.
The Flash application to be used with this sample must be located in the resources
folder and have the same name as this sample. The application is a Flash presentation
that has 4 slides. Each slide has a layer named 'Actions' which contains an
ActionScript script. The ActionScript scripts show how to import the ExternalInterface class,
and how to register and call external functions, which are defined in this script.
The ActionScript source code is provided as a comment block in the
FlashDemo.JSX file. The compiled code for the scripts is in .\resources\FlashDemo.fla
Flash Player Security
Adobe Bridge supports the Flash Player client-runtime security model. This affects which SWF files
can be loaded into Bridge and run successfully. You must set the correct security permission
to allow the operation that the SWF file performs.
There are 3 basic levels of security for local SWF files:
For more information on local file security see:
http://livedocs.adobe.com/flex/3/html/05B_Security_03.html
To allow a local file to be trusted,(that is, allow a SWF file to access both network and local files as well as allow cross scripting), you can either create a trust file, or use the Settings Manager. This sample and the accompanying SWF file have been created with the default permissions; therefore to run the sample correctly, you must use one of these techniques, as described in the following sections.
SDKINSTALL\sdksamples\javascript\resources\FlashDemo.swf
Save this text file with the extension .cfg in a folder named 'FlashPlayerTrust' (which you may need to create), in one of the following locations, depending on the platform and users for which the SWF should be trusted.
Global Flash Player Trust Directory
C:\windows\system32\Macromed\Flash\FlashPlayerTrust
/Library/Application Support/Macromedia/FlashPlayerTrust
User Flash Player Trust Directory
C:\Documents and Settings\your-user-name\Application Data\Macromedia\Flash Player\#Security\FlashPlayerTrust
/Users/your-user-name/Library/Preferences/Macromedia/Flash Player/#Security/FlashPlayerTrust
For more information on the Settings Manager and Trust files see:
http://livedocs.adobe.com/flex/3/html/05B_Security_03.html
See:
Field Summary | |
File |
flashFile
The Flash movie to load into Bridge |
String |
requiredContext
The context in which this snippet can run. |
Constructor Summary | |
FlashDemo()
|
Method Summary | |
Boolean
|
canRun()
Determines whether snippet can be run given current context. |
Boolean
|
run()
Functional part of this Snippet. |
Field Detail |
File flashFile
String requiredContext
Constructor Detail |
FlashDemo()
Method Detail |
Boolean canRun()
Boolean run()
|
AdobeBridgeCS5SDK | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |