var fr:FileReference = new FileReference();
if (fr.hasOwnProperty("browse")) {
fr.addEventListener(Event.SELECT, function(e:Event):void {
fr.load();
});
fr.addEventListener(Event.COMPLETE, function(ex:Event):void {
var xmlText:String = fr.data.readUTFBytes(fr.data.length);
var serializer:XMLSerializer = new XMLSerializer(network.elementBox);
serializer.deserialize(xmlText,network.currentSubNetwork);
});
var fileFilter:FileFilter = new FileFilter("XML: (*.xml)", "*.xml");
fr.browse([fileFilter]);
} else {
Alert.show("install Flash Player 10 to run this feature", "Not Supported");
}
However, when many clients are trying to run Demo in FB and to save images, there will be an error message box reading,"Install Flash Player 10 to run this feature." The reason is that not only the client-side is required to have Flash Player10, but the environment argument (while compiling) to be -target player=10.0.0.Besides, there will also be an alert if you just call fr.load();in Flash Builder4 with SDK4.1. But this problem can be settled down by adding -target-player=10.0.0.
For more detailed information, please refer to exporting images in Flex.
No comments:
Post a Comment