Ustag Posted May 25, 2011 Share Posted May 25, 2011 hi im trying to open the file browser in flash and maybe someone know why I get this error: Scene 1, Layer 'action', Frame 1, Line 7 1061: Call to a possibly undefined method browse through a reference with static type Class.with this code:import flash.events.MouseEvent;browseBtn.addEventListener(MouseEvent.MOUSE_UP, browseFile);function browseFile(event:MouseEvent):void{ FileReference.browse(); //Line 7} Link to comment Share on other sites More sharing options...
Ingolme Posted May 26, 2011 Share Posted May 26, 2011 Shouldn't you create an instance of the FileReference class first? file:FileReference = new FileReference();file.browse(); Link to comment Share on other sites More sharing options...
Ustag Posted May 26, 2011 Author Share Posted May 26, 2011 Thanks that helped, but I had to make it like this:var file:FileReference = new FileReference(); Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.