Loading File in Flex without AIR?
i am using flexbuilder 3 now i need to load xml file from disk using flex without AIR i imported flash.filesystem.File but error occured. but AIR project,flash.filesystem.File was successfully imported. Cant i use flash.filesystem.File from flex without开发者_如何转开发 using AIR???
You can only use flash.filesystem.File
in AIR. But you can still load XML files using either HTTPService or URLLoader. Check out this answer which has sample code for loading XML into Flex.
If you get a Security Sandbox Error when trying to load, set the Flex Compiler argument use-network=false
, which will allow you to load local files into the swf.
精彩评论