explorers' club

explorations in dev, science, sci-fi, games, and other fun stuff!

flash.net.FileReference & Mac OS Leopard: Not playmates?


Thanks to the readers’ comments I got it working.  Yippee!!!  I just did an OS software update going from OS 10.5 => 10.5.1.  I did uninstall the flash player and then reinstalled it but that may be entirely unnecessary as the OS update may completely address the fix for the older flash player versions.  That is my assumption.

My buddy just sent me a link to folks reporting this issue all over the place. So the code wasn’t an issue, the OS is. Adobe has released n update to the mac version of the Flash player:

I wanted to throw this out there. I have been trying to get a LocalFileUtil class to work for a day or so with no luck whatsoever. I have given the code to another developer running a Mac with OS 10.4.10 and was tested in both Firefox and Safari. It works as expected. So why no go for me?Basically what is happening is this: I have created a simple example application that should only trigger either the Event.SELECT or Event.CANCEL handlers. Regardless if I actually select or cancel, the Event.CANCEL handler is triggered. When inspecting this in the debugger, I find that there are some issues introspecting the fileReference var. Specifically when looking at the event.target (which happens to be the fileReference) I cannot view the properties. Instead of saying actual properties it says, “<exception thrown by getter>”. Looking into that further I find the following exception, “Error: Error #2037: Functions called in incorrect sequence, or earlier call was unsuccessful”. Now this is the same kind of exception that is triggered when using one-time use classes such as an instance of Sound. Sound is the type of class that can only be used once. Even if none of the parameters change, you cannot use that same instance. Its a throw away. Anyway, I have no clue as to what the issue is. Any input is much appreciated. Below is the sample code and a screen shot.

FileRef debugger

<?xml version="1.0" encoding="utf-8"?>



public var fr:FileReference

public function onClick ():void
fr = new FileReference();
fr.addEventListener(Event.SELECT, onSelect, false);
fr.addEventListener(Event.CANCEL, onCancel, false);
fr.browse([new FileFilter("images", "*.png;*.jpg;*.gif")]);

public function onSelect (evt:Event):void

public function onCancel (evt:Event):void


<mx:Button label="test" click="onClick()"/>



3 thoughts on “flash.net.FileReference & Mac OS Leopard: Not playmates?

  1. A fix for this in the Flash Player is available on Adobe Labs. This is not fixed for AIR, however.

  2. Looks like Apple adressed this in the 10.5.1 update:

    “…Improves compatibility with Adobe Flash-based uploaders used by .Mac Web Gallery and certain other websites and applications…”


  3. So I am curious, does this also address the debug version of the Flash player? I am trying to find material on it, but nothing mentions the debug version specifically.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s