A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: FileReference.save simply not working (FP10)

  1. #1
    Actionscript Developer KigD's Avatar
    Join Date
    Jan 2003
    Location
    georgia
    Posts
    597

    FileReference.save simply not working (FP10)

    The following works INSIDE Flex Builder but NOT on the browser.

    Code:
    // ea is a button click event from a button
    public function nowSave(ea:MouseEvent= null):void
            {
            	var file:FileReference = new FileReference();
            	file.save(imageByteArray,"file.jpg"); // image byte array is data somewhere
            	removeChild(ea.target as MovieClip);
            }
    Any ideas why?
    K2xL - My games, tutorials, message boards, and experiments.
    Blog

  2. #2
    Senior Member cancerinform's Avatar
    Join Date
    Mar 2002
    Location
    press the picture...
    Posts
    13,449
    moved to flex.
    - The right of the People to create Flash movies shall not be infringed. -

  3. #3

  4. #4
    Actionscript Developer KigD's Avatar
    Join Date
    Jan 2003
    Location
    georgia
    Posts
    597
    Quote Originally Posted by cancerinform View Post
    moved to flex.
    This is not a flex question. This is an AS3 question. I'm using Flex Builder but the project is in pure AS3.
    K2xL - My games, tutorials, message boards, and experiments.
    Blog

  5. #5
    supervillain gerbick's Avatar
    Join Date
    Jul 2000
    Location
    undecided.
    Posts
    18,986
    change the name of the file you're saving - and then try it in the browser. If you trace it on debug, you might be getting an IO/subsys error that you might not normally see if it's trying to overwrite an already existing file.

    I've done that in the past.

    [ Hello ] | [ gerbick ] | [ Ω ]

  6. #6
    Junior Member
    Join Date
    Jun 2001
    Posts
    3
    i also have the same problem in as3. The file save dialog box appears if i am in Flash CS4 environment.
    But when i publish my movie as .html or .swf, it wont work in browser.
    I also have external .as file imported in .fla file. Can this be a problem ?

    Regards.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center