VerifyError on listing directory in AIR / Flex

Hi All,

Just testing out attempting to read a directory, but cannot seem to. The error I get is:

VerifyError: Error #1068: flash.filesystem.File and flash.filesystem.File cannot be reconciled.

I’ve checked both Google and documentation and I have no idea what it is doing. My code is:

var directory:File = File.applicationDirectory;
var list:Array = directory.getDirectoryListing();

Has anyone run into this issue before? Compilation is fine, its only when the application is run. I am using up to date Flex and its set as a desktop application to AIR.

Any help greatly appreciated.
cheers