I try this but I can not get bitmap.why?Thanks for help.
<?xml version="1.0" encoding="utf-8"?>
<mx:WindowedApplication xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute">
<mx:Script>
<![CDATA[
import flash.filesystem.File;
import mx.controls.Alert;
private var _loader:Loader;
private var _importFile:File;
private var _bitmap:Bitmap;
private var _bitmapData:BitmapData;
private function browseFile():void
{
_importFile = new File();
_importFile.addEventListener(Event.SELECT, openOutput);
_importFile.browseForOpen("Select a File",[new
FileFilter( "Image File", "*.jpg;*.jpeg;" )]);
}
private function openOutput(e:Event):void
{
fileloc.text = e.target.nativePath;
//
_loader = new Loader();
_bitmap = new Bitmap();
_loader.load( new URLRequest(_importFile.url ));
_bitmap = _loader.content as Bitmap;
_bitmapData = _bitmap.bitmapData;
}
]]>
</mx:Script>
<mx:TextInput width="289" x="10" y="3" id="fileloc" />
<mx:Button click="browseFile()" label="Browse for File" x="10"
y="46" />
</mx:WindowedApplication>