开发者

AS3 - AIR - From a swf path file to a ByteArray

开发者 https://www.devze.com 2023-02-17 13:24 出处:网络
I am coding an AIR application. I\'ve got directly a path of a swf file (because it was stored in a xml file).

I am coding an AIR application.

I've got directly a path of a swf file (because it was stored in a xml file). Do yo know if it is possible to get the ByteArray from this file ?

I know that FileReference do that very well, but this class need a select event. But it isn't my cas开发者_如何学Ce because I've allready got my path.

Thanks a lot for your answers !


In AIR, you can read/write files directly using flash.filesystem.File and flash.filesystem.FileStream.

See, for example, this article.


however you can load it with URLStream and get a ByteArray with URLStream.readBytes()

0

精彩评论

暂无评论...
验证码 换一张
取 消