Current documentation section desribes list of properties which can be used for EAFlashUpload configuration. They are orginazed as tree of objects properties. It is done for structuring and for better undestending how to configure EAFlashUpload control. In fact, properties and objects is desribed as they are presented in EAFlashUpload actionscript classes architecture.
So how to set a value to appropriate property?! Reference to property looks like object reference but should be defined as a string. For example: you need to specify url which will be received uploading files. It can be archive by setting uploadUrl property of uploader object and the string reference will be as follows: "uploader.uploadUrl"
As desribed in Configuration of EAFlashUpload section, property value can be assigned by four ways:
-
As a flashvars parameter of <OBJECT> and <EMBED> elements
<object id="EAFlashUpload" codeBase="http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=9,0,0,0" width="450" height="350" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000" VIEWASTEXT> ... <param NAME="FlashVars" VALUE="uploader.uploadUrl=uploadfiles.aspx"> ... <embed flashvars="uploader.uploadUrl=uploadfiles.aspx" ... /> </object>
-
As a property of flashvars object. This type implies using of SWFObject JavaScript library:
<script type="text/javascript"> var params = { wmode: "window" };
var attributes = { id: "EAFlashUpload", name: "EAFlashUpload" };
var flashvars = new Object(); flashvars["uploader.uploadUrl"] = "uploadfiles.aspx";
swfobject.embedSWF("EAFUpload.swf", "EAFlashUpload_holder", "450", "350", "9.0.0", "expressInstall.swf", flashvars, params, attributes); </script> -
Via XML configuration file:
<EAFlashUpload> ... <uploader uploadUrl="uploadfile.aspx" /> ... </EAFlashUpload>
-
Via EAFlashUpload JavaScript API after control has been loaded on the page.
function EAFlashUpload_onMovieLoad() { EAFlashUpload.setProperty("uploader.uploadUrl", "uploadfile.aspx"); }
Objects contain list of properties related to appropriate user interface. To get a reference to the object properties you should to use "view" object and the string reference would be as follows: "view.addButton.text".
Data types
The types of properties is described as they are defined in ActionScript objects structure and you can opperate with such types only via JavaScript API or SWFObject in other cases all properties values should be defined as a string. Property with "Array" type can be assigned as an array only by using EAFlashUpload JavaScript API.
function EAFlashUpload_onMovieLoad() { EAFlashUpload.setProperty("daysAbbrev", ["Sun1", "Mon1", "Tue1", "Wed1", "Thu1", "Fri1", "Sat1"]); } // in other case flashvars["daysAbbrev"] = "Sun|Mon|Tue|Wed|Thu|Fri|Sat";