beautypg.com

Dreamweaver.flash.setmenu() – Adobe Dreamweaver API Reference CS5 User Manual

Page 51

background image

46

DREAMWEAVER API REFERENCE

Flash integration

Last updated 8/27/2013

The XML string containing call back function and arguments.

The following example is the implementation of the

flashcallback

function implemented in flashcallback.mxml. In

the following example, add the

flashcallback

function. This function must be called from external applications.

public function initApp():void {
ExternalInterface.addCallback("flashCallback",flashCallback);
}

This function is called back from outside the flash file(.swf).

Note: Ensure that you call the

ExternalInterface.addCallback

("

flashCallback

",

flashCallback

) before trying

to call this function.

public function flashCallback(inputStr:String):String
{

out.text += inputStr + " got flashCallback!\n";
return "it worked!";

}

dreamweaver.flash.setMenu()

Availability
Dreamweaver CS4.

Description
This function enables you to provide Fly Out commands for extensions of type "PanelWindow".

Arguments

inControlID

,

inMenuPosition

,

inMenu

The

inControlID

is an extension ID. Calling the function affects the Fly Out menu of an open panel housing the

extension. If this argument is undefined, the call affects the main menus of the application.

The

inMenuPosition

is a string describing where the given commands must be placed.

If this string is undefined, an entire menu is replaced.

If this string is for a panel, the entire user-settable area of the Fly Out menu is replaced. (The application reserves
some fixed flyout items.)

If this string is for the application, the entire default Controls submenu of the Windows menu is replaced.

If this string is an XML string in a to-be-determined schema for setting sections of menus, this form is provided
for future compatibility.

inMenu

is equivalent to

MenuItem

. This argument indicates a list of commands, which are added at the indicated

menu position. It replaces any previous items that are added at that position by an earlier call.

Returns
One of the following success or error codes:

The code

PlugPlugErrorCode_success

indicates success.

The code

PlugPlugErrorCode_extensionMenuCreationFailed

indicates that the extension menu creation

failed.

The code

PlugPlugErrorCode_unknown

indicates that the function failed for unknown reasons.