Many resources are needed to download a project. Please understand that we have to compensate our server costs. Thank you in advance. Project price only 1 $
You can buy this project and download/modify it how often you want.
/*
Copyright (c) 2010, Yahoo! Inc. All rights reserved.
Code licensed under the BSD License:
http://developer.yahoo.com/yui/license.html
version: 2.8.2r1
*/
/*extern ActiveXObject, __flash_unloadHandler, __flash_savedUnloadHandler */
/*!
* SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/
*
* SWFObject is (c) 2007 Geoff Stearns and is released under the MIT License:
* http://www.opensource.org/licenses/mit-license.php
* @namespace YAHOO
*/
YAHOO.namespace("deconcept");
YAHOO.deconcept = YAHOO.deconcept || {};
if(typeof YAHOO.deconcept.util == "undefined" || !YAHOO.deconcept.util)
{
YAHOO.deconcept.util = {};
}
if(typeof YAHOO.deconcept.SWFObjectUtil == "undefined" || !YAHOO.deconcept.SWFObjectUtil)
{
YAHOO.deconcept.SWFObjectUtil = {};
}
YAHOO.deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey)
{
if(!document.getElementById) { return; }
this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
this.skipDetect = YAHOO.deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params = {};
this.variables = {};
this.attributes = [];
if(swf) { this.setAttribute('swf', swf); }
if(id) { this.setAttribute('id', id); }
if(w) { this.setAttribute('width', w); }
if(h) { this.setAttribute('height', h); }
if(ver) { this.setAttribute('version', new YAHOO.deconcept.PlayerVersion(ver.toString().split("."))); }
this.installedVer = YAHOO.deconcept.SWFObjectUtil.getPlayerVersion();
if (!window.opera && document.all && this.installedVer.major > 7)
{
// only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
YAHOO.deconcept.SWFObject.doPrepUnload = true;
}
if(c)
{
this.addParam('bgcolor', c);
}
var q = quality ? quality : 'high';
this.addParam('quality', q);
this.setAttribute('useExpressInstall', false);
this.setAttribute('doExpressInstall', false);
var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
this.setAttribute('xiRedirectUrl', xir);
this.setAttribute('redirectUrl', '');
if(redirectUrl)
{
this.setAttribute('redirectUrl', redirectUrl);
}
};
YAHOO.deconcept.SWFObject.prototype =
{
useExpressInstall: function(path)
{
this.xiSWFPath = !path ? "expressinstall.swf" : path;
this.setAttribute('useExpressInstall', true);
},
setAttribute: function(name, value){
this.attributes[name] = value;
},
getAttribute: function(name){
return this.attributes[name];
},
addParam: function(name, value){
this.params[name] = value;
},
getParams: function(){
return this.params;
},
addVariable: function(name, value){
this.variables[name] = value;
},
getVariable: function(name){
return this.variables[name];
},
getVariables: function(){
return this.variables;
},
getVariablePairs: function(){
var variablePairs = [];
var key;
var variables = this.getVariables();
for(key in variables)
{
if(variables.hasOwnProperty(key))
{
variablePairs[variablePairs.length] = key +"="+ variables[key];
}
}
return variablePairs;
},
getSWFHTML: function() {
var swfNode = "";
var params = {};
var key = "";
var pairs = "";
if (navigator.plugins && navigator.mimeTypes && navigator.mimeTypes.length) { // netscape plugin architecture
if (this.getAttribute("doExpressInstall")) {
this.addVariable("MMplayerType", "PlugIn");
this.setAttribute('swf', this.xiSWFPath);
}
swfNode = '
*/
upload: function(fileID, uploadScriptPath, method, vars, fieldName)
{
this._swf.upload(fileID, uploadScriptPath, method, vars, fieldName);
},
/**
* Starts the upload of the files specified by fileIDs, or adds them to a currently running queue. The upload queue is automatically managed.
*
* @param fileIDs {Array} The ids of the files to start uploading.
* @param uploadScriptPath {String} The URL of the upload location.
* @param method {String} Either "GET" or "POST", specifying how the variables accompanying the file upload POST request should be submitted. "GET" by default.
* @param vars {Object} The object containing variables to be sent in the same request as the file upload.
* @param fieldName {String} The name of the variable in the POST request containing the file data. "Filedata" by default.
*
*/
uploadThese: function(fileIDs, uploadScriptPath, method, vars, fieldName)
{
this._swf.uploadThese(fileIDs, uploadScriptPath, method, vars, fieldName);
},
/**
* Starts uploading all files in the queue. If this function is called, the upload queue is automatically managed.
*
* @param uploadScriptPath {String} The URL of the upload location.
* @param method {String} Either "GET" or "POST", specifying how the variables accompanying the file upload POST request should be submitted. "GET" by default.
* @param vars {Object} The object containing variables to be sent in the same request as the file upload.
* @param fieldName {String} The name of the variable in the POST request containing the file data. "Filedata" by default.
*
*/
uploadAll: function(uploadScriptPath, method, vars, fieldName)
{
this._swf.uploadAll(uploadScriptPath, method, vars, fieldName);
},
/**
* Cancels the upload of a specified file. If no file id is specified, all ongoing uploads are cancelled.
*
* @param fileID {String} The ID of the file whose upload should be cancelled.
*/
cancel: function(fileID)
{
this._swf.cancel(fileID);
},
/**
* Clears the list of files queued for upload.
*
*/
clearFileList: function()
{
this._swf.clearFileList();
},
/**
* Removes the specified file from the upload queue.
*
* @param fileID {String} The id of the file to remove from the upload queue.
*/
removeFile: function (fileID)
{
this._swf.removeFile(fileID);
},
/**
* Turns the logging functionality on.
* Uses Flash internal trace logging, as well as YUI Logger, if available.
*
* @param allowLogging {Boolean} If true, logs are output; otherwise, no logs are produced.
*/
setAllowLogging: function (allowLogging)
{
this._swf.setAllowLogging(allowLogging);
},
/**
* Sets the number of simultaneous uploads when using uploadAll()
* The minimum value is 1, and maximum value is 5. The default value is 2.
*
* @param simUploadLimit {int} Number of simultaneous uploads, between 1 and 5.
*/
setSimUploadLimit : function (simUploadLimit)
{
this._swf.setSimUploadLimit(simUploadLimit);
},
/**
* Sets the flag allowing users to select multiple files for the upload.
*
* @param allowMultipleFiles {Boolean} If true, multiple files can be selected. False by default.
*/
setAllowMultipleFiles : function (allowMultipleFiles)
{
this._swf.setAllowMultipleFiles(allowMultipleFiles);
},
/**
* Sets the file filters for the "Browse" dialog.
*
* @param newFilterArray An array of sets of key-value pairs of the form
* {extensions: extensionString, description: descriptionString, [optional]macType: macTypeString}
* The extensions string is a semicolon-delimited list of elements of the form "*.xxx",
* e.g. "*.jpg;*.gif;*.png".
*/
setFileFilters : function (fileFilters)
{
this._swf.setFileFilters(fileFilters);
},
/**
* Enables the mouse events on the Uploader.
* If the uploader is being rendered as a button,
* then the button's skin is set to "up"
* (first section of the button skin sprite).
*
*/
enable : function ()
{
this._swf.enable();
},
/**
* Disables the mouse events on the Uploader.
* If the uploader is being rendered as a button,
* then the button's skin is set to "disabled"
* (fourth section of the button skin sprite).
*
*/
disable : function ()
{
this._swf.disable();
}
});
YAHOO.register("uploader", YAHOO.widget.Uploader, {version: "2.8.2r1", build: "7"});