Posted by Sankar.G | Posted in AS3 | Posted on 12:37 AM
you can able to browse the files in local use below codings in Action Script 3.0
AS3.0
Code:
b1_btn.addEventListener(MouseEvent.CLICK,fun);
function fun(e:Event)
{
var imagesFilter:FileFilter = new FileFilter("Images", "*.jpg;*.gif;*.png");
var docFilter:FileFilter = new FileFilter("Documents", "*.pdf;*.doc;*.txt");
var a:FileFilter=new FileFilter("mp3 files","*.mp3;");
var myFileReference:FileReference = new FileReference();
myFileReference.browse([imagesFilter, docFilter,a]);
}
this is the code you can able to browse the file locally by b1_btn button name
AS3.0
Code:
b1_btn.addEventListener(MouseEvent.CLICK,fun);
function fun(e:Event)
{
var imagesFilter:FileFilter = new FileFilter("Images", "*.jpg;*.gif;*.png");
var docFilter:FileFilter = new FileFilter("Documents", "*.pdf;*.doc;*.txt");
var a:FileFilter=new FileFilter("mp3 files","*.mp3;");
var myFileReference:FileReference = new FileReference();
myFileReference.browse([imagesFilter, docFilter,a]);
}
this is the code you can able to browse the file locally by b1_btn button name