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
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now