FlashOverlay

From Blue Mars Developer Guidebook

Jump to: navigation, search
There are security restrictions on this article

Contents

Overview

API

Default External Interface Callbacks

By default, an object returned from FlashOverlay.New method contains following callbacks. These callbacks can be called from guest Flash movie via ExternalIntierface.call method.

setGeometry

ExternalInterface.call("setGeometry", obj : Object)

Sets the position and window size of the Flash movie. obj should contain following keys: "x", "y", "width" and "height".

Example:

ExternalInterface.call("setGeometry", {x: 100, y: 100, width: 400, height: 300})

setTransparency

[DEPRECATED] this function no longer works.

ExternalInterface.call("setTransparency", flag : boolean)

Sets the transparency of the Flash movie. If flag is true, the Flash movie window will be layered and black (#000000) pixel will be drawn as transparent. Otherwise transparent color no longer applied.

For more detail, please refer Layered Windows on MSDN.

onInit

(Internal use only) By default, onInit callback do some initialize for connecting to Blue Mars application server.

onEnd

(Internal use only) By default, onEnd callback close the Flash window and finalize the Flash operation.

Class Methods

New

local obj = FlashOverlay.New (handler_table, url)

Creates new FlashOverlay object which contains a Flash movie located on url.

handler_table(table): a table which maps from callback function name to a function.

url(string): Flash movie's URL (http://...) or local file path.

Instance Methods

Show

obj:Show ()

Hide

obj:Hide ()

SetToKeyListener

obj:SetToKeyListener ()

SetTransparency

obj:SetTransparency (flag)

Delete

obj:Delete ()

SetGeometry

obj:SetGeometry (x, y, width, height)

CallMethod

obj:CallMethod (method_name, ...)

Usage

Examples

Problems with this wiki page? Contact us either by: Support Email or Support Ticket System

Blue Mars Guidebook Privacy Policy
Blue Mars Guidebook Community Guidelines

Personal tools