swfapplication.js revision 106cc795c2891f2d2d142772cadefbcb5975bcfa
/**
* Create data visualizations with line graphs, histograms, and other methods.
* @module swfApplication
*
*
* Note: SWFApplication is a temporary class that has been created for the purposes of observing and testing the current state of the underlying flash swfApplication rendering engine. This file
* will be replaced in future iterations and its api will vary significantly.
*/
/**
* The SWFApplication widget is the base class for hybrid flash applications.
* @module swfApplication
* @title SWFApplication
* @requires yahoo, dom, event, swfWidget, container
* @namespace YAHOO.widget
*/
/**
* Creates the SWFApplication instance and contains initialization data
*
* @class SWFApplication
* @extends Y.Container
* @constructor
* @param {Object} config Configuration parameters for the SWFApplication.
* <ul>
* <li><code>parent</code>: {String} id of dom element to be used as a container for the swfApplication swf</li>
* <li><code>flashvar</code>:hash of key value pairs that can be passed to the swf.</li>
* <li><code>autoLoad</code>:indicates whether the loadswf method will be automatically called on instantiation.</li>
* <li><code>styles/code>:hash of style properties to be applied to the SWFApplication application.</li>
* </ul>
*/
function SWFApplication ( config )
{
}
SWFApplication.ATTRS = {
app: {
{
},
getter:function()
{
return this;
}
},
/**
* URL used for swf
*/
{
},
/**
* Collection of attributes to be used for the swf embed.
*/
{
{
version: "10.0.0",
useExpressInstall: true,
},
lazyAdd: false,
setOnce: true,
{
useExpressInstall: true,
},
{
}
},
/**
* Key value pairs passed to application swf at load time.
*/
{
lazyAdd:false,
setOnce: true,
{
if(!val)
{
return;
}
{
}
{
}
else
{
}
},
{
}
},
/**
* Indicates whether or not to call the loadswf method upon instantiation.
*/
{
value: true
},
/**
* Indicates whether the swf draws automatically.
*
* @private
*/
{
lazyAdd: false,
value: true,
{
return this.setAutoRender(val);
}
},
/**
* Id used to insantiate a ChartDataProvider in the flash application.
*
* @private
*/
{
value: null
},
/**
* Reference to the dataProvider for the SWFApplication.
* @private
*/
{
value: null,
{
this._dataProvider = val;
if(val)
{
}
},
getter: function()
{
return this._dataProvider;
}
}
};
{
/**
* @private
*/
_createId: function()
{
if(Y.SWF._instances)
{
}
},
/**
* @private
* Propagates a specific event from Flash to JS.
* @method _eventHandler
* @param event {Object} The event to be propagated from Flash.
*/
_eventHandler: function(event)
{
{
this._init();
this._clearMethodQueue();
}
{
}
else
{
}
},
/**
* Reference to corresponding Actionscript class.
*/
AS_CLASS: "CartesianCanvas",
/**
* Constant used to generate unique id.
*/
GUID: "yuiSWFApplication",
/**
* Creates swf instance and event listeners for the application.
*/
loadswf: function()
{
},
initializer: function(cfg)
{
if(this.get("autoLoad"))
{
this.loadswf();
}
},
/**
* Event handler for the swfReady event.
*/
_init: function()
{
this._addBackground();
this._updateStyles();
this.fire("appReady");
},
/**
* Adds an item to a container instance.
*
* @param {Object} item to be added to the container instance.
* @props {Object} hash of layout information to be used by the parent container.
*/
{
},
/**
* Sets the autoRender property for the swf.
*/
setAutoRender: function(value)
{
if(value != this._autoRender)
{
this._autoRender = value;
}
},
/**
* Calls a specific function exposed by the SWF's
* ExternalInterface.
* @method callSWF
* @param func {String} the name of the function to call
* @param args {Object} the set of arguments to pass to the function.
*/
{
if (!args)
{
args= [];
}
{
}
else
{
}
},
{
if (!args)
{
args = [];
}
{
}
else
{
}
},
{
if (!args)
{
args = [];
}
{
}
else
{
}
},
{
{
}
else
{
}
},
{
{
}
else
{
}
},
{
{
}
else
{
}
},
{
{
{
}
}
else
{
}
},
_methodQueue: [],
_clearMethodQueue: function()
{
var q = this._methodQueue,
l = q.length,
item;
while(l > 0)
{
l--;
}
},
});