i have setup a subdomain like mysubdomain.domain.tld.
now i want to download Files via flash.net.FileReference which works fine on localhost but
not on deploy server. the error is the path to the file. the server prepends a local path to
the subdomain which is like:
/hsphere/local/home/domain/subdomain/
which is correct, cause the subdomain is routed to a folder which is called
like the subdomain.
here's my as-code:
<CODE>
function downloadNext (item) {
var file:FileReference = new FileReference ();
file.addListener (downLoadListener);
NetDebug.trace ("Download parameter: " + item); // traces fine, just
the filename no path!
file.download (item);
}
</CODE>
to listen to the events, i have an objectListener like:
<CODE>
downLoadListener = new Object ();
//
downLoadListener.onSelect = function (file:FileReference):Void
{
trace ("onSelect: " + file.name);
NetDebug.trace ("onSelect: " + file.name);
};
downLoadListener.onCancel = function (file:FileReference):Void
{
trace ("onCancel");
NetDebug.trace ("onCancel");
};
downLoadListener.onOpen = function (file:FileReference):Void {
trace ("onOpen: " + file.name);
NetDebug.trace ("onOpen: " + file.name);
};
downLoadListener.onProgress = function (file:FileReference, bytesLoaded:Number,
bytesTotal:Number):Void {
trace ("onProgress with bytesLoaded: " + bytesLoaded + "
bytesTotal: " + bytesTotal);
NetDebug.trace ("onProgress with bytesLoaded: " + bytesLoaded + " bytesTotal: " +
bytesTotal);
};
downLoadListener.onComplete = function
(file:FileReference):Void {
trace ("onComplete: " + file.name);
NetDebug.trace ("onComplete: " + file.name);
NetDebug.trace ("fileList.length: " + fileList.length);
if (fileList.length > 1) {
downloadNext (fileList[0]);
}
};
downLoadListener.onIOError = function (file:FileReference):Void
{
trace ("onIOError: " + file.name);
NetDebug.trace ("onIOError: " + file.name);
};
downLoadListener.onHTTPError =
function(file:FileReference):Void {
trace("onHTTPError: " + file.name);
NetDebug.trace ("onHTTPError: " + file.name);
}
downLoadListener.onSecurityError = function(file:FileReference,
errorString:String):Void {
trace("onSecurityError: " + file.name + " errorString:
" + errorString);
NetDebug.trace ("onSecurityError: " + file.name + "
errorString: " + errorString);
}
</CODE>
the funny thing is, that the onSelect gets called, when downloadNext is invoked but no
onHTTPError or else.
anyone to shed some light ?
micha
_______________________________________________
[email protected]
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com