Language: ChineseGermanSpanishFrenchDutchItalianRussian
123 Flash Chat Forums

Go Back   TOPCMM Community > SWFKit > SWFKit Support

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 11-09-2009, 11:03 AM
Junior Member
 
Join Date: Feb 2009
Posts: 3
Default FileStream AS3 wrapper class

Hello,

I would like to know, how to write a ByteArray class contents using FileStream wrapper class to a file. In SWFKit help, I see that FFish script FileStream can write StringStream byte array to file. I would like to know if it's possible to write bytes from actionscript.

Here:

Code:
var myArray:ByteArray = new ByteArray(); // let's say this array is filled with bytes

var fs:FileStream = new FileStream(path, "w");
			
fs.write(myArray); // how to pass ByteArray here?
fs.flush();
fs.close();
Reply With Quote
  #2 (permalink)  
Old 11-16-2009, 07:54 PM
Senior Member
 
Join Date: Dec 2002
Posts: 2,015
Default

The ByteArray is a very special object, so far there is no good way to save a bytearray. You can only first convert it to a string array, for example, convert each byte to its ascii code, and then save the string into your file, or send it to ffishscript to convert it back to bytes and save them.
Reply With Quote
Reply

Was this information helpful?    Yes No



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT. The time now is 12:48 PM.


Powered by vBulletin® Version 3.7.1
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.
Search Engine Friendly URLs by vBSEO 3.1.0 ©2007, Crawlability, Inc.