Importing flash.filesystem.file

Hi all
          i was making a functionality to upload an image ..
the package import flash.filesystem.file works in desktop app but in web app i am unable to import the package..how come this...

Actually, you can load an image directly into Flash Player using FileReference/load():
var file:FileReference = new FileReference();
stage.addEventListener(MouseEvent.CLICK, click);
function click(e:MouseEvent):void {
  file.browse([new FileFilter("JPEG", "*.jpg")]);
  file.addEventListener(Event.SELECT, fileSelect);
function fileSelect(e:Event):void {
  trace(file.name)
  file.load();
  file.addEventListener(Event.COMPLETE, fileComplete);
function fileComplete(e:Event):void {
  var loader:Loader = new Loader();
  loader.loadBytes(file.data);
  addChild(loader);

Similar Messages

  • Problems with using a variable of type flash.filesystem.File

    I need to parse a file with my flex app.  I can import flash.filesystem.File with no problem but if I try to create a variable of that type, it does strange things at run time.  If the variable is defined inside a function, it's as if that function no longer exists.  The function doesn't get called and I can't step into it.  If I define a File variable at global scope, the swf simply won't do anything at all.
    I've added all the AIR libs to my project and don't know what else to try at this point.  Any ideas?
    This sample code shows the problem.  If I comment out the File in initData, initData doesn't get called and I can't step into it.  If I comment out the global File, then I get a blank swf.
    <?xml version="1.0" encoding="utf-8"?>
    <mx:Application           
       xmlns:mx="http://www.adobe.com/2006/mxml" minWidth="955" minHeight="600"
       initialize="initData()">
        <mx:Script>
            <![CDATA[
                import flash.filesystem.File;
                //private var file:File;
                private function initData():void
                    //var file:File;  
                    testLabel.text = "test";   
            ]]>
        </mx:Script>
        <mx:TextArea y="200" id="testLabel" text="hello" />
    </mx:Application>

    sorry for my ignorance, I've only been using flex since 4.0
    shouldn't you be using WindowedApplication rather than Application for an AIR app?
    also there is no need to import File
    below is my code that work's fine
    <?xml version="1.0" encoding="utf-8"?>
    <mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
                                  layout="absolute"
                                  initialize="initData()">
         <mx:Script>
              <![CDATA[
                   private var file:File;
                   private function initData():void
                        var file:File;
                        testLabel.text = "test";
              ]]>
         </mx:Script>
         <mx:TextArea y="200" id="testLabel" text="hello" />
    </mx:WindowedApplication>

  • 1172: Definition flash.filesystem:File could not be found.

    I get the error 1172: Definition flash.filesystem:File could not be found. when i attempt to import File class or any other class from the package flash.filesystem. I already installed Adobe AIR but it still doesn't work.

    you're welcome.
    (been there and done that, too.)

  • "Unknown Flex Problem" - 'flash.filesystem:File' is undefined.

    Hi,
    I have written an AIR ActionScript Library project using SDK 4.0.
    I had written code for most AIR components in the library, everything was working fine.
    I then needed to add code for components like FileSystemComboBox, FileSystemDataGrid, FileSystemList, etc.
    For this, I added airglobal.swc and airframework.swc to the library project.
    I am getting the following errors:
    'flash.desktop:Icon' is undefined.   Unknown    Flex Problem
    'flash.events:FileListEvent' is undefined.    Unknown    Flex Problem
    'flash.filesystem:File' is undefined.   Unknown    Flex Problem
    Im guessing that the flash package is present in both playerglobal.swc and airglobal.swc and this is giving rise to the problem internally.
    Can someone tell me how to overcome this?
    Thanks,
    Pradeep.

    I am writing a library for AIR based projects. Any AIR flex project should be able to integrate my swc into their project.
    The goal is automation.
    So, I am having trouble automating FileSystem components in SDK 4.0 only.
    The same is working fine in SDK 3.5 as it does not have a palyerglobal.swc included.
    Can I remove the dependency on playerglobal.swc in SDK 4.0?
    -Pradeep

  • Does Keynote Import Flash SWF Files?

    Hello,
    I do a lot of presentations and I often need to import Flash SWF files and play them inside my presentation. I currently do this on Windows with PowerPoint.
    Does Keynote '09 import Flash SWF files?
    Thanks!

    PeterBreis0807 wrote:
    To have Keynote accept and play Flash files go:
    +Apple Menu > System Preferences > QuickTime > Advanced > check Enable Flash+
    Peter
    Alas I don't see that option — having said that I looked at mime types and legacy encoders and nada, but oddly when I went to check the QT version (7.6 by the way) in the "About Quicktime" (accessed via the *System Preferences*) it cycles thru various codecs and "Macromedia Flash Player" is one of them... guess it doesn't access anymore. :o(
    Advanced lists only...
    Default Synthesizer:
    Transport Setup:

  • Importing Flash .fla files

    I am taking over a client who has a .fla site with several fancy "Ribbon","Bubbles", and "Stripes" transitions I want to import.
    Is it easier to just edit it in Flash or to Bring it into Flash builder?
    I would like to at least bring in the original parts into Flash Builder beta 2.
    Working in Flash Beta 2 until the release.
    Dan Pride

    Hi,
    The solution depends on what you want to do with these Flash files. If they are going to be self-contained with minimal communication with the main application you can simply use SWFLoader and listen to the events by: SWFLoader.content.addEventListener(...).
    If you plan more specialized interaction with these SWFs then you want to create custom event class and dispatch custom event(s) from the SWF and listen to them in the main application in the same way.
    HTH,
    FTQuest

  • Importing Flash Catalyst file into Dreamweaver

    Is it possible to import or use a swf file created in Flash Cataylst into Dreamweaver?
    stevent2011

    Yes, Flash Catalyst content can be used in Dreamweaver. However, the version of swfObject might be out of date. You might need to look at the object code in the html. When you publish from Flash Catalyst, there is also a main.html file that you can use a reference for the html.
    Chris Griffith

  • Using flex4.1, Flash Builder giving error "flash.filesystem::StorageVolume could not be found."

    Hi there,
              I'm trying to copy some files to Storage Card on a AIR application. Is this possible with the latest version of the AIR SDK (2.0)?
              I am developing in Flash Builder. I have downloaded the lastest flex sdk(4.1)  and used it.
              Flash Builder then recognises the StorageVolume and StorageVolumeInfo classes. However when I then run the app the debugger throws an error on the following line:
    LINE:
    var volumes:Vector.<StorageVolume> = StorageVolumeInfo.storageVolumeInfo.getStorageVolumes();
    Note: I have imported both classes as well.

    I'v read the article
    http://forums.adobe.com/message/2984004#2984004,
    and checked my application.xml, The content of the first two lines is:
    <?xml version="1.0" encoding="utf-8" standalone="no"?>
    <application xmlns="http://ns.adobe.com/air/application/2.0">
    Error message from flash builder debug:
    typecheck Player/getLocalVideo()
      outer-scope = [global Object$ flash.events::EventDispatcher$ flash.display::DisplayObject$ flash.display::InteractiveObject$ flash.display::DisplayObjectContainer$ flash.display::Sprite$ mx.core::FlexSprite$ mx.core::UIComponent$ spark.components.supportClasses::SkinnableComponent$ spark.components.supportClasses::SkinnableContainerBase$ spark.components::SkinnableContainer$ spark.components::Application$ spark.components::WindowedApplication$ Player$]
                           [Player[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {} ()
      0:debugfile "D:\My Documents\Adobe Flash Builder 4\LiveVideoClient\OnSiteEnforceLawPublish\src;;Player.mxml"
                           [Player[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {} ()
      2:debugline 20
                           [Player[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {} ()
      4:getlocal0
                           [Player[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {} (Player[O])
      5:pushscope
                           [Player[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Player[O]} ()
      6:pushnull
                           [Player[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Player[O]} (null[O])
      7:coerce_s
                           [Player[O] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A] *[A]] {Player[O]} (String?[S])
      8:setlocal 5
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] *[A] *[A] *[A] *[A] *[A]] {Player[O]} ()
      10:pushnull
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] *[A] *[A] *[A] *[A] *[A]] {Player[O]} (null[O])
      11:coerce mx.collections::ArrayCollection
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] *[A] *[A] *[A] *[A] *[A]] {Player[O]} (mx.collections::ArrayCollection?[O])
      13:setlocal 6
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] *[A] *[A] *[A] *[A]] {Player[O]} ()
      15:pushnull
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] *[A] *[A] *[A] *[A]] {Player[O]} (null[O])
      16:coerce flash.filesystem::File
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] *[A] *[A] *[A] *[A]] {Player[O]} (flash.filesystem::File?[O])
      18:setlocal 7
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] *[A] *[A] *[A]] {Player[O]} ()
      20:pushnull
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] *[A] *[A] *[A]] {Player[O]} (null[O])
      21:coerce_s
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] *[A] *[A] *[A]] {Player[O]} (String?[S])
      22:setlocal 8
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] *[A] *[A]] {Player[O]} ()
      24:pushnull
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] *[A] *[A]] {Player[O]} (null[O])
      25:coerce_s
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] *[A] *[A]] {Player[O]} (String?[S])
      26:setlocal 9
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] String?[S] *[A]] {Player[O]} ()
      28:debug
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] String?[S] *[A]] {Player[O]} ()
      33:debug
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] String?[S] *[A]] {Player[O]} ()
      38:debug
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] String?[S] *[A]] {Player[O]} ()
      43:debug
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] String?[S] *[A]] {Player[O]} ()
      48:debug
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] String?[S] *[A]] {Player[O]} ()
      53:debug
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] String?[S] *[A]] {Player[O]} ()
      58:debug
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] String?[S] *[A]] {Player[O]} ()
      63:debug
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] String?[S] *[A]] {Player[O]} ()
      68:debug
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] String?[S] *[A]] {Player[O]} ()
      73:debug
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] String?[S] *[A]] {Player[O]} ()
      78:debugline 23
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] String?[S] *[A]] {Player[O]} ()
      80:findpropstrict flash.filesystem::StorageVolumeInfo
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] String?[S] *[A]] {Player[O]} (Object[A])
      82:getproperty flash.filesystem::StorageVolumeInfo
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] String?[S] *[A]] {Player[O]} (*[A])
      84:getproperty storageVolumeInfo
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] String?[S] *[A]] {Player[O]} (*[A])
      86:callproperty getStorageVolumes 0
                           [Player[O] *[A] *[A] *[A] *[A] String?[S] mx.collections::ArrayCollection?[O] flash.filesystem::File?[O] String?[S] String?[S] *[A]] {Player[O]} (*[A])
      89:coerce __AS3__.vec::Vector
    VerifyError: Error #1014: Class flash.filesystem::StorageVolume could not be found.
    at Player/___Player_WindowedApplication1_windowComplete()[D:\My Documents\Adobe Flash Builder 4\LiveVideoClient\OnSiteEnforceLawPublish\src\Player.mxml:4]
    at flash.events::EventDispatcher/dispatchEventFunction()
    at flash.events::EventDispatcher/dispatchEvent()
    at mx.core::UIComponent/dispatchEvent()[E:\dev\4.x\frameworks\projects\framework\src\mx\core \UIComponent.as:12528]
    at spark.components::WindowedApplication/enterFrameHandler()[E:\dev\4.x\frameworks\projects\ airspark\src\spark\components\WindowedApplication.as:2355]

  • Imporing mx.flash.filesystem package

    Hi,
    I am using Flex Builder 3 for development. I want to import  mx.flash.filesystem.File  package to write a file.
    I am unable to find this package in available packages list ? How to resolve this issue ?
    Do I need to add any library to my build path ? Please help me to resolve this issue.
    1120: Access of undefined property File.

    You can't directly write to a file on the server. You need to use HTTPService to transfer the new XML data (or better to transfer as JSON data), and write to XML file from PHP script or some other server-side technology.
    These links will show how to transfer data as JSON:
    http://www.switchonthecode.com/tutorials/flex-php-tutorial-transmitting-data-using-json
    http://www.switchonthecode.com/tutorials/using-flex-php-and-json-to-modify-a-mysql-databas e
    If this post answered your question or helped, please mark it as such.

  • Error: Definition flash.fileSystem could not be found

    when trying to import   import flash.fileSystem.* i am geeting an error like this
    Error: Definition flash.fileSystem could not be found.
                            import flash.fileSystem.*
      Is there any solution ? i have already refrenced the library path.

    Hi ReemaDevi,
    I think you are working on an AIR app..
    The namespace you imported is wrong...It should be
    import flash.filesystem.*;
    You have used fileSystem wrong case..
    Thanks,
    Bhasker Chari.S

  • AIR flash.fileSystem not found

    I am trying the create an AIR application and I want to use the flash.fileSystem classes, but when I try:
         import flash.fileSystem.*;
    it gives me and error that says:
         1172: Definition flash.fileSystem could not be found.
    How can I use these classes?
    Thanks,
    Steven

    I found the problem... The "s" in filesystem isn't supposed to be capitalized. It sould be written:
         import flash.filesystem.*;

  • How can I import a .swf file in Adobe Flash CS4?

    Hi,
    How can I import a .swf file in Adobe Flash CS4?
    Thanks.

    you can use file/import but that would be a mistake.
    you should "load" your swf, not import it.
    if you want to load it and need help, are you using as2 or as3?

  • How to import flash file in illustrator?

    I have made a logo in flash earlier. I want to continue working on it in illustrator. But the import won't work. Ho to approach this?   

    Illustrator cannot place Flash (swf) files.
    Try export from Flash into a file format that Illustrator supports.
    For CS6 export to fxg
    For CC svg

  • A problem with importing layered PSD file into Flash

    Hi.
    There's a problem with importing layered PSD file into Flash.
    If I import a layered PSD file, some part the color of the lower layer is shown at the edge of objects or shadows. Instead, if I crop each layers first and import them, there's no problem.
    If the higher layer has brush or transparent effects, it becomes worse.
    Any help with this problem?
    Thanks.

    How was the original art created? Was the original RGB or CMYK? What is the resolution of the Photoshop file? Flash only works well with RGB and 72 pixel per inch resolution. If your original art is not set this way, then Flash will attempt to convert it as it imports it. Flash uses the sRGB color space. You'll get the best color translation if your Photoshop file is using this color preference.

  • Captivate 2.0 Very Buggy After Import of SWF File (Flash 8)??

    Where should I begin...
    Issue 1
    I just updated to Cap 2 and started using it. I have come
    across a few very weird issues. Everyting works fine until I import
    a swf file to the stage. After I import a swf file to the stage I
    realize I made a mistake in the swf file. So I updated the swf in
    Flash 8 and publish it. I then went into Cap 2 and tried to update
    the file (which I noticed that the update button has been removed.)
    When I go to import and import the updated file, it does not update
    it. I had to close the program and reboot before it would recognize
    the new file??? Sounds like a caching issue of some sorts, but very
    buggy in my eyes.
    Issue 2
    So now I have the new file in... great! But when I try to use
    one of the drop down menus from the top tool bar, the menu
    disappears immeditly after I have clicked on it??? The only way to
    get my menu's back is to close the program and reopen it.
    Issue 3
    I just recently found another problem... I was trying to work
    with Cap 2 in its crazy state, and I pulled one of the bars on the
    timeline torwards the end of the screen and the timeline
    disappeard??? So I went to view and clicked timeline... no change.
    Now I do not have a timeline??? I have tried running a reapir and I
    even tried several different new projects with different swf files
    to see if it was just that file and I have the same results.
    Sorry so lengthly on my issues but this just sucks and I need
    help!! Anybody got any ideas!??
    Thank you!!

    Hi SaSQuaCh69247,
    Issue 1 :- Select the SWF file in library, right click, and
    select update.
    Issue 2 :- Actually it could be valid for Issue 1 also. It
    seems like SWF file you are trying to import, does some action
    like, importing another swf or connecting to server on the first
    frame itself. Captivate will try to play the first frame of SWF
    when you import them. Try creating a keyframe with the stop action
    as the first frame in your SWF, and see if you still have the
    issue.
    Issue 3 :- The approach I am mentioning over here is
    generally the last approach which I will take in such scenerios,
    but since you have already experimented a little, so try this.
    Go to C:\Documents and Settings\<user name>\Application
    Data\Adobe\Adobe Captivate
    Rename captivate_v20.dat as captivate_v20_org.dat.
    Restart Captivate Application.
    thanks

Maybe you are looking for

  • Setting up 10.4.5 to use the built in VPN with Cisco

    I see from the update that it now supports Cisco VPN servers. How do I go about enabling the VPN capability, I don't see anything in the network system preferences that show how to enable the VPN functionality.

  • Report on Sites, Lists and Libraries with Unique Permissions

    I would like to get a report on Sites, Pages, Lists, Libraries, Items and Documents under a Site Collection having Unique Permissions. What is the best way to accomplish that ?

  • Video Download Error

    When I try to download a video my iTunes comes up with the error: "There was an error downloading your purchased music. The disk could not be read from or written to." However, when I download music it works fine. I have no idea as to why I am gettin

  • How to apply 'disableColumnReordering="true"' at column level.

    Hi Experts, I am using jdev 11.1.1.5.0. I have a requirement, not to move(drag) the column within a table. I got succeeded to apply this on table level so that all columns are fixed, but not able to fix it at column level. So, is there any way or a p

  • Finder. Dragging a file into a folder I get inside that folder.

    When dragging a file into a folder I get inside that folder instead of staying in the original location. Why? This may sound a bit stupid but it did not use to happen before and it's annoying when you are cleaning up a folder and just want to drag an