API: swf YAHOO.widget.SWF (YUI Library)

# Yahoo! UI Library

### SWF Utility 2.8.0r4

Yahoo! UI Library > swf > YAHOO.widget.SWF
Search:
Filters Show Private Show Protected Show Deprecated

## Class YAHOO.widget.SWF - extends YAHOO.util.Element

Creates the SWF instance and keeps the configuration data

### Constructor

YAHOO.widget.SWF `( id , swfURL , p_oAttributes )`

Parameters:
  `id <String|HTMLElement>` The id of the element, or the element itself that the SWF will be inserted into. The width and height of the SWF will be set to the width and height of this container element.
  `swfURL <String>` The URL of the SWF to be embedded into the page.
  `p_oAttributes <Object>` (optional) Configuration parameters for the Flash application and values for Flashvars to be passed to the SWF.

### Properties

#### _id - `String`

The DOM id of this instance of the element. Automatically generated.

#### _instances - `private Object`

The static collection of all instances of the SWFs on the page.

#### Properties inherited from YAHOO.util.Element:

`DOM_EVENTS`

#### Properties inherited from YAHOO.util.AttributeProvider:

`_configs`

### Methods

#### callSWF

`void callSWF ( func , args )`
Calls a specific function exposed by the SWF's ExternalInterface.

Parameters:
  `func <String>` the name of the function to call
  `args <Object>` the set of arguments to pass to the function.

Returns: `void`

#### eventHandler

`private void eventHandler ( swfid , event )`
Handles an event coming from within the SWF and delegate it to a specific instance of SWF.

Parameters:
  `swfid <String>` the id of the SWF dispatching the event
  `event <Object>` the event being transmitted.

Returns: `void`

#### toString

`String toString ( )`
Public accessor to the unique name of the SWF instance.

Returns: `String`
  Unique name of the SWF instance.

#### Methods inherited from YAHOO.util.Element:

`_setHTMLAttrConfig, addClass, addListener, appendChild, appendTo, delegate, fireQueue, getElementsByClassName, getElementsByTagName, getStyle, hasChildNodes, hasClass, initAttributes, insertBefore, on, removeChild, removeClass, removeDelegate, removeListener, replaceChild, replaceClass, setStyle, subscribe`

#### Methods inherited from YAHOO.util.AttributeProvider:

`configureAttribute, fireBeforeChangeEvent, fireChangeEvent, get, getAttributeConfig, getAttributeKeys, refresh, register, resetAttributeConfig, resetValue, set, setAttributeConfig, setAttributes`

#### Events inherited from YAHOO.util.Element:

`appendTo, available, beforeAppendTo, beforeElementChange, contentReady, elementChange,`

#### Configuration attributes inherited from YAHOO.util.Element:

`element,`

Copyright © 2009 Yahoo! Inc. All rights reserved.