Interface
|
uplpu_initialize(handler, width, height, btWidth, btText,
fltLabel, fltExts, maxSize, postVars, urlRecv, sttBps, cfg):void
|
|
Initializes the Uplpu Flash component.
|
| handler:String |
Optional; String or null. If String, the name of the event handler that must
evaluate to a global accessable JavaScript function.
e.g.: 'myUplpuEventHandler' or 'Uplpu.uplpu_1.intern.eventHandler'
The format of the event handler: eventHandler(info:Object):void.
|
| width:uint |
The width of the component.
|
| height:uint |
The height of the component.
|
| btWidth:uint |
The width of each button. The button width and component width together
determine the width of the progress bar:
widthProgressBar = componentWidth - (btWidth * 3).
|
| btText:String |
Comma separated value string with three labels for the buttons.
|
| fltLabel:String |
Filter label: Specifies a file type filter label for the file selection dialog
box.
|
| fltExts:String |
Filter extensions: Specifies file extension filters for the file selection dialog
box. These need to be comma separated values without any spaces or dots.
e.g.: 'xt1,xt2,xt3'.
This is used on all tested systems.
On Macintosh, files that do not match the extensions are grayed out and not selectable.
On windows files that do not match the extensions are not shown, while the
file filter label has the following format: 'fltLabel (*.xt1 *.xt2 *.xt3)'
|
| maxSize:uint |
Specifies the maximum allowed size in bytes of the file to be uploaded.
event_e_size is send if the selected file size is greater than specified.
|
| postVars:String |
Data to be send to the server along with the file upload.
e.g.:
var postVars = 'sessionid=0123456789ABCDEF×tamp=1234567890';
javascript.escape the values when needed.
This has following equivalent in an HTML form:
<INPUT type="text" name="sessionid" value="0123456789ABCDEF">
<INPUT type="text" name="timestamp" value="1234567890">
|
| urlRecv:String |
Relative or absolute url of the server side script that receives the file upload.
See
§ Server side script to see what it looks like.
§ https tells about https support.
|
| sttBps:String |
State variable Bytes per Second. Use empty string or null if no value is
available (yet).
Read
§ Mac OS X
about progress emulation, and how this parameter relates to
event_sttbps.
|
| cfg:Object |
When null is given, the default configuration tree is used for Uplpu's appearance.
Otherwise use the return value of
uplpu_configuration()
which gets the default configuration tree, modify property values and use it as
an argument to this parameter.
|
return value |
void
|
-
This call checks if the name of the component is uplpu-yourdomain.com.swf and
if this component was loaded from yourdomain.com or a subdomain.
If this is not the case Uplpu will not function and will notify the user with a
JavaScript alert popup.
|
| uplpu_configuration( ):void |
|
Returns the configuration property tree that Uplpu uses to set the metrics,
fonts and colors of its little gui.
This allows you to change the default values and then use the tree as an
argument to parameter
uplpu_initialize( cfg ).
|
return value |
var cfg:Object = {
progress: {
borderWidth: 1,
borderColor: 0x000000,
backgroundColor: 0xAAAAAA,
progressColor: 0x6666FF,
textSubject: {
size: 12,
font: 'Arial',
bold: 'false',
color: 0x000000,
align: 'left',
ofsLeft: 4,
ofsTop: 0
},
textPercent: {
size: 16,
font: 'Arial',
bold: 'true',
color: 0xFFFFFF,
align: 'center',
ofsLeft: 0,
ofsTop: -2
}
},
buttons: {
surfaceColor: 0xD4D0C8,
hilightColor: 0xFFFFFF,
shadedColor: 0x808080,
shadowColor: 0x606060,
spliceColor: 0x000000,
disaColor: 0xFFFFFF,
disbColor: 0x606060,
textField: {
size: 12,
font: 'Arial',
bold: 'false',
color: 0x000000,
align: 'center',
ofsLeft: 0,
ofsTop: 0
}
}
}
|
e.g.:
To change the color of the progress indicator...
cfg.progress.progressColor = 0x008800;
To change the font of the buttons...
cfg.buttons.textField.font = 'verdana';
|
|