Flash Molecule

From oWiki

Jump to: navigation, search

Contents


Preference Dialog

File:Flash_pref.png

Attributes

type

string  ( r )
Type of this molecule, 'flash'.

pref.enableWhen

string  ( r, w )
Specifies the event that activates this molecule. Default is 'load'.

pref.disableWhen

string  ( r, w )
Specifies the event that deactivates this molecule. Default is 'none'.

pref.url

string  ( r, w )
Specifies the URL of this Flash video. This can be an absolute or relative path, under 'http(s)' or 'ccrx' protocol.

pref.imgWidth

string  ( r, w )
Specifies the video width.

Value Description
auto Default. The molecule calculates the actual width
% Defines the width in % of the droplet's width
length Defines the width in px, cm, etc. 

pref.imgHeight

string  ( r, w )
Specifies the video height.

Value Description
auto Default. The molecule calculates the actual height
% Defines the width in % of the droplet's height
length Defines the height in px, cm, etc. 

pref.border

string  ( r, w )
Specifies the video border style.

Possible formats:
(1) none
(2) <border-width> <border-style> <border-color>
(3) <top-border-width> <right-border-width> <bottom-border-width> <left-border-width>
(4) <top-bottom-border-width> <left-right-border-width>
(5) <border-width>

border-width thin
medium
thick
length (pixel value)
border-color rgb(255, 0, 0)
#ff0000
border-style none
hidden
dotted
dashed
solid
double
groove
ridge
inset
outset

pref.margin

string  ( r, w )
Specifies the margin around the video.

Possible formats (in pixels)
(1) none
(2) <margin-top> <margin-right> <margin-bottom> <margin-left>
(3) <margins>

pref.padding

string  ( r, w )
Specifies the size of padding around the video.

Possible formats (in pixels)
(1) none
(2) <padding-top> <padding-right> <padding-bottom> <padding-left>
(3) <paddings>

pref.float

string  ( r, w )
Specifies where the video will appear in the droplet.

Value Description
left The video moves to the left in the droplet
right The video moves to the right in the droplet
none Default. The video will be displayed just where it occurs in the text 

pref.clear

Tstring  ( r, w )
Specifies the sides of the video where other floating elements are not allowed.

Value Description
left No floating elements allowed on the left side
right No floating elements allowed on the right side
both No floating elements allowed on either the left or the right side
none Default. Allows floating elements on both sides

pref.play

bool  ( r, w )
Specifies whether the video begins playing immediately on loading in the browser. The default value is true if this attribute is omitted.

pref.loop

bool  ( r, w )
Specifies whether the video repeats indefinitely or stops when it reaches the last frame. The default value is true if this attribute is omitted.

pref.memu

bool  ( r, w )
true: displays the full menu, allowing the user a variety of options to enhance or control playback. false: displays a menu that contains only the Settings option and the About Flash option.

pref.quality

string  ( r, w )

Value Description
low favors playback speed over appearance and never uses anti-aliasing.
autolow emphasizes speed at first but improves appearance whenever possible. Playback begins with anti-aliasing turned off. If the Flash Player detects that the processor can handle it, anti-aliasing is turned on.
autohigh emphasizes playback speed and appearance equally at first but sacrifices appearance for playback speed if necessary. Playback begins with anti-aliasing turned on. If the actual frame rate drops below the specified frame rate, anti-aliasing is turned off to improve playback speed. Use this setting to emulate the View > Antialias setting in Flash.
medium applies some anti-aliasing and does not smooth bitmaps. It produces a better quality than the Low setting, but lower quality than the High setting.
high favors appearance over playback speed and always applies anti-aliasing. If the movie does not contain animation, bitmaps are smoothed; if the movie has animation, bitmaps are not smoothed.
best provides the best display quality and does not consider playback speed. All output is anti-aliased and all bitmaps are smoothed.

pref.scale

string  ( r, w )

Value Description
default (Show all) makes the entire movie visible in the specified area without distortion, while maintaining the original aspect ratio of the movie. Borders may appear on two sides of the movie.
noorder scales the movie to fill the specified area, without distortion but possibly with some cropping, while maintaining the original aspect ratio of the movie.
exactfit makes the entire movie visible in the specified area without trying to preserve the original aspect ratio. Distortion may occur.

pref.align

string  ( r, w )
Possible values: l, t, r, b.
Default centers the video in the droplet and crops edges if the droplet is smaller than the movie.
l (left), r (right), t (top), and b (bottom) align the video along the corresponding edge of the droplet and crop the remaining three sides as needed.

pref.salign

string  ( r, w )
Possible values: l, t, r, b, tl, tr, bl, br.
l, r, t, and b align the video along the left, right, top or bottom edge, respectively, of the droplet and crop the remaining three sides as needed.
tl and tr align the video to the top left and top right corner, respectively, of the droplet and crop the bottom and remaining right or left side as needed.
bl and br align the video to the bottom left and bottom right corner, respectively, of the droplet and crop the top and remaining right or left side as needed.

pref.wmode

string  ( r, w )
Sets the Window Mode property of the Flash video for transparency, layering, and positioning in the droplet.

Value Description
window video plays in its own rectangular window.
opaque the video hides everything on the page behind it.
transparent the background of the HTML page shows through all transparent portions of the video, this may slow animation performance.

pref.bgcolor

string  ( r, w )
Specifies the background color of the video. Use this attribute to override the background color setting specified in the Flash file. This attribute does not affect the background color of the HTML page. (e.g. '#ff0000')

pref.base

string  ( r, w )
Specifies the base directory or URL used to resolve all relative path statements in the Flash Player video.

pref.swliveconnect

bool  ( r, w )
Allowing Flash video to communicate with the JavaScript in the current page.

pref.flashvars

string  ( r, w )
Variable to pass to Flash Player.


Methods

show()

show the effects of this molecule.

hide()

hide the effects of this molecule.

refresh()

Force molecule to redraw with the current set of attributes.

clone()

Return: a molecule

Create a clone of this molecule.

attach(droplet)

droplet: a droplet object (e.g. app.box.droplet)

Attach this molecule to a droplet.

detach()

Remove this molecule from its droplet.

deleteMod()

Delete this molecule.

serialize()

Return: string

Serialize this molecule into its JSON representation.

setSrc( src )

src: string

Sets the source URL of the video.

addVariable( key, val )

key: string
val: string

Adds a variable to be passed into Flash video.

deleteVariable( key )

key: string

Removes an existing variable.

setVariable( key, val )

key: string
val: string

Sets the value of the Flash variable specified by key to the value specified by val.

getVariable( key )

key: string

Returns the value of the Flash variable specified by key. Returns null if the variable does not exist.

play()

Play this video.

stop()

Stop this video.

rewind()

Rewind this video.

isPlaying()

Return: bool

Is the video currently playing.

percentLoaded()

Return: int

Returns the percentage of video that has been loaded.

goto( frame )

frame: int

Activates the frame number specified by frameid in the current movie. If the data for a requested frame is not yet available, the player goes to the last frame available and stops, causing unexpected results during playback.

loadMovie( layer, url )

layer: int
url: string

Loads the movie identified by url to the layer specified by layer.

zoom( percent )

percent : int

Zooms the view by a relative scale factor specified by percent. zoom(50) doubles the size of the objects in the view. zoom(200) reduces the size of objects in the view by one half. zoom(0) resets the view to 100%.

pan( x, y, mode )

x: int
y: int
mode: int

Pans a zoomed-in video to the coordinates specified by x and y. Use mode to specify whether the values for x and y are pixels or a percent of the window. When mode is 0, the coordinates are pixels; when mode is 1, the coordinates are percent of the window. Pan does not pan beyond the boundaries of the zoomed-in video.
Personal tools