Flash - Set Wav File To Filereference?
Feb 8, 2011
I'm building a little recorder in flash and I have a little problem with sending the file that is recorded to php. Is there a way to simply send it with a var of do I need to set it to a file reference, but how can I do that because the only way I see that is that you need to browse or load is from somewhere.
View 1 Replies
Similar Posts:
Jan 22, 2010
I need to make a flash applet that automatically grabs a specific file on a user's system (iTunes XML file) and auto uploads it to my server. So far I have only been able to accomplish this with a user selecting the file, how to upload a specific file without the user having to go and find it.
View 1 Replies
Jun 11, 2011
I am using the FileReference object. I want to be able to save the local file data into a ByteArray. I know that I can use the data property in Flash 10, but I would like a solution that works for earlier versions of Flash.
View 1 Replies
Feb 12, 2012
It would appear that FileReference.upload() is the only way in which you can upload a file to the server in Flash and get feedback about its upload state via a PROGRESS callback. All other methods just go off into the ether and come back when the file upload is completed.
Unfortunately, FileReference appears to insist that a user select the file to be uploaded. There doesn't appear to be a mechanism by which to set the file through code. The reason I need this is that I'm allowing the user to upload massive files and am uploading them in chunks, so, I want to just pack a chunk of data into a FileReference (maybe 5 or 10 megs) and send that off and watch it go. Does anyone have any thoughts on whether it's possible to manually load data into a FileReference object? The data property is read-only, sadly.
View 2 Replies
Sep 14, 2010
I've been trying to build a simple flash uploader to upload files onto a server using the FileReference-class and simple PHP. Trying this on a localhost-server succeeded within two minutes, great!
However, now I am trying to do the same thing on the remote-server, but it keeps giving IO-errors. I have done the following: Put all permissions to 777, in the main folder and also the folder where the pictures are uploaded to Tried different remote servers
View 7 Replies
Jun 18, 2010
I'm using FileReference.save() method for Flash10 to save a file. It looks like this:
Code:
fr.save(BytesArray, "default.xml");
When I use default name - everything is ok. But when I change file's name in "Save Dialog
[code].....
View 2 Replies
Aug 13, 2011
The code below compiles fine on the Flex 4 SDK on Fedora 15. Mouse-click opens the dialog box, I click okay, and a file is saved, but the file is empty. I run the same SWF file (that was compiled on the Linux machine) on a Windows machine, and the created file contains the expected data. I was thinking there was a permissions problem, but if that were so, why should Linux even let me save the file? It is going to slow things down immensely if I cannot code something and test it on the same machine...
[Code]....
View 3 Replies
Jun 8, 2010
I'm using Filereference.save() to save a XML file. It's working fine with default filename.But is there a way to force a file extension on the saved file? I'm using "untitled.xml" as the default filename, but if the user changes it to say "myfile", it gets saved as "myfile", rather than "myfile.xml".
View 1 Replies
Nov 18, 2010
I'm making a Flash projector which will be distributed on CD. I want to allow people to copy files off of the CD. Is this possible? Should I be using FileReference?
View 1 Replies
Jun 30, 2011
limiting or correcting the behaviour of FileReference.save isn't possible.Can anyone suggest an alternative (server is Apache/PHP) that matches all of my criteria from this post and avoids the pitfalls I discussed with Jacob?I'm saving an image from my AS3 app using FileReference.save(). This is the code, which works fine:[code]This opens up the save file dialog as expected. I'm using this rather than sending the byteData to PHP because I want the user to have a familiar dialog box that lets them set their own file name.
The problem comes when users have their operating system configured to display file extensions, like I do. This means that in the save dialog the file name contains the extension as seen in the image below, and so it is very easy for the user to delete that extension when they rename the file. Because the default file type for this box is 'All files', if the extension is deleted the file is saved with no type.I don't know of any way to force a file type on the save dialog (if there is one that would be my preferred route) so failing that can anyone suggest a safe way for me to do this that still allows the user to set the file name themselves using a standard dialog for their OS?I did try putting in a call to FileReference.browse() before the save() as shown in this tutorial, but that throws an error because you can only perform one FileReference call at a time.
View 5 Replies
Aug 11, 2011
This is the first time i am working in action script. I have seen a flash programmer working with it. since i know javascript i was able to work in action script. I am creating a file upload component for my php projects. Until now i have advanced to show the file dialog box using the FileReference api. The select event is not firing for me. and i did not get any error.
[Code]...
View 2 Replies
Mar 7, 2009
I want to know the 'file path' when an user selects a file from 'any location' on his hard disk. I like to know is it possible to fetch the entire file URL instead of the file name alone?
Code:
var fileRef= new FileReference();
fileRef.addListener(mylistener);
mylistener.onOpen = function(file){
[Code]....
View 7 Replies
Nov 11, 2009
I am trying to use the load method of FileReference object to load the data and use it to display a thumbnail of the selected image.However, after calling fr.load(), fr.data remains null.I'm using Flex Builder 3.0.2 on Windows 7 with Flex SDK 3.4 and Flash Player 10 Debug. If I evaluate fr.load() in Eclipse's watch variables list, I get an error reading "No such variable: load."
View 4 Replies
Apr 26, 2011
I am developing an application using Adobe AIR.How can we get absolute path of file or "nativePath" of file (as we call it in Flex/AIR) when we use FileReference to browse a file ? I know there are security concerns related to this but is there any hack or is there a direct solution that I am unaware of?
View 1 Replies
Aug 12, 2011
I'm having trouble working on FileReference download(URL) function.I needed to automatically download the files in a particular space on my harddisk but the SAVE AS dialog always displays. can I make it automatically download in a certain place on my disk?
View 1 Replies
Jan 16, 2012
I have a game in actionscript 3.0 i have been browsing the internet, I have found something like this
var file:FileReference = new FileReference();
file.addEventListener(Event.SELECT, _onRefSelect);
file.addEventListener(Event.CANCEL, _onRefCancel);
[Code]...
Call to a possibly undefined method save through a reference with static type flash.net:FileReference.
View 1 Replies
Oct 28, 2009
im trying to load an xml file into my AS3 and CS4 swf. I can successfully save an xml file, but loading one is causing me some difficulty. I can get the following code to load images, but not xml.
Code:
private function loadLevel():void
{
[code]....
View 2 Replies
Dec 4, 2007
Is there any way to get the file path of an object that is selected through the browse() method in the FileReference class. I don't think it can be done with a FileReference object, but is there another class that allows this, or any possible way to do this using XML?
View 4 Replies
Feb 13, 2009
I'm using Filereference.save() to save a jpg file. It'sbasically working fine, but is there anyway to force a fileextension on the saved file? I'm using "untitled.jpg" as thedefault filename, but if the user changes it to say "myfile", itgets saved as "myfile", rather than "myfile.jpg".
View 11 Replies
Mar 2, 2011
I'm using the FileReference to download a file (using a relative path). If I test it on the .swf on the browser it works. If I compile a .exe projector the download doesn't works.
View 1 Replies
Sep 8, 2011
I am wanting to allow a user to select an image from their computer to use as a BG. FileReference does this job well, however it does not provide the absolute path to the selected file.
I want the selected BG to stay in their "save" (local SharedObject cookie) so that it can be loaded the next time they come back. But since FileReference only provides me with the filename, I'm not sure how to go about storing this information for later. I could, I suppose, store the image data into the cookie directly, but that would be terribly inefficient since many BG images are rather large for a cookie.
how I can go about finding the image file path that the user selected, or efficiently saving the image they chose?
View 1 Replies
Nov 10, 2009
To load 3 files locally into the Flash Player, one might using something like this manage the sequence after the user has chosen the files...
private function uploadList(evt:Event):void{
var arr:Array = fileReferenceList.fileList;
for each(var item:FileReference in arr){
item.addEventListener(Event.COMPLETE, onFileLoadComplete);
item.load();
[Code]...
View 1 Replies
May 11, 2011
I'm trying to perform a file upload using a FileReference from a Flex app running in Firefox 4. However when I attempt to call the upload() method, the Filereference throws an IOError with the following Error #2038: File I/O Error. URL: [URL] If I don't explicitly add a listener for the IOErrorEvent, then I get a Flash player popup stating SecurityError: Error #2000: No active security context.
The request doens't even hit my server (I can verify by placing breakpoints in the Java code and watching the HTTP Requests that go out using HTTPFox), so it seems to me that this is a client side issue (right?). I've done some searching for the problem on google and the suggestions included wrapping the upload() call in a timeout/callLater, and attempting to attach the sessionId to the request (since Firefox creates a new thread for the upload and doesn't attach the proper cookies). Neither of these approaches has worked for me. I don't experience this problem with Internet Explorer, only Firefox.
[Code]...
View 1 Replies
Jan 29, 2009
first I need to know if I can get the full path of a file from fileReference or by other way by without using xml file.Second, I have a movie clip and I want to apply two event Listeners to it (mouseEvent.CLICK, mouseEvent.DOUBLE.CLICK) together but only .CLICK one is executed twice when I Double click the movie clip.
View 2 Replies
Oct 25, 2009
I am using this code to download a file from a server (podcast episode mp3) but I click the submit button and nothing happens. The text field shows "Downloading episode X" but nothing happens, no browse-to-save window pops up or anything. Here is my entire code, no external.It simply uses AMFPHP to drawback results to see if the podcast episode exists. If it returns a 1, the fileReference download is triggered. I'm pretty sure the rest of the code is fine, its just the "localRef.download(requestF);" bit that seems to be doing nothing.[Code].....
View 0 Replies
Jun 30, 2011
This code:
ActionScript Code:
import flash.events.Event;
var file:FileReference = new FileReference();
saveBtn.addEventListener(MouseEvent.CLICK, onClick);[code]....
will save a text file to a location I choose, containing the text I wrote in the text field. But it prompts me for the location. Is there a way to save the text just locally next to the swf without the prompt?
View 3 Replies
Feb 23, 2012
I'm trying to create a XML file in actionscript which will be saved out using FileReference and will then be loaded in later by another SWF.The problem I have is that I can't figure out how to have the actual CDATA tag in the saved XML file so that I can output html tags in the text.e.g.
var xml:XML = <data>
<text> <![CDATA[ This is some <b>bold</b> text ]]> </text>
</data>
View 2 Replies
Jul 25, 2008
I'm trying to get my flash movie to allow the user to download a file of a specific extension, at the moment i use:
[Code]....
Two problems:
a) If the user changes the file name in the browser before clicking save (and doesn't re-add the .xml extension) then the file is saved without an extension
b) Randomly, tested on two windows xp systems both in IE one included the extension in the filename on the browser download window and one didn't (which doesn't make it clear to the user they have to include the extension as part of the name) but both saved to the correct xml extension file
a) If there is a work around so I can specify the exact file type, in the adobe reference manual it states you can parse in extra parameters to server with the file location to download. How would i do this?
b) If can't do a, how can I get it to always display the extension in the browser download window (unlike in problem b )
View 7 Replies
Mar 21, 2007
server, the swf is in the same domain as the images directory andthe PHP file. It's exactly as laid out in the Unleashed book: (see ). However, I get an HTTP 406 error whatever I do. I've checkedfile permissions. I suppose it is some sort of security problem butI can't see what. I tried the same thing on my local PC apacheserver and there I got an IO error can point me to more details onthe FileReference error handling
View 2 Replies
Apr 11, 2012
I have to browse for and open a file in AIR. I can access the file via the File class:
var file:File = File.applicationStorageDirectory.resolvePath("somefile.txt");
var stream:FileStream = new FileStream();
stream.open(file, FileMode.READ);
And I can browse for a file via the FileReference class:
var fileRef:FileReference = new FileReference();
fileRef.browse(allTypes);
But I cannot seem to get the file from the FileReference object into the File object.
There is no "path" member exposed when debugging the FileReference after opening it
View 1 Replies