[Flashcoders] FileReference

2010-10-21 Thread Lehr, Theodore
I have two files where I use:

var file:FileReference();
var jpgSource:BitmapData = new BitmapData(x,y);
jpgSource.draw(sprite);

var jpgEncoder:JPGEncoder = new JPGENcoder(85);
var jpgStream:ByteArray = jpgEncoder.encode(jpgSource);

file.save(jpgStream, 'fileName.jpg');


it works fine in one file, but in another (both in the same directory) I get:

1061: Call to a possibly undefined method save through a reference with static 
type flash.net:FileReference

Why would it work in one but not the other?
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] FileReference

2010-10-21 Thread Cédric Muller
don't, but given your example I /think/ that's logical:

var file:FileReference(); - this is not instanciation

var file:FileReference = new FileReference()
should be better and by doing such you shoudn't see the error message

 I have two files where I use:
 
 var file:FileReference();
 var jpgSource:BitmapData = new BitmapData(x,y);
 jpgSource.draw(sprite);
 
 var jpgEncoder:JPGEncoder = new JPGENcoder(85);
 var jpgStream:ByteArray = jpgEncoder.encode(jpgSource);
 
 file.save(jpgStream, 'fileName.jpg');
 
 
 it works fine in one file, but in another (both in the same directory) I get:
 
 1061: Call to a possibly undefined method save through a reference with 
 static type flash.net:FileReference
 
 Why would it work in one but not the other?
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] FileReference

2010-10-21 Thread Lehr, Theodore
sorry - error in transmition - I do have it correctly in my file... just wrote 
it wrong in the email...


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Cédric Muller 
[flashco...@benga.li]
Sent: Thursday, October 21, 2010 8:55 AM
To: Flash Coders List
Subject: Re: [Flashcoders] FileReference

don't, but given your example I /think/ that's logical:

var file:FileReference(); - this is not instanciation

var file:FileReference = new FileReference()
should be better and by doing such you shoudn't see the error message

 I have two files where I use:

 var file:FileReference();
 var jpgSource:BitmapData = new BitmapData(x,y);
 jpgSource.draw(sprite);

 var jpgEncoder:JPGEncoder = new JPGENcoder(85);
 var jpgStream:ByteArray = jpgEncoder.encode(jpgSource);

 file.save(jpgStream, 'fileName.jpg');


 it works fine in one file, but in another (both in the same directory) I get:

 1061: Call to a possibly undefined method save through a reference with 
 static type flash.net:FileReference

 Why would it work in one but not the other?
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] FileReference

2010-10-21 Thread Henrik Andersson

Lehr, Theodore skriver:

1061: Call to a possibly undefined method save through a reference with static 
type flash.net:FileReference

Why would it work in one but not the other?


Because only one of them targets FP 10 where the method was added.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] FileReference

2010-10-21 Thread Lehr, Theodore
Yes! A publish setting indeed! Thanks!


From: flashcoders-boun...@chattyfig.figleaf.com 
[flashcoders-boun...@chattyfig.figleaf.com] On Behalf Of Henrik Andersson 
[he...@henke37.cjb.net]
Sent: Thursday, October 21, 2010 10:40 AM
To: Flash Coders List
Subject: Re: [Flashcoders] FileReference

Lehr, Theodore skriver:
 1061: Call to a possibly undefined method save through a reference with 
 static type flash.net:FileReference

 Why would it work in one but not the other?

Because only one of them targets FP 10 where the method was added.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] fileReference failing silently

2010-08-10 Thread Matt S.
Thanks Juan! Looks like that did the trick.

Cheers,

.m

On Mon, Aug 9, 2010 at 8:14 PM, Juan Pablo Califano
califa010.flashcod...@gmail.com wrote:
 The issue here is quite likely the garbage collector doing its job...

 You FileRefence object is referenced only in a local variable in
 the deskClickHandler method. After the method returns, since there's no
 other reference to it, it's eligible for collection. So it might stick
 around or not. In your case, it seems it doesn't. Try storing the fileref in
 an instance variable instead. It should fix it, I think.

 Cheers
 Juan Pablo Califano

 2010/8/9 Matt S. mattsp...@gmail.com

 I'm trying to use fileReference to allow users to download images, but
 it keeps failing, without errors, and without even seeming to start
 the download. What makes it weird is that it does open the finder
 window and prompts me to save the select a download location etc, but
 then when I click save...nothing. No errors, no files, just nothing.
 Here is the code I'm currently using (with puppy photo substituted for
 actual content). This is failing both locally and when uploaded to the
 server. Any suggestions much appreciated, I've been googling but
 havent found a solution.

 tia,

 Matt


 //CODE


 private function deskClickHandler(e:MouseEvent):void{

        var downloadURL:URLRequest;
       var fileName:String = SomeFile.pdf;
        var file:FileReference;

        downloadURL = new URLRequest();
        downloadURL.url =
 http://mystuffspace.com/graphic/adorable-puppies.jpg;;
        file = new FileReference();
        file.addEventListener(ProgressEvent.PROGRESS, progressHandler);
        file.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
        file.addEventListener(Event.COMPLETE, completeHandler);
        file.download(downloadURL, fileName);
 }

 private function progressHandler(event:ProgressEvent):void {
    var file:FileReference = FileReference(event.target);
    trace(progressHandler: name= + file.name +  bytesLoaded= +
 event.bytesLoaded +  bytesTotal= + event.bytesTotal);
 }

 private function ioErrorHandler(event:IOErrorEvent):void {
    trace(ioErrorHandler:  + event);
 }

 private function completeHandler(event:Event):void {
    trace(completeHandler:  + event);
 }
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] fileReference failing silently

2010-08-09 Thread Matt S.
I'm trying to use fileReference to allow users to download images, but
it keeps failing, without errors, and without even seeming to start
the download. What makes it weird is that it does open the finder
window and prompts me to save the select a download location etc, but
then when I click save...nothing. No errors, no files, just nothing.
Here is the code I'm currently using (with puppy photo substituted for
actual content). This is failing both locally and when uploaded to the
server. Any suggestions much appreciated, I've been googling but
havent found a solution.

tia,

Matt


//CODE


private function deskClickHandler(e:MouseEvent):void{

var downloadURL:URLRequest;
   var fileName:String = SomeFile.pdf;
var file:FileReference;

downloadURL = new URLRequest();
downloadURL.url =
http://mystuffspace.com/graphic/adorable-puppies.jpg;;
file = new FileReference();
file.addEventListener(ProgressEvent.PROGRESS, progressHandler);
file.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
file.addEventListener(Event.COMPLETE, completeHandler);
file.download(downloadURL, fileName);
}

private function progressHandler(event:ProgressEvent):void {
var file:FileReference = FileReference(event.target);
trace(progressHandler: name= + file.name +  bytesLoaded= +
event.bytesLoaded +  bytesTotal= + event.bytesTotal);
}

private function ioErrorHandler(event:IOErrorEvent):void {
trace(ioErrorHandler:  + event);
}

private function completeHandler(event:Event):void {
trace(completeHandler:  + event);
}
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] fileReference failing silently

2010-08-09 Thread Juan Pablo Califano
The issue here is quite likely the garbage collector doing its job...

You FileRefence object is referenced only in a local variable in
the deskClickHandler method. After the method returns, since there's no
other reference to it, it's eligible for collection. So it might stick
around or not. In your case, it seems it doesn't. Try storing the fileref in
an instance variable instead. It should fix it, I think.

Cheers
Juan Pablo Califano

2010/8/9 Matt S. mattsp...@gmail.com

 I'm trying to use fileReference to allow users to download images, but
 it keeps failing, without errors, and without even seeming to start
 the download. What makes it weird is that it does open the finder
 window and prompts me to save the select a download location etc, but
 then when I click save...nothing. No errors, no files, just nothing.
 Here is the code I'm currently using (with puppy photo substituted for
 actual content). This is failing both locally and when uploaded to the
 server. Any suggestions much appreciated, I've been googling but
 havent found a solution.

 tia,

 Matt


 //CODE


 private function deskClickHandler(e:MouseEvent):void{

var downloadURL:URLRequest;
   var fileName:String = SomeFile.pdf;
var file:FileReference;

downloadURL = new URLRequest();
downloadURL.url =
 http://mystuffspace.com/graphic/adorable-puppies.jpg;;
file = new FileReference();
file.addEventListener(ProgressEvent.PROGRESS, progressHandler);
file.addEventListener(IOErrorEvent.IO_ERROR, ioErrorHandler);
file.addEventListener(Event.COMPLETE, completeHandler);
file.download(downloadURL, fileName);
 }

 private function progressHandler(event:ProgressEvent):void {
var file:FileReference = FileReference(event.target);
trace(progressHandler: name= + file.name +  bytesLoaded= +
 event.bytesLoaded +  bytesTotal= + event.bytesTotal);
 }

 private function ioErrorHandler(event:IOErrorEvent):void {
trace(ioErrorHandler:  + event);
 }

 private function completeHandler(event:Event):void {
trace(completeHandler:  + event);
 }
 ___
 Flashcoders mailing list
 Flashcoders@chattyfig.figleaf.com
 http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] fileReference and proxy

2007-09-13 Thread Snaijer, Paul de
Hi all,
 
I have a problem with the fileReference class and the proxy. The situation is a 
Flash movie in which you can select files and upload them to the server via the 
fileReference.upload() method. On the server the upload() method calls a 
Coldfusion file which handles the upload to the correct folder. Access to the 
internet goes throu a proxy. After clicking the button to fire the 
fileReference.upload() method, Flash returns a 407 error (proxy authentication 
error). This error only shows up on a Mac - Firefox combination! On a Windows - 
Firefox combination you get a prompt to fill in your proxy username and 
password. Not perfect but the upload works.
 
Is there a way to solve this problem? A search on the net shows a lot questions 
like this, but no answers...
 
Thanx allready!!
 
Best regards,
Paul de Snaijer


This e-mail and any attachment is for authorised use by the intended 
recipient(s) only. It may contain proprietary material, confidential 
information and/or be subject to legal privilege. It should not be copied, 
disclosed to, retained or used by, any other party. If you are not an intended 
recipient then please promptly delete this e-mail and any attachment and all 
copies and inform the sender. Thank you.
___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference returning full path?

2007-07-26 Thread Muzak
Upload the file and return the full path when done.
Look into the uploadCompleteData event
http://livedocs.adobe.com/flash/9.0/ActionScriptLangRefV3/flash/net/FileReference.html#event:uploadCompleteData

regards,
Muzak

- Original Message - 
From: Mendelsohn, Michael [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Thursday, July 26, 2007 4:35 PM
Subject: [Flashcoders] FileReference returning full path?


Hi list...

Any way for FileReference to return the full path instead of just the
name of the file selected?  If not, how else to get it?

- MM


___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] FileReference returning full path?

2007-07-26 Thread Mendelsohn, Michael
Hi list...

Any way for FileReference to return the full path instead of just the
name of the file selected?  If not, how else to get it?

- MM
___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] FileReference

2007-06-21 Thread Paul Chang
I was happy to see a FileReference Class finally in Flash so that the  
upload of basic files could be accomplished without the use of  
backend scripts.


However, I want to use FileReference in a slightly different way and  
I feel like it should be possible but can't quite get there.


Here's the goal:

Allow the user to select a text file from their local file system to  
populate a text field on the stage.


Solution?:

I used FileReference.browse() to allow the user to find the file of  
interest, once selected, I have access to the FileReference  
properties including file name. If I had the path to the file in  
addition to name, I could use URLLoader to pull in the text file, but  
I only have name.


Questions:

Is there a way to get at the full qualified path for the file? Or  
better, since I have the FileReference object, is there a way to  
access its contents?


Thanks in advance,
Paul


___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference

2007-06-21 Thread Nick Johnston

Paul,

FileReference allows for the upload and download of files. You first 
have to upload the file (with use of a backend script (PHP or whatever). 
Once the file is uploaded you can use the FileReference's download() 
method to download the file. You should then be able to open the file 
and display it's contents in the TextInput.


You are not able to get the fully qualified file path on the person's 
local machine.


Cheers,
Nick

Paul Chang wrote:
I was happy to see a FileReference Class finally in Flash so that the 
upload of basic files could be accomplished without the use of backend 
scripts.


However, I want to use FileReference in a slightly different way and I 
feel like it should be possible but can't quite get there.


Here's the goal:

Allow the user to select a text file from their local file system to 
populate a text field on the stage.


Solution?:

I used FileReference.browse() to allow the user to find the file of 
interest, once selected, I have access to the FileReference properties 
including file name. If I had the path to the file in addition to 
name, I could use URLLoader to pull in the text file, but I only have 
name.


Questions:

Is there a way to get at the full qualified path for the file? Or 
better, since I have the FileReference object, is there a way to 
access its contents?


Thanks in advance,
Paul


___
Flashcoders@chattyfig.figleaf.com
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



___
Flashcoders@chattyfig.figleaf.com
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


RE: [Flashcoders] FileReference

2007-06-21 Thread Merrill, Jason
I don't think you can access the contents, but you should know where the
file is uploaded to on your server, and thus, with the selected filename
from FileReference, you know the filename and thus along with Flash's
._url property, all the info about the URL you need.  

Jason Merrill
Bank of America  
GTO Learning  Leadership Development
eTools  Multimedia Team


 

-Original Message-
From: [EMAIL PROTECTED] 
[mailto:[EMAIL PROTECTED] On Behalf 
Of Paul Chang
Sent: Thursday, June 21, 2007 3:32 PM
To: Flashcoders@chattyfig.figleaf.com
Subject: [Flashcoders] FileReference

I was happy to see a FileReference Class finally in Flash so 
that the upload of basic files could be accomplished without 
the use of backend scripts.

However, I want to use FileReference in a slightly different 
way and I feel like it should be possible but can't quite get there.

Here's the goal:

Allow the user to select a text file from their local file 
system to populate a text field on the stage.

Solution?:

I used FileReference.browse() to allow the user to find the 
file of interest, once selected, I have access to the 
FileReference properties including file name. If I had the 
path to the file in addition to name, I could use URLLoader 
to pull in the text file, but I only have name.

Questions:

Is there a way to get at the full qualified path for the 
file? Or better, since I have the FileReference object, is 
there a way to access its contents?

Thanks in advance,
Paul


___
Flashcoders@chattyfig.figleaf.com
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

___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference

2007-06-21 Thread Muzak
The file has to be uploaded to your server first, so your assumption that you 
don't need a backend script isn't correct.
You don't have direct acces to files through a FileReference instance, for 
security reasons.

So after the user has selected the file using FileReference.browse(), you have 
to use FileReference.upload() to upload the file to 
your server using your choice of server side script (PHP, CF, JAVA, etc..).
Once the file is uploaded you can then load it into your Flash app.

regards,
Muzak

- Original Message - 
From: Paul Chang [EMAIL PROTECTED]
To: Flashcoders@chattyfig.figleaf.com
Sent: Thursday, June 21, 2007 9:32 PM
Subject: [Flashcoders] FileReference


I was happy to see a FileReference Class finally in Flash so that the  upload 
of basic files could be accomplished without the use 
of  backend scripts.

 However, I want to use FileReference in a slightly different way and  I feel 
 like it should be possible but can't quite get there.

 Here's the goal:

 Allow the user to select a text file from their local file system to  
 populate a text field on the stage.

 Solution?:

 I used FileReference.browse() to allow the user to find the file of  
 interest, once selected, I have access to the FileReference 
 properties including file name. If I had the path to the file in  addition to 
 name, I could use URLLoader to pull in the text 
 file, but  I only have name.

 Questions:

 Is there a way to get at the full qualified path for the file? Or  better, 
 since I have the FileReference object, is there a way 
 to  access its contents?

 Thanks in advance,
 Paul


___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference

2007-06-21 Thread Muzak
Newer versions of the Flash Player allow you to send back a response when the 
upload has finished.
This can be used to send back the actual path and filename of the uploaded file.

Retrieving the initial filename is not always sufficient.
Often you will have to rename the file on the server to avoid conflicts with 
existing files, etc..

FileReference.onUploadCompleteData
Availability: ActionScript 2.0; Flash Player 9.0.28.0
http://livedocs.adobe.com/flash/9.0/main/1674.html

Note the Flash player version.
This means that FileReference in flash player 8 does not have this event and 
you'll have to find another way to get information from 
the server (if needed) after a file has been uploaded.

regards,
Muzak



- Original Message - 
From: Merrill, Jason [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Thursday, June 21, 2007 9:54 PM
Subject: RE: [Flashcoders] FileReference


I don't think you can access the contents, but you should know where the
 file is uploaded to on your server, and thus, with the selected filename
 from FileReference, you know the filename and thus along with Flash's
 ._url property, all the info about the URL you need.

 Jason Merrill
 Bank of America
 GTO Learning  Leadership Development
 eTools  Multimedia Team 


___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] FileReference

2007-05-11 Thread Berkay Unal

Hi Coders,

I am using file referecence to download file from webserver. It works
flawless on my local. I select a save location save and file is there

But when i try it on my server. It again pops for me to select the location.
I select the location click save. Although it shows as it saved the file is
not there.

Can anyone help. It's so urgent

B
___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] FileReference: View Content?

2007-04-13 Thread Doug Coning
Is there a way to access the content that is uploaded via FileReference
without sending it to a server?  I want to allow a user to upload an XML
into a swf file.  The upload command sends the data to a remote server,
but the swf file is what needs the data.  I have parsed through the
results and can't see the data.  

Does anyone know of a way to perform FileReference.Browse and then view
the text or xml in Flash without uploading it to the server first?

Thanks,

Doug Coning
Senior Web Development Programmer
FORUM Solutions
[EMAIL PROTECTED]
 
This e-mail and any attachment(s) are intended for the specified recipient(s) 
only and are legally protected.  If you have received this communication in 
error, please reply to sender's e-mail address with notification of the error 
and then destroy this message in all electronic and physical forms.
___
[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


[Flashcoders] FileReference

2007-01-24 Thread [p e r c e p t i c o n]

I've been tasked with making the FileReference class work with Java/jsp.
are there any Java experts on this list that i can ask questions?  php works
fine, as well as asp, but what i really need right now is Java...

any ideas appreciated

thanks

p
___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] FileReference question

2007-01-08 Thread Mendelsohn, Michael
Hi list...

Does the url parameter for FileReference.download() have to be an
absolute path?
When I am testing locally:
this worked for me:
fr.download(http://www.abc.com/a.pdf;);

But this relative path didn't:
fr.download(a.pdf);


Thanks,
- Michael M.

___
Flashcoders@chattyfig.figleaf.com
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


RE: [Flashcoders] FileReference + ASP + FlashPlayer9

2007-01-02 Thread Merrill, Jason
We do it with Flash 9 and .ASP .NET and it works fine.  Not sure about
classic ASP - is that what you refer to?

Jason Merrill
Bank of America 
Learning  Organizational Effectiveness
 
 
 
 
 
___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference + ASP + FlashPlayer9

2007-01-02 Thread Evan Bond

Yes, we are using classic ASP

Unfortunately it is the only option we have as the server only supports
classic ASP (no PHP, ASP.NET or CF)




On 1/2/07, Merrill, Jason [EMAIL PROTECTED] wrote:


We do it with Flash 9 and .ASP .NET and it works fine.  Not sure about
classic ASP - is that what you refer to?

Jason Merrill
Bank of America
Learning  Organizational Effectiveness





___
Flashcoders@chattyfig.figleaf.com
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


___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference + ASP + FlashPlayer9

2007-01-02 Thread Evan Bond

Scratch that...I just found out the server supports ASP.NET and we can make
use of it

Could you point me to a good Flash + .NET upload example script?

Thanks,

Evan


On 1/2/07, Evan Bond [EMAIL PROTECTED] wrote:


Yes, we are using classic ASP

Unfortunately it is the only option we have as the server only supports
classic ASP (no PHP, ASP.NET http://asp.net/ or CF)




On 1/2/07, Merrill, Jason [EMAIL PROTECTED] wrote:

 We do it with Flash 9 and .ASP .NET and it works fine.  Not sure about
 classic ASP - is that what you refer to?

 Jason Merrill
 Bank of America
 Learning  Organizational Effectiveness





 ___
 Flashcoders@chattyfig.figleaf.com
 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




___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] FileReference + ASP + FlashPlayer9

2006-12-29 Thread Evan Bond

Hi all, this is my first post on this list :)

Hope someone can help me out with this...

There seems to be an issue with the new Flash Player 9 in combination with
FileReference and uploading through ASP.

I tested the following scenario's

Flash 8 Player - PHP = OK
Flash 8 Player - CF = OK
Flash 8 Player - ASP = OK

Flash 9 Player - PHP = OK
Flash 9 Player - CF = OK
Flash 9 Player - ASP = DOES NOT WORK

It seems like flash player 9 has difficulties uploading through ASP. We
tried this on 2 ASP servers which are running ASP 1+.

I used the asp script in combination with FreeAspUpload.asp a popular asp
component.

Has anyone else experienced problems like this? I submitted feedback to the
FlashPlayer9 feedback submission page on adobe.com. But in any case they
never reply to emails unless to obtain more info.

Here is an example:
http://ppt.unisurv.com/test/FileReference.html

If you uninstal FlashPlayer9 and install FlashPlayer8 you can see it work.
Once you upload your file will be here:
http://ppt.unisurv.com/test/upload/files/

Any help is much appreciated.

Cheers,

Evan
___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference + ASP + FlashPlayer9

2006-12-29 Thread l u c h y x

Yep yep.
The same behavior here.
Did you check the privacy settings ?

Also check this Firefox plug-in.
http://www.sephiroth.it/weblog/archives/2006/10/flash_switcher_for_firefox.php

Best


On 12/29/06, Evan Bond [EMAIL PROTECTED] wrote:


Hi all, this is my first post on this list :)

Hope someone can help me out with this...

There seems to be an issue with the new Flash Player 9 in combination with
FileReference and uploading through ASP.

I tested the following scenario's

Flash 8 Player - PHP = OK
Flash 8 Player - CF = OK
Flash 8 Player - ASP = OK

Flash 9 Player - PHP = OK
Flash 9 Player - CF = OK
Flash 9 Player - ASP = DOES NOT WORK

It seems like flash player 9 has difficulties uploading through ASP. We
tried this on 2 ASP servers which are running ASP 1+.

I used the asp script in combination with FreeAspUpload.asp a popular asp
component.

Has anyone else experienced problems like this? I submitted feedback to
the
FlashPlayer9 feedback submission page on adobe.com. But in any case they
never reply to emails unless to obtain more info.

Here is an example:
http://ppt.unisurv.com/test/FileReference.html

If you uninstal FlashPlayer9 and install FlashPlayer8 you can see it work.
Once you upload your file will be here:
http://ppt.unisurv.com/test/upload/files/

Any help is much appreciated.

Cheers,

Evan
___
Flashcoders@chattyfig.figleaf.com
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





--
l   u   c   h   y   x
r i a e v o l u t i o n (r)
[EMAIL PROTECTED]
http://www.riaevolution.com
Phone: +54 (11) 4931-7006
___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference + ASP + FlashPlayer9

2006-12-29 Thread Evan Bond

I'm not sure what to check exactly. I added the domain ppt.unisurv.com to my
allowed list.still a no go though on the uploading using FP9

On 12/29/06, l u c h y x [EMAIL PROTECTED] wrote:


Yep yep.
The same behavior here.
Did you check the privacy settings ?

Also check this Firefox plug-in.

http://www.sephiroth.it/weblog/archives/2006/10/flash_switcher_for_firefox.php

Best


On 12/29/06, Evan Bond [EMAIL PROTECTED] wrote:

 Hi all, this is my first post on this list :)

 Hope someone can help me out with this...

 There seems to be an issue with the new Flash Player 9 in combination
with
 FileReference and uploading through ASP.

 I tested the following scenario's

 Flash 8 Player - PHP = OK
 Flash 8 Player - CF = OK
 Flash 8 Player - ASP = OK

 Flash 9 Player - PHP = OK
 Flash 9 Player - CF = OK
 Flash 9 Player - ASP = DOES NOT WORK

 It seems like flash player 9 has difficulties uploading through ASP. We
 tried this on 2 ASP servers which are running ASP 1+.

 I used the asp script in combination with FreeAspUpload.asp a popular
asp
 component.

 Has anyone else experienced problems like this? I submitted feedback to
 the
 FlashPlayer9 feedback submission page on adobe.com. But in any case they
 never reply to emails unless to obtain more info.

 Here is an example:
 http://ppt.unisurv.com/test/FileReference.html

 If you uninstal FlashPlayer9 and install FlashPlayer8 you can see it
work.
 Once you upload your file will be here:
 http://ppt.unisurv.com/test/upload/files/

 Any help is much appreciated.

 Cheers,

 Evan
 ___
 Flashcoders@chattyfig.figleaf.com
 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




--
l   u   c   h   y   x
r i a e v o l u t i o n (r)
[EMAIL PROTECTED]
http://www.riaevolution.com
Phone: +54 (11) 4931-7006
___
Flashcoders@chattyfig.figleaf.com
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


___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] FileReference LocalConnection/SharedObject issue

2006-11-06 Thread Lori Hutchek
Hi All,

I am trying to send a FileReference object over a localconnection or through a 
sharedobject. In the second swf, which is expecting the data, its receiving the 
object but for some reason all of the properties of the fileReference object 
are undefined.

Has anyone else experience this? Any help would be greatly appreciated.

Lori-

___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference and mac file types

2006-10-29 Thread Muzak

http://www.google.com/search?hl=enq=filereference+mactypemeta=

http://www.tink.ws/blog/macintosh-file-types/
http://www.joshbuhler.com/2006/05/30/mac-file-types-one-more-thing/

regards,
Muzak

- Original Message - 
From: Carl Welch [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Monday, October 30, 2006 5:35 AM
Subject: [Flashcoders] FileReference and mac file types


I have an project that needs to allow users to only upload mp3 files.
 It works fine on a PC. But on a mac the mp3 files are greyed out and
 the user is unable to select a file. Here is my code below: What am I
 missing?


 var fileRef:FileReference = new FileReference();
 fileRef.addListener(listener);
 browse.onRelease = function() {
 upload.enabled = true;
 fileRef.browse([{description:Audio files, extension:*.mp3,
 macType:mp3}]);
 };


 Thanks for your help...
 -- 
 Carl Welch


___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference and mac file types

2006-10-29 Thread John VanHorn

the mac file type for an mp3 will be (note the spaces in the strings - mac
file types are 4 characters) MP3  or Mp3 .i think. mac file types
and pc file types are not the same.

check this article: http://www.tink.ws/blog/macintosh-file-types/

i did some stuff with FileReference a while back and concluded that it was
easier, and maybe safer to take the name, or type property of a
FileReference object and do a toLowerCase().indexOf(mp3) on that to ensure
the right file types.

On 10/29/06, Carl Welch [EMAIL PROTECTED] wrote:


I have an project that needs to allow users to only upload mp3 files.
It works fine on a PC. But on a mac the mp3 files are greyed out and
the user is unable to select a file. Here is my code below: What am I
missing?


var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
browse.onRelease = function() {
upload.enabled = true;
fileRef.browse([{description:Audio files, extension:*.mp3,
macType:mp3}]);
};


Thanks for your help...
--
Carl Welch
http://www.carlwelch.com
[EMAIL PROTECTED]
805.403.4819
___
Flashcoders@chattyfig.figleaf.com
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





--
John Van Horn
[EMAIL PROTECTED]
___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference and mac file types

2006-10-29 Thread John VanHorn

heres another good article:
http://www.joshbuhler.com/2006/05/30/mac-file-types-one-more-thing/

On 10/29/06, Carl Welch [EMAIL PROTECTED] wrote:


I have an project that needs to allow users to only upload mp3 files.
It works fine on a PC. But on a mac the mp3 files are greyed out and
the user is unable to select a file. Here is my code below: What am I
missing?


var fileRef:FileReference = new FileReference();
fileRef.addListener(listener);
browse.onRelease = function() {
upload.enabled = true;
fileRef.browse([{description:Audio files, extension:*.mp3,
macType:mp3}]);
};


Thanks for your help...
--
Carl Welch
http://www.carlwelch.com
[EMAIL PROTECTED]
805.403.4819
___
Flashcoders@chattyfig.figleaf.com
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





--
John Van Horn
[EMAIL PROTECTED]
___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference and mac file types

2006-10-29 Thread Carl Welch

Thanks guys. First I tried setting the mac file types to tink's list
(ie: macType:MPG3;MP3_;Mp3_;MPEG). Didn't work. Then I read Josh's
page and he suggested not putting any mactype... It worked. Sweet.

Thanks again.

On 10/29/06, John VanHorn [EMAIL PROTECTED] wrote:

heres another good article:
http://www.joshbuhler.com/2006/05/30/mac-file-types-one-more-thing/

On 10/29/06, Carl Welch [EMAIL PROTECTED] wrote:

 I have an project that needs to allow users to only upload mp3 files.
 It works fine on a PC. But on a mac the mp3 files are greyed out and
 the user is unable to select a file. Here is my code below: What am I
 missing?


 var fileRef:FileReference = new FileReference();
 fileRef.addListener(listener);
 browse.onRelease = function() {
 upload.enabled = true;
 fileRef.browse([{description:Audio files, extension:*.mp3,
 macType:mp3}]);
 };


 Thanks for your help...
 --
 Carl Welch
 http://www.carlwelch.com
 [EMAIL PROTECTED]
 805.403.4819
 ___
 Flashcoders@chattyfig.figleaf.com
 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




--
John Van Horn
[EMAIL PROTECTED]
___
Flashcoders@chattyfig.figleaf.com
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




--
Carl Welch
http://www.carlwelch.com
[EMAIL PROTECTED]
805.403.4819
___
Flashcoders@chattyfig.figleaf.com
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


RE: [Flashcoders] FileReference browse() window

2006-09-22 Thread Merrill, Jason
Thanks Michael, that's too bad.  Not a big deal for this project, just
somewhat annoying.  I guess nothing has changed with AS 3.0 /FP9 either?

Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
 
-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Michael Stuhr
Sent: Thursday, September 21, 2006 6:35 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] FileReference browse() window

Merrill, Jason schrieb:
 I'm using the Filerefence class on a project, and it works great
 uploading a file to our .NET server. (actually let me say, it's
AWESOME
 - Flash should have had this a looong time ago).

 Question:

 Is there a way to control the X and Y position of the Filereference
 browse window that appears when you call browse()?  I couldn't find
 anything in the docs.


that's because there is no such way.

to me it would be *much* more useful if we could use a resizable win.
who ever implemented this stuff: wtf ?

micha


___
Flashcoders@chattyfig.figleaf.com
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
___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] FileReference browse() window

2006-09-21 Thread Merrill, Jason
I'm using the Filerefence class on a project, and it works great
uploading a file to our .NET server. (actually let me say, it's AWESOME
- Flash should have had this a looong time ago).

Question:

Is there a way to control the X and Y position of the Filereference
browse window that appears when you call browse()?  I couldn't find
anything in the docs.

Thanks,

Jason Merrill
Bank of America 
Learning  Organization Effectiveness - Technology Solutions 
 
 
 
 
___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference browse() window

2006-09-21 Thread Michael Stuhr

Merrill, Jason schrieb:

I'm using the Filerefence class on a project, and it works great
uploading a file to our .NET server. (actually let me say, it's AWESOME
- Flash should have had this a looong time ago).

Question:

Is there a way to control the X and Y position of the Filereference
browse window that appears when you call browse()?  I couldn't find
anything in the docs.

  

that's because there is no such way.

to me it would be *much* more useful if we could use a resizable win.
who ever implemented this stuff: wtf ?

micha


___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] FileReference + upload + larger files

2006-09-21 Thread Duncan Reid

Hello all,

I'm running into a peculiar problem with the FileReference class and i've
seen this problem crop up spurratically in my searches but can't find any
definitive information on it.

I'm inconsistently getting a script is causing Flash to run slowly dialog,
if i choose not to cancel the script the upload continues, the dialog will
come back, rinse repeat.  But it's very inconsistent, this happens maybe 8
out of 10, at different points within the upload.  It's not an IO, security
or http error, all server settings are proper, files have rights, php is set
to well over 500MB.  It's just strange as it actually does go through
sometimes.  I've come across the technote on adobe's site which discusses
the reasons why you might get this error and that confuses me even more
since this doesn't happen consistently.

I'm not doing anything fancy, no intervals, enterframes, for or while loops
etc, just using the onProgress event to scale a bar for the users
reference.  These files aren't massive and i'm well below the suggested
100MB limit, files tested range from 30-50MB.  This occurs on mac  pc,
firefox, safari, ie.  Also using the latest Flash player, haven't tried in 8
yet.  Also only uploading 1 file at a time not multiples using the
FileReferenceList.

Small files, 1-5MB go through without a hitch.

Has anyone experienced this?  I'm guessing there is no way around this other
than modifying the timeout time within the swf using Buraks SWF ScriptLimits
Injector but I'm hesitatnt to try that.

Thanks,
Dunc
___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] FileReference, FireFox, SSL

2006-08-31 Thread Chadwick Smith
Has anyone resolved the issue with uploading files with FileReference, 
through FireFox over SSL?


-Wick
___
Flashcoders@chattyfig.figleaf.com
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


RE: [Flashcoders] FileReference and actionscript 2.0

2006-06-26 Thread Mike
Pretty simple:

import flash.net.FileReference;
class package.FileReferenceListener extends Object {
public function FileReferenceListener () {
super();
}
private function onCancel(file:FileReference):Void {
trace(onCancel:  + file.name);
}
private function onOpen(file:FileReference):Void {
trace(onOpen:  + file.name);
}
private function onProgress(file:FileReference,
bytesLoaded:Number, bytesTotal:Number):Void {
trace(onProgess:  + file.name + :  + bytesLoaded + / +
bytesTotal);
}
}

Then, elsewhere, you can do something like this:

import flash.net.FileReference;
import package.FileReferenceListener;
// ...
var file:FileReference = new FileReference();
var listener:FileReferenceListener = new FileReferenceListener();
file.addListener(listener);
// Do stuff with file.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of human
ghaderyan
Sent: Sunday, June 25, 2006 7:34 AM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] FileReference and actionscript 2.0

Hi dear Hank
I think after a successfull upload and inserting in db, I can set the
record ID (or any thing else) in User Session in server and after
successful upload( returning true to flash ) call a simple remoting
method that invoke id from session and return it to flash. 
 
After all I think I don't undrestand some of key features of AS 2.0 ::
 
listener.onCancel = function(file:FileReference):Void {
trace(onCancel);
}
listener.onOpen = function(file:FileReference):Void {
trace(onOpen:  + file.name);
}
listener.onProgress = function(file:FileReference, bytesLoaded:Number,
bytesTotal:Number):Void {
trace(onProgress with bytesLoaded:  + bytesLoaded +  bytesTotal:
 + bytesTotal);
}

I don't know where can I put event methods like this in my AS 2.0 class.
What did I misundrestand??
All the samples are in AS1 and I don't know what to do for my events :(


___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference and actionscript 2.0

2006-06-26 Thread David Rorex

one way of doing it:

class MyClass {

var file:FileReference;

function doit() {
  file = new FileReference();
  file.addListener(this);
  file.browse();
}

function onCancel() {
 trace(user canceled);
}

function onBlah() 

}

hope this helps,
-David R

On 6/25/06, human ghaderyan [EMAIL PROTECTED] wrote:

Hi dear Hank
I think after a successfull upload and inserting in db, I can set the record ID 
(or any thing else) in User Session in server and after successful upload( 
returning true to flash ) call a simple remoting method that invoke id from 
session and return it to flash.

After all I think I don't undrestand some of key features of AS 2.0 ::

listener.onCancel = function(file:FileReference):Void {
trace(onCancel);
}
listener.onOpen = function(file:FileReference):Void {
trace(onOpen:  + file.name);
}
listener.onProgress = function(file:FileReference, bytesLoaded:Number, 
bytesTotal:Number):Void {
trace(onProgress with bytesLoaded:  + bytesLoaded +  bytesTotal:  + 
bytesTotal);
}

I don't know where can I put event methods like this in my AS 2.0 class. What 
did I misundrestand??
All the samples are in AS1 and I don't know what to do for my events :(

- Original Message 
From: hank williams [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, June 25, 2006 5:20:43 PM
Subject: Re: [Flashcoders] FileReference and actionscript 2.0


I am curious what those tricks are.

What I do is to ask the server for an upload code number before I upload
This upload code is associated with the given user and whatever the user is
trying to do. This is application specific. This creates a record in the
database, so that when the file is uploaded the server knows what it is.
Then I send the parameter as part of the upload URL. Additionally, I make
the upload codes time out. So if a code isnt used within a few minutes it is
no longer usable.

Regards
Hank

On 6/25/06, human ghaderyan [EMAIL PROTECTED] wrote:

 Thanx david. I think I can do some tricks to return value after completion
 of download.

 - Original Message 
 From: David Rorex [EMAIL PROTECTED]
 To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Sent: Sunday, June 25, 2006 9:21:58 AM
 Subject: Re: [Flashcoders] FileReference and actionscript 2.0


 On 6/23/06, human ghaderyan [EMAIL PROTECTED] wrote:
 
  Hi list
  I try to use FileReference class in a actionscript 2.0 project. the
  browse and upload methods work fine but it seems that this class
 designed
  for AS 1.0 (???). I can't find any AS 2.0 sample and don't know what to
 do
  for catching events . I think this class has bad architecture. for
 example I
  need to put the uploaded file in database and return its ID to client.

 The class works fine in AS2, you catch the events pretty much the exact
 same
 was as other built in classes (like MovieClip, XML, etc)


 FileReference do the transfer by a POST but it seems that there is no way
 to
  catch a response from server for this POST Action.

 Correct, as far as I know, they did not give a way to recieve any data
 returned from the server. All you can know is that the action completed.



 any body has some experience to do the uplad with flash remoting?
 
 You can't upload files from the user's local drive using flash remoting.

 -David R

___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference and actionscript 2.0

2006-06-25 Thread human ghaderyan
Thanx david. I think I can do some tricks to return value after completion of 
download.  

- Original Message 
From: David Rorex [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, June 25, 2006 9:21:58 AM
Subject: Re: [Flashcoders] FileReference and actionscript 2.0


On 6/23/06, human ghaderyan [EMAIL PROTECTED] wrote:

 Hi list
 I try to use FileReference class in a actionscript 2.0 project. the
 browse and upload methods work fine but it seems that this class designed
 for AS 1.0 (???). I can't find any AS 2.0 sample and don't know what to do
 for catching events . I think this class has bad architecture. for example I
 need to put the uploaded file in database and return its ID to client.

The class works fine in AS2, you catch the events pretty much the exact same
was as other built in classes (like MovieClip, XML, etc)


FileReference do the transfer by a POST but it seems that there is no way to
 catch a response from server for this POST Action.

Correct, as far as I know, they did not give a way to recieve any data
returned from the server. All you can know is that the action completed.



any body has some experience to do the uplad with flash remoting?

You can't upload files from the user's local drive using flash remoting.

-David R
___
Flashcoders@chattyfig.figleaf.com
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
___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference and actionscript 2.0

2006-06-25 Thread hank williams

I am curious what those tricks are.

What I do is to ask the server for an upload code number before I upload
This upload code is associated with the given user and whatever the user is
trying to do. This is application specific. This creates a record in the
database, so that when the file is uploaded the server knows what it is.
Then I send the parameter as part of the upload URL. Additionally, I make
the upload codes time out. So if a code isnt used within a few minutes it is
no longer usable.

Regards
Hank

On 6/25/06, human ghaderyan [EMAIL PROTECTED] wrote:


Thanx david. I think I can do some tricks to return value after completion
of download.

- Original Message 
From: David Rorex [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, June 25, 2006 9:21:58 AM
Subject: Re: [Flashcoders] FileReference and actionscript 2.0


On 6/23/06, human ghaderyan [EMAIL PROTECTED] wrote:

 Hi list
 I try to use FileReference class in a actionscript 2.0 project. the
 browse and upload methods work fine but it seems that this class
designed
 for AS 1.0 (???). I can't find any AS 2.0 sample and don't know what to
do
 for catching events . I think this class has bad architecture. for
example I
 need to put the uploaded file in database and return its ID to client.

The class works fine in AS2, you catch the events pretty much the exact
same
was as other built in classes (like MovieClip, XML, etc)


FileReference do the transfer by a POST but it seems that there is no way
to
 catch a response from server for this POST Action.

Correct, as far as I know, they did not give a way to recieve any data
returned from the server. All you can know is that the action completed.



any body has some experience to do the uplad with flash remoting?

You can't upload files from the user's local drive using flash remoting.

-David R
___
Flashcoders@chattyfig.figleaf.com
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
___
Flashcoders@chattyfig.figleaf.com
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


___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference and actionscript 2.0

2006-06-25 Thread human ghaderyan
Hi dear Hank
I think after a successfull upload and inserting in db, I can set the record ID 
(or any thing else) in User Session in server and after successful upload( 
returning true to flash ) call a simple remoting method that invoke id from 
session and return it to flash. 
 
After all I think I don't undrestand some of key features of AS 2.0 ::
 
listener.onCancel = function(file:FileReference):Void {
trace(onCancel);
}
listener.onOpen = function(file:FileReference):Void {
trace(onOpen:  + file.name);
}
listener.onProgress = function(file:FileReference, bytesLoaded:Number, 
bytesTotal:Number):Void {
trace(onProgress with bytesLoaded:  + bytesLoaded +  bytesTotal:  + 
bytesTotal);
}

I don't know where can I put event methods like this in my AS 2.0 class. What 
did I misundrestand??
All the samples are in AS1 and I don't know what to do for my events :(

- Original Message 
From: hank williams [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Sunday, June 25, 2006 5:20:43 PM
Subject: Re: [Flashcoders] FileReference and actionscript 2.0


I am curious what those tricks are.

What I do is to ask the server for an upload code number before I upload
This upload code is associated with the given user and whatever the user is
trying to do. This is application specific. This creates a record in the
database, so that when the file is uploaded the server knows what it is.
Then I send the parameter as part of the upload URL. Additionally, I make
the upload codes time out. So if a code isnt used within a few minutes it is
no longer usable.

Regards
Hank

On 6/25/06, human ghaderyan [EMAIL PROTECTED] wrote:

 Thanx david. I think I can do some tricks to return value after completion
 of download.

 - Original Message 
 From: David Rorex [EMAIL PROTECTED]
 To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Sent: Sunday, June 25, 2006 9:21:58 AM
 Subject: Re: [Flashcoders] FileReference and actionscript 2.0


 On 6/23/06, human ghaderyan [EMAIL PROTECTED] wrote:
 
  Hi list
  I try to use FileReference class in a actionscript 2.0 project. the
  browse and upload methods work fine but it seems that this class
 designed
  for AS 1.0 (???). I can't find any AS 2.0 sample and don't know what to
 do
  for catching events . I think this class has bad architecture. for
 example I
  need to put the uploaded file in database and return its ID to client.

 The class works fine in AS2, you catch the events pretty much the exact
 same
 was as other built in classes (like MovieClip, XML, etc)


 FileReference do the transfer by a POST but it seems that there is no way
 to
  catch a response from server for this POST Action.

 Correct, as far as I know, they did not give a way to recieve any data
 returned from the server. All you can know is that the action completed.



 any body has some experience to do the uplad with flash remoting?
 
 You can't upload files from the user's local drive using flash remoting.

 -David R
 ___
 Flashcoders@chattyfig.figleaf.com
 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
 ___
 Flashcoders@chattyfig.figleaf.com
 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

___
Flashcoders@chattyfig.figleaf.com
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
___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference and Getting File Path

2006-06-16 Thread David Rorex

You'd get a preview without uploading, by accessing the file directly from
the user's harddrive.
However, this is not supported for security reasons. Basically, the answer
is NO, with standard flash,  you cannot read files from the user's harddrive
without uploading them to the server first and reading them from there.

-David R

On 6/15/06, Mike Boutin [EMAIL PROTECTED] wrote:


Oops :)

Maybe im just dont undestand the problem because how can you show a
preview of the users image without first uploading it to your server?


Boots

Geoffrey Williams wrote:
 That's a Macromedia Central only feature. I doubt they're using Central,
but
 maybe ;)

 If you're working in a web page you can use a hidden file field and
 communicate with it via ExternalInterface / getURL and javascript.

 -Original Message-
 From: [EMAIL PROTECTED]
 [mailto:[EMAIL PROTECTED] On Behalf Of Mike
Boutin
 Sent: Thursday, June 15, 2006 1:56 PM
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] FileReference and Getting File Path

 Not sure if this will help, but maybe you can copy the image to the
 users cache to display it.

 // make a working copy of a file on the user's disk
 var fileRef = new FileReference();
 if (fileRef.browse([Text Files, *.txt]) {
 fileRef.copyIntoCache(backup-data.txt);
 var newFile = new FileReference();
 newFile.open(backup-data.txt);

 // operate on new file
 // ...

 }

 [EMAIL PROTECTED] wrote:
 Thanks for the reply.

 I can get the name, however it doesn't provide the path (i.e.
 c:\images\image001.jpg)
 Mike Boutin  mikeb at juicystudios.com
  Thu Jun 15 13:03:32 EDT 2006   Is it possible for you
to
 just grab the name after it is selected from
 the FileReference object?


 var listener:Object = new Object();
 listener.onSelect = function(file:FileReference):Void  {
  trace(file.name);
  };


 Boots




 ___
 Flashcoders@chattyfig.figleaf.com
 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




___
Flashcoders@chattyfig.figleaf.com
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


___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] FileReference and Getting File Path

2006-06-15 Thread azsl1326-email
I am using the FileReference Class to upload images. Is there a way to get the 
path to the selected file? Ideally, I would like to preview the image before 
being uploaded and need the path.
 
 Thanks for any and all replies.
___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference and Getting File Path

2006-06-15 Thread Mike Boutin
Is it possible for you to just grab the name after it is selected from 
the FileReference object?



var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void  {
trace(file.name);
};


Boots

[EMAIL PROTECTED] wrote:

I am using the FileReference Class to upload images. Is there a way to get the 
path to the selected file? Ideally, I would like to preview the image before 
being uploaded and need the path.
 
 Thanks for any and all replies.

___
Flashcoders@chattyfig.figleaf.com
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


.



___
Flashcoders@chattyfig.figleaf.com
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


RE: [Flashcoders] FileReference and Getting File Path

2006-06-15 Thread azsl1326-email
Thanks for the reply.

I can get the name, however it doesn't provide the path (i.e. 
c:\images\image001.jpg)

Mike Boutin  mikeb at juicystudios.com
 Thu Jun 15 13:03:32 EDT 2006   Is it possible for you to just 
grab the name after it is selected from 
the FileReference object?


var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void  {
trace(file.name);
};


Boots
___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference and Getting File Path

2006-06-15 Thread Mike Boutin
Not sure if this will help, but maybe you can copy the image to the 
users cache to display it.


// make a working copy of a file on the user's disk
var fileRef = new FileReference();
if (fileRef.browse([Text Files, *.txt]) {
   fileRef.copyIntoCache(backup-data.txt);
   var newFile = new FileReference();
   newFile.open(backup-data.txt);

   // operate on new file
   // ...

}

[EMAIL PROTECTED] wrote:

Thanks for the reply.

I can get the name, however it doesn't provide the path (i.e. 
c:\images\image001.jpg)

Mike Boutin  mikeb at juicystudios.com
 Thu Jun 15 13:03:32 EDT 2006   Is it possible for you to just grab the name after it is selected from 
the FileReference object?



var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void  {
trace(file.name);
};


Boots
___
Flashcoders@chattyfig.figleaf.com
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





___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference and Getting File Path

2006-06-15 Thread Mike Boutin

Oops :)

Maybe im just dont undestand the problem because how can you show a 
preview of the users image without first uploading it to your server?



Boots

Geoffrey Williams wrote:

That's a Macromedia Central only feature. I doubt they're using Central, but
maybe ;)

If you're working in a web page you can use a hidden file field and
communicate with it via ExternalInterface / getURL and javascript.

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Mike Boutin
Sent: Thursday, June 15, 2006 1:56 PM
To: Flashcoders mailing list
Subject: Re: [Flashcoders] FileReference and Getting File Path

Not sure if this will help, but maybe you can copy the image to the 
users cache to display it.


// make a working copy of a file on the user's disk
var fileRef = new FileReference();
if (fileRef.browse([Text Files, *.txt]) {
fileRef.copyIntoCache(backup-data.txt);
var newFile = new FileReference();
newFile.open(backup-data.txt);

// operate on new file
// ...

}

[EMAIL PROTECTED] wrote:

Thanks for the reply.

I can get the name, however it doesn't provide the path (i.e.

c:\images\image001.jpg)
Mike Boutin  mikeb at juicystudios.com
 Thu Jun 15 13:03:32 EDT 2006   Is it possible for you to
just grab the name after it is selected from 

the FileReference object?


var listener:Object = new Object();
listener.onSelect = function(file:FileReference):Void  {
trace(file.name);
};


Boots





___
Flashcoders@chattyfig.figleaf.com
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





___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] FileReference and ASP

2006-05-31 Thread azsl1326-email
I am looking for an ASP script to work in tandem with the FileReference class. 
I have searched the web but can only find mostly 
PHP scripts. My server has ASPUpload and SA FileUp available but am not having 
much luck getting the file to upload to the 
server. Can anyone assist in getting me on the right path?
 
 Thanks.
___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] FileReference: get current path of file

2006-05-02 Thread Wade Arnold
When a user has selected a file for upload is it possible to get the entire
path to the file from the FileReference class? I need to be able to send
this onto the server. I am using PHP on the server for this application and
it does not have a method that has the entire path only the name of the
file. 

This is how I do this in javascript. 

 

 

form name=imgform method=post action=upload.php
enctype=multipart/form-data

input type=hidden name=userfilename id=userfilename

input type=file name=userfile id=userfile size=64 maxlength=256

 
onChange=document.imgform.userfilename.value =
document.imgform.userfile.value

input type=submit value=Send File /

 

 

 


 

___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] FileReference JSP

2006-04-19 Thread Bjorn Schultheiss
Around the web there are many examples of using Flash 8 fileReference with a
php or coldfusion page.

Does anyone have an example of its use with a jsp page?

 

Bjorn Schultheiss 
Senior Flash Developer 
QDC
Personalised Communication Power
W:  http://www.qdc.net.au/qdc

 

((This transmission is confidential and intended solely for the
person or organization to whom it is addressed. It may contain privileged
and confidential information. If you are not the intended recipient, you
should not copy, distribute or take any action in reliance on it. If you
believe you received this transmission in error, please notify the
sender.---))
___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] fileReference download

2006-04-14 Thread David Cohn

Hey all,

I'm having real problems with FileReference download.
I'm doing the following... the class is created with a verified URL  
and legit filename.

The .download() call returns success
I get the OS dialog box (Mac OSX 10.4.5 - also tried online on Win XP)
I select a folder, and hit Save

Then, Flash Authoring crashes!
I get no trace output (that I can see before the crash)

Tried online, it just hangs.

In neither case does the server show any record of an attempt to  
access the chosen file.


I realize there could be sandbox issues, but I doubt this is the problem
(the url online is from the same domain, and this shouldn't cause a  
crash in Authoring anyway)


Anyone have experience with download()?
Any gotchas I may have overlooked here?

Should onOpen at least be called when the dialog box is opened?
Or is this called when the socket is opened?

Thanks in advance for any help...
--Dave




import flash.net.FileReference;
class as.aDownloader {
private var oListener:Object;
public function aDownloader( sUrl:String, sFN:String ) {
this.oListener = new Object();
trace(downloading, url=+sUrl);
		oListener.onCancel = function(file:FileReference):Void { trace 
(onCancel:  + file.name); };
		oListener.onComplete = function(file:FileReference):Void { trace 
(onComplete:  + file.name); };
		oListener.onIOError = function(file:FileReference):Void { trace 
(onIOError:  + file.name); };
		oListener.onSecurityError = function(file:FileReference,  
errorString:String):Void { trace(onSecurityError:  + file.name); };
		oListener.onOpen = function(file:FileReference):Void { trace 
(onOpen:  + file.name); };
		oListener.onSelect = function(file:FileReference):Void { trace 
(onSelect:  + file.name); };
		oListener.onProgress = function(file:FileReference,  
bytesLoaded:Number, bytesTotal:Number):Void {

trace(onProgress: bytes= + bytesLoaded + / + 
bytesTotal );
};  
var fileRef:FileReference = new FileReference();
fileRef.addListener(oListener);
if ( !fileRef.download(sUrl,sFN) ) { trace(dialog box 
failed!); };
}
}
___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] FileReference upload, change file name

2006-03-05 Thread jim
Hello guys,

Just started playing with the FileReference upload in flash and am pretty
happy. I have the flash selecting the file  I am using a simple php page as
the upload receiver. This is all working.

I only need the ability to change the name of the file that is being
uploaded. How would I go about this? I tried changing the [FileReference
instance].name field but this is read only. On the php side I am not sure if
I can pass through other data with the file data.

Any help would be great.
Jim

___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference upload, change file name

2006-03-05 Thread Yotam Laufer
You can pass a parameter to the upload url:

file.upload (uploadscript.php?newname=newfilename);

and then take care of it on the php side.

Good luck, Yotam
___
Flashcoders@chattyfig.figleaf.com
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

Re: [Flashcoders] FileReference upload, change file name

2006-03-05 Thread Tom Rhodes

jim wrote:

I only need the ability to change the name of the file that is being
uploaded. How would I go about this? I tried changing the [FileReference
instance].name field but this is read only. On the php side I am not sure if
I can pass through other data with the file data.

I did this with the php file...

?php
if ($_FILES['Filedata']['name']) {
  $uploadDir = $_REQUEST['dir']./;
  $uploadFile = $uploadDir . basename($_REQUEST['fileName']);
  $uploaded = move_uploaded_file($_FILES['Filedata']['tmp_name'], 
$uploadFile);

  echo $uploaded;
}
?

and the line in the flash like so...

file.upload(../../assets/php/uploadFile.php?fileName= + theFileName + 
dir= + theDir


this way i was controlling the directory the files went into and the 
filenames of the uploaded files from the flash rather than the php.


hth,

tom.
___
Flashcoders@chattyfig.figleaf.com
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


RE: [Flashcoders] FileReference upload, change file name

2006-03-05 Thread jim
Man I didn't even think of that, thanks guys, very helpful.

Jim

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of Tom Rhodes
Sent: 05 March 2006 20:04
To: Flashcoders mailing list
Subject: Re: [Flashcoders] FileReference upload, change file name

jim wrote:
 I only need the ability to change the name of the file that is being
 uploaded. How would I go about this? I tried changing the [FileReference
 instance].name field but this is read only. On the php side I am not sure
if
 I can pass through other data with the file data.
I did this with the php file...

?php
if ($_FILES['Filedata']['name']) {
   $uploadDir = $_REQUEST['dir']./;
   $uploadFile = $uploadDir . basename($_REQUEST['fileName']);
   $uploaded = move_uploaded_file($_FILES['Filedata']['tmp_name'], 
$uploadFile);
   echo $uploaded;
}
?

and the line in the flash like so...

file.upload(../../assets/php/uploadFile.php?fileName= + theFileName + 
dir= + theDir

this way i was controlling the directory the files went into and the 
filenames of the uploaded files from the flash rather than the php.

hth,

tom.
___
Flashcoders@chattyfig.figleaf.com
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

___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference upload, change file name

2006-03-05 Thread David Rorex
On 3/5/06, Tom Rhodes [EMAIL PROTECTED] wrote:

 jim wrote:
  I only need the ability to change the name of the file that is being
  uploaded. How would I go about this? I tried changing the [FileReference
  instance].name field but this is read only. On the php side I am not
 sure if
  I can pass through other data with the file data.
 I did this with the php file...

 ?php
 if ($_FILES['Filedata']['name']) {
$uploadDir = $_REQUEST['dir']./;
$uploadFile = $uploadDir . basename($_REQUEST['fileName']);
$uploaded = move_uploaded_file($_FILES['Filedata']['tmp_name'],
 $uploadFile);
echo $uploaded;
 }
 ?

 and the line in the flash like so...

 file.upload(../../assets/php/uploadFile.php?fileName= + theFileName +
 dir= + theDir

 this way i was controlling the directory the files went into and the
 filenames of the uploaded files from the flash rather than the php.


I hope this was just a simple example, and on your real server, you have
some checks in the php code, so people can't just upload files and overwrite
whatever they want... (imagine a hacker overwriting index.html with one that
downloads some spyware into visitors computers, or steals peoples passwords,
or overwrites every single file on your server, etc)

-David R
___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] FileReference upload, change file name

2006-03-05 Thread Tom Rhodes

David Rorex wrote:

On 3/5/06, Tom Rhodes [EMAIL PROTECTED] wrote:
  

jim wrote:


I only need the ability to change the name of the file that is being
uploaded. How would I go about this? I tried changing the [FileReference
instance].name field but this is read only. On the php side I am not
  

sure if


I can pass through other data with the file data.
  

I did this with the php file...

?php
if ($_FILES['Filedata']['name']) {
   $uploadDir = $_REQUEST['dir']./;
   $uploadFile = $uploadDir . basename($_REQUEST['fileName']);
   $uploaded = move_uploaded_file($_FILES['Filedata']['tmp_name'],
$uploadFile);
   echo $uploaded;
}
?

and the line in the flash like so...

file.upload(../../assets/php/uploadFile.php?fileName= + theFileName +
dir= + theDir

this way i was controlling the directory the files went into and the
filenames of the uploaded files from the flash rather than the php.




I hope this was just a simple example, and on your real server, you have
some checks in the php code, so people can't just upload files and overwrite
whatever they want... (imagine a hacker overwriting index.html with one that
downloads some spyware into visitors computers, or steals peoples passwords,
or overwrites every single file on your server, etc)

-David R
___
Flashcoders@chattyfig.figleaf.com
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

  
well, it's part of a password protected admin system that isn't public, 
so i imagine it would be hard for someone to get at that file to do 
anything with it

___
Flashcoders@chattyfig.figleaf.com
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


RE: [Flashcoders] FileReference upload, change file name

2006-03-05 Thread jim
Do you have an example of some security procedures that you would/have used?
I'm not really a php guy.

Jim

-Original Message-
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of David Rorex
Sent: 05 March 2006 21:38
To: Flashcoders mailing list
Subject: Re: [Flashcoders] FileReference upload, change file name

On 3/5/06, Tom Rhodes [EMAIL PROTECTED] wrote:

 jim wrote:
  I only need the ability to change the name of the file that is being
  uploaded. How would I go about this? I tried changing the [FileReference
  instance].name field but this is read only. On the php side I am not
 sure if
  I can pass through other data with the file data.
 I did this with the php file...

 ?php
 if ($_FILES['Filedata']['name']) {
$uploadDir = $_REQUEST['dir']./;
$uploadFile = $uploadDir . basename($_REQUEST['fileName']);
$uploaded = move_uploaded_file($_FILES['Filedata']['tmp_name'],
 $uploadFile);
echo $uploaded;
 }
 ?

 and the line in the flash like so...

 file.upload(../../assets/php/uploadFile.php?fileName= + theFileName +
 dir= + theDir

 this way i was controlling the directory the files went into and the
 filenames of the uploaded files from the flash rather than the php.


I hope this was just a simple example, and on your real server, you have
some checks in the php code, so people can't just upload files and overwrite
whatever they want... (imagine a hacker overwriting index.html with one that
downloads some spyware into visitors computers, or steals peoples passwords,
or overwrites every single file on your server, etc)

-David R
___
Flashcoders@chattyfig.figleaf.com
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

___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] Filereference upload on macintosh

2006-03-01 Thread Yves Peckstadt
Hi,

I've been working on an extensive upload component  making use of the flash
8 filereference classes. Everything works great on windows ,no problems
there but on macintosh I'm experiencing lots of problems.

I've tested it for a while and noticed that neither the onProgress or
onComplete events are triggered while uploading on a mac. I've read in other
threads here on flashcoders that sometimes indeed one of the events doesn't
trigger. But in all problem situations I've read about ,there only seems to
be 1 broken event not 2. I could easily make a quick fix if either the
onComplete or onProgress event work but with only the onOpen event
triggering there's not much I can do.

Things i've tried:

- simplifying my code to a very basic version : make an listenerObject,
define the events , assign the listenerObject to the filereference object,
browse, upload (basicly textbook version)
- server side uploading with a coldfusion cfm page containing only this. The
normal method I am using that works like a charm on windows.

 cffile action=upload filefield=Filedata destination=#dir#
nameconflict=makeunique
connectionstring being =  http://.../upload.cfm?dir=

- server side uploading with a coldfusion service file, cfc. Tried this
because somebody fixed the onComplete event by making sure the uploadscript
returned something.

cfcomponent
cffunction name=doUpload access=remote
cfargument name=dir type=string required=yes
cffile action=upload filefield=Filedata destination=#dir#
nameconflict=makeunique
cfreturn 1
/cffunction
/cfcomponent

connectionstring being = http://../upload.cfc?method=doUploaddir =...


I am testing everything on mac os X version 10.4.5 , Safari and internet
explorer mac edition browser.

Anyone who encountered these problems before ,and perhaps found a fix ,that
can help me? I'd greatly appriciate it.

Thanks.

Yves
___
Flashcoders@chattyfig.figleaf.com
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


Re: [Flashcoders] Filereference upload on macintosh

2006-03-01 Thread Andreas Rønning
A little OT, but i always thought coldfusion was a bit narcissistic with 
all its cf* tags. Everything coldfusion SCREAMS coldfusion. Wonky.


Yves Peckstadt wrote:

Hi,

I've been working on an extensive upload component  making use of the flash
8 filereference classes. Everything works great on windows ,no problems
there but on macintosh I'm experiencing lots of problems.

I've tested it for a while and noticed that neither the onProgress or
onComplete events are triggered while uploading on a mac. I've read in other
threads here on flashcoders that sometimes indeed one of the events doesn't
trigger. But in all problem situations I've read about ,there only seems to
be 1 broken event not 2. I could easily make a quick fix if either the
onComplete or onProgress event work but with only the onOpen event
triggering there's not much I can do.

Things i've tried:

- simplifying my code to a very basic version : make an listenerObject,
define the events , assign the listenerObject to the filereference object,
browse, upload (basicly textbook version)
- server side uploading with a coldfusion cfm page containing only this. The
normal method I am using that works like a charm on windows.

 cffile action=upload filefield=Filedata destination=#dir#
nameconflict=makeunique
connectionstring being =  http://.../upload.cfm?dir=

- server side uploading with a coldfusion service file, cfc. Tried this
because somebody fixed the onComplete event by making sure the uploadscript
returned something.

cfcomponent
cffunction name=doUpload access=remote
cfargument name=dir type=string required=yes
cffile action=upload filefield=Filedata destination=#dir#
nameconflict=makeunique
cfreturn 1
/cffunction
/cfcomponent

connectionstring being = http://../upload.cfc?method=doUploaddir =...


I am testing everything on mac os X version 10.4.5 , Safari and internet
explorer mac edition browser.

Anyone who encountered these problems before ,and perhaps found a fix ,that
can help me? I'd greatly appriciate it.

Thanks.

Yves
___
Flashcoders@chattyfig.figleaf.com
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
  


___
Flashcoders@chattyfig.figleaf.com
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


[Flashcoders] FileReference

2006-01-30 Thread Jason Ross
Hi,

Is there a way to get the FileReference to open different browse window
styles - or are we stuck with the one it gives!? The Windows / IE browse
window I am after is basically a resizable window.

Note, to see the default window which Flash triggers, paste this code
onto the first frame of a blank movie:

import flash.net.FileReference;
var imageFile:FileReference = new FileReference();
imageFile.browse([{description: Image Files, extension:
*.jpg;*.gif;*.png}]);

Cheers,

Jason.
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] FileReference: verify file and return status

2006-01-20 Thread clark slater
Hey Folks,

I'm uploading files from my SWF with FileReference and I need to verify the
file is acceptable on the server (make sure it is a non progressive JPG) and
let the SWF client know if the file was accepted by the server or rejected.

I've been using ColdFusion for this and it has a handy 'accept' attribute
for the cffile tag where you can specify the mime type to allow.
Unfortunately using this attribute breaks the upload (even if the mime type
is correct) thanks to a bug in the F8 player.

So right now I've been forced to make it a 2 step operation, first upload
the file, then on completion the SWF client makes a Flash Remoting call to a
service that verifys the file and returns a result depending if the file is
acceptable or not.

I think it would be excellent if FileReference could accept a response from
the server alongside the file upload complete so this could be reduced to a
1 step operation. Can't see how that could be done at the moment though.

Anyone out there come up with any elegant solutions for uplaoding and
verifying in one?


** WISHLIST It would be cool if the FileReference class could access the
file mime type in the SWF.

Clark
www.bayinteractive.com
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] FileReference, file location

2006-01-17 Thread bryan.rice


On Jan 17, 2006, at 9:50 AM, Kamyar Nazeri wrote:

Ain't it possible to get location of the browsed file using browse  
method of FileReference class?



Nope.  That would violate the security sandbox.  You are going to  
have to upload first and then display it.


blue skies,
bryan
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] FileReference onIOError

2005-11-11 Thread Sullivan, Sean C - MWT

Macromedia Support confirmed that there is a bug in Flash Player 8.

They posted a message in the Macromedia web forum:

http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=
288threadid=1059687


-Original Message-
From: Sullivan, Sean C - MWT 
Sent: Thursday, November 03, 2005 3:56 PM
To: 'Flashcoders mailing list'
Subject: RE: [Flashcoders] FileReference onIOError


It appears that FileReference.upload does not work with HTTPS URL's

http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=
288threadid=1059687



-Original Message-


I am using the FileReference class in Flash Player 8

My listener is receiving the onIOError callback.

Unfortunately, the callback does not provide any specific details about
the error.

How can I get error details for the onIOError callback?

Sean


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] FileReference onIOError

2005-11-03 Thread Sullivan, Sean C - MWT

I am using the FileReference class in Flash Player 8

My listener is receiving the onIOError callback.

Unfortunately, the callback does not provide any specific details about
the error.

How can I get error details for the onIOError callback?

Sean



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


RE: [Flashcoders] FileReference onIOError

2005-11-03 Thread Sullivan, Sean C - MWT

It appears that FileReference.upload does not work with HTTPS URL's

http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=
288threadid=1059687



-Original Message-


I am using the FileReference class in Flash Player 8

My listener is receiving the onIOError callback.

Unfortunately, the callback does not provide any specific details about
the error.

How can I get error details for the onIOError callback?

Sean


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] FileReference onIOError

2005-11-03 Thread David Rorex
 -Original Message-

 I am using the FileReference class in Flash Player 8

 My listener is receiving the onIOError callback.

 Unfortunately, the callback does not provide any specific details about
 the error.

 How can I get error details for the onIOError callback?

On 11/3/05, Sullivan, Sean C - MWT [EMAIL PROTECTED] wrote:

 It appears that FileReference.upload does not work with HTTPS URL's

 http://www.macromedia.com/cfusion/webforums/forum/messageview.cfm?catid=
 288threadid=1059687

From the flash documentation for FileReference.onIOError:

Invoked when an input/output error occurs.
This listener is invoked when the upload or download fails for any of
the following reasons:
...
 - The value passed to the url parameter in upload() contains an
invalid protocol. Valid protocols are HTTP and HTTPS. 

-David R
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] FileReference class [Get path of a selected file]

2005-10-25 Thread Michael Bedar
The file browser window?  On OSX i get a normal mac FB - resize and  
all...



On Oct 25, 2005, at 1:52 AM, Michael Stuhr wrote:


Muzak schrieb:


Which makes it completly useless running from the local file  
system :/

(which was probably their intention)



But why on earth does this have to be a non resizable Window ? do  
you have any reasons for that ?

pretty annoying!

micha
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] FileReference class [Get path of a selected file]

2005-10-25 Thread Muzak
Can you elaborate on that: normal mac FB - resize and all (???)

When using the following:

import flash.net.FileReference;
var listener:Object = new Object();
function onSelect (file:FileReference):Void  {
 trace(file.name);
};
var fileRef:FileReference = new FileReference();
fileRef.addListener(this);
fileRef.browse();

in the event object (file) all you get is the file name, which isn't of any use 
if you selected a file outside the directory of 
which the swf is run.

regards,
Muzak

- Original Message - 
From: Michael Bedar [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Tuesday, October 25, 2005 9:36 AM
Subject: Re: [Flashcoders] FileReference class [Get path of a selected file]


 The file browser window?  On OSX i get a normal mac FB - resize and  all...


 On Oct 25, 2005, at 1:52 AM, Michael Stuhr wrote:



___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


[Flashcoders] FileReference class [Get path of a selected file]

2005-10-24 Thread khair
Is there a way to get the actual path of a file you selected after
useing browse method?

-- Keith H --
___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders


Re: [Flashcoders] FileReference class [Get path of a selected file]

2005-10-24 Thread Muzak
Which makes it completly useless running from the local file system :/
(which was probably their intention)

Muzak

- Original Message - 
From: Ryan Matsikas [EMAIL PROTECTED]
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Sent: Monday, October 24, 2005 11:22 PM
Subject: Re: [Flashcoders] FileReference class [Get path of a selected file]


nope..

On 10/24/05, [EMAIL PROTECTED] [EMAIL PROTECTED] wrote:

 Is there a way to get the actual path of a file you selected after
 useing browse method?

 -- Keith H --


___
Flashcoders mailing list
Flashcoders@chattyfig.figleaf.com
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders