Aşağıdaki gibi, bir dosyayı belleğe yüklemek için FileReference
kullanarak Windows'ta Flash Player 10'da Flex kullanıyorum.FileReference: Windows kilitli bir dosya yükleniyor
Sorunum, bir dosya Windows tarafından kilitlendiğinde, FileReference
, dosyaya erişilemediğine dair bana herhangi bir geri bildirim vermediğidir; bu, load()
numaralı çağrıdan sonra hiçbir zaman hiçbir olayı göndermez.
Herhangi birinin, Flash Player'ın dosyayı açamadıklarını nasıl anlatacakları konusunda bir bilgisi var mı?
var fileReference:FileReference = new FileReference();
private function onClick():void {
fileReference = new FileReference();
fileReference.addEventListener(Event.SELECT, onSelect);
fileReference.addEventListener(Event.COMPLETE, onComplete);
fileReference.addEventListener(Event.CANCEL, onOther);
fileReference.addEventListener(IOErrorEvent.IO_ERROR, onOther);
fileReference.addEventListener(ProgressEvent.PROGRESS, onOther);
fileReference.addEventListener(SecurityErrorEvent.SECURITY_ERROR, onOther);
// I've tried adding all of the other declared events
// for FileReference here as well
fileReference.browse();
}
private function onSelect(event:Event):void {
trace(fileReference.name);
try {
fileReference.load();
} catch (e:Error) {
trace(e);
}
}
private function onComplete(event:Event):void {
trace(fileReference.data.length);
}
private function onOther(event:Event):void {
trace("other:" + event.toString());
}
Umarım bir cevap alırsınız. Bunu kendim merak ediyorum. – Robusto