ActionScript 3 :: Flash - Save Binary Data To Files?

Nov 14, 2010

im doing a level editor for my game and i need to save the tilemap data (120x120 uint array) and character data (character type, position, rotation, stats, etc) to a .bin file. How can i do it? I know i can do it by using XMLs but it is not good for saving tilemaps...

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Save Binary Data In ByteArray In To Xml?

Feb 9, 2012

I would need to save some binary data (bitmap data or similar) as a part of XML file.[code]...

I suppose I must serialize or encode "ba" (binary bytearray data) some way to string before writeing to XML and decode them back during the reading from XML, but I cannot find the correct way how to do it.

View 3 Replies

ActionScript 3.0 :: Save Data To Text Files (Flash & Amp)

Dec 7, 2008

I'm working in AS3 using Flash CS3 in the Mac OSX Leopard environment and would like to save data, to be later retrieved, in text files (probably xml). The data will be the result of the user interaction with the swf and the ideal location will be the directory (local or website) in which the swf file is located.

I know I could achieve the same effect using a database backend but want to make the swf file more portable, and don't really want to dedicate a database to this function. I've read a bundle of website comments on this but none seem to tidily do what I want, and I am not a whole lot wiser on the subject. The data will be user details and variables (e.g. scores) to carryover to when the user next accesses the game. What are my options (FileReference.save, SharedObjects, URLLoader, other )

View 2 Replies

Flex :: Save Data Into External Files In AS3, With Out Server?

Dec 10, 2010

How can I save some text information in local hard-disk with out the server support. I know shared object, but i dont use this. I need to save all these function in anther external file as text.

Is there any way to do that in AS3.0.

I don't prefer Flex, am working in Action Script 3.0 & Flash IDE

EDIT:

My swf is saved in a local machine. So no server interaction or browser interaction. the swf is running a local folder and read txt files from local folder, and save once press the save button.

View 3 Replies

Import Raw Binary Data Into An Image In Flash 8?

Jan 18, 2010

We have a system that allows a user to upload any image, which we store on the server. Of course, it is simple to load an image (that you know the path to) using loadMovie, but I also want to load certain pieces of meta data about the image that is precalculated and stored on the server; we may one day want to retrieve things completely unrelated to the image as well, so consider the non-image data to be arbitrary.So, that said, is there a way to simply return the image as a variable (urlencoded and returned in a loadVars request, perhaps) and then load that data into a movie clip?

Bonus Lightning Round Question: Is there a way to check the output of a PHP script which processes uploads when the request is sent via FileReference.upload(url:String)? Should I load/escape the binary data and then send it using a loadVars() request if I want to see the output?

View 1 Replies

As3 :: Flash - Use To Load Binary Data From Web Server?

Oct 19, 2011

I'm trying to load some binary data from server like this

var urlRequest:URLRequest = new URLRequest("http://localhost/test.php");
var loader:Loader = new Loader();
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, completeHandler);

[code].....

View 4 Replies

Upload Binary (audio) Data From A Flash Client To .NET Server (WCF/REST/HTTP)?

May 5, 2010

I originally tried to capture, encode and upload the audio using Silverlight, but because of the lack of suitable client-side encoding options, I'm now giving Flash a shot (Flash has baked-in support for encoding to Speex).I think I've figured out how to capture and encode the audio... But now what was easy in Silverlight, is the challenge in Flash.My server-side is .NET: MVC2-I'm open to receiving the audio in whatever manner is best- REST, WCF..So that's my question: How could one upload binary data from Flash, to a .NET server-side endpoint

View 1 Replies

ActionScript 3.0 :: Read And Write Binary Files

Sep 25, 2009

Is it possible to zip/compress assets files into binary or .bin format through Actionscript or AIR? The compressed file will be in binary and can only be read by Actionscript which then parses the file.

Right now I am only able to read/write zip files using nochump's amazing library. I tried using AIR to write the bytes to disk and save it as filename.bin but I am still able to read filename.bin using 7-zip.

The objective is to protect my asset files as much as possible. Are there any other ways?

View 4 Replies

ActionScript 3.0 :: Hex/Binary Data Over Socket?

Oct 21, 2008

I have a custom socket class designed to connect to a server and talk with it. At one point, the server uses hex data for speed, however Flash seems to not get ANY of this data. In fact, it doesn't get ANY of the data from that point to the next packet.

View 2 Replies

ActionScript 3.0 :: Binary Image Data To PHP?

Jul 3, 2007

I wrote an image editor for my cms and wanted to send the image respectively the through the BitmapData's getPixels()-method received ByteArray to a PHP-script that displays and finally saves the image. Obviously I didn't succeed. How do I have to encode my binary data so that PHP is able to read it and how do I have to treat the bytes in PHP? I also tried encoding the image data with the corelib classes from [URL] but it didn't work as well.

View 4 Replies

ActionScript 3.0 :: Reflect Class And Binary Data?

Apr 28, 2009

I am using pixelfumes reflect class to create a releflection, the problem i have is (i) It only accepts reference to a movieclip. (ii) I cannot cast my binary data as a movieClip var item:Bitmap has to stay as a bitmap so either I make a copy of it as a moveclip and reflect it or find a way to pass it directly into the new Reflect() constructor.

[Code].....

View 1 Replies

Actionscript 3 :: Binary Data Corrupted From Php To AS3 Via Http

Oct 27, 2011

I'm trying to retrieve binary data using AS3 from a PHP server via HTTP, but very often (~50%) a few bytes arrive corrupted.

PHP snippets:

header('Content-Type:binary/octet-stream;');
echo $this->page;

[Code].....

View 1 Replies

As3 :: Python : Packing/unpacking Binary Data?

Feb 10, 2012

I am porting a python app that makes use of these functions [URL] to read a 32-bit little value.

View 1 Replies

ActionScript 3.0 :: Scale Bytearray/binary Data?

Jul 20, 2009

So, as the title says I was wondering if it is possible to scale bytearray/binary data from lets say 640x480 which is being captured from the stage to 1024 x 768

View 1 Replies

ActionScript 3.0 :: Send Binary Data To Server?

Oct 8, 2009

I am working on the web base flash application I am trying to communicate with server through binary socket to the server IP Address and Port using Action script 3.0 at the server side we are using java. I will like to send binary data string to the server in a clubbed single packet.

View 1 Replies

ActionScript 3.0 :: Binary Sockets Ignors Data Sometimes?

Dec 16, 2009

Sometimes flash-socket ignors data which is being sent by server. I dunna know exactly if it's server-side problem(data actually aint being sent) or flash.How does flash handle numerous of data packages comming from server ? I know that flash perform all actions in single thread, but what happen when flash recive a lot of packages at same time ? Does flash serialize incomming packages and then call ProgressEvent.SOCKET_DATA for each package or just ignore those packages which cant be handled runtime ?

View 5 Replies

ActionScript 3.0 :: Post Binary Data To Server

Dec 19, 2009

I have a problem with my application. Here's what i have up till now[code]...

Everything works fine, you can scale the image etc.

I would like to download the new image after you scaled it. I have been trying it for a long time now but i cant get it to work.[code]...

View 4 Replies

ActionScript 3.0 :: Decompress Binary Data Coming From PHP?

Jul 28, 2010

I'm missing a couple of bits somewhere. I'm trying to send and receive compressed binary data using AS and PHP, but I receive allways the error "Error #2058: There was an error decompressing the data". [code]...

View 1 Replies

ActionScript 2.0 :: Convert A MC To Image Using Binary Data?

Nov 6, 2007

How can I change this so it saves the image as binary data. This code works fine but when the image is created the file size is too big.

Code:
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.ColorTransform;

[Code]......

View 1 Replies

ActionScript 3.0 :: Reflect Class And Binary Data

Apr 28, 2009

I am using pixelfumes reflect class to create a releflection, the problem i have is

(i) It only accepts reference to a movieclip.

(ii) I cannot cast my binary data as a movieClip

var item:Bitmap has to stay as a bitmap so either I make a copy of it as a moveclip and reflect it or find a way to pass it directly into the new Reflect() constructor.[code]

View 3 Replies

Flash :: CS5 Can't Save CS4 Files

May 24, 2010

I keep a copy of CS3 around just so I can be productive... CS4 takes 10 to 20 seconds between timeline edits for the screen to un-freeze.I had hoped CS5 would resolve this because I would like to and need to use the Flash Player 10 classes.But NO!, it is completely useless in a production environment because you can't even save your work without jumping through hoops!!!I work with aproximatly 20 designers and we have thousands of CS3 files that get updated in over 40 live sites. This product is not ready and it is very disappointing that Adobe would release it like this. The only way I can save any of these files is to save as a CS4. [url]...

View 2 Replies

ActionScript 3.0 :: Unpack Data Form Binary String?

Jan 17, 2010

unpacking data from a binary string. I realized it with a php code:
 
list($empty,$size) = unpack( 'V', fread($socket,4) );    $theresult = fread($socket,$size);
  
But how can i do this in as3 ? I didn´t find a possibilty to encode "unsigned long (always 32 bit, little endian byte order)". Is there a option like unpack in as3 ?

View 4 Replies

Actionscript 3 :: Send Binary Data From It Through Java To A Filesystem?

Apr 10, 2012

I've got XML data in AS3 that needs to be compressed, validated on my Java Google App Engine servlet then saved to a file in Google Cloud Storage. Later that file will be opened and decompressed by the AS3 client. The process works if I do it with plain XML or text, but if I ByteArray#compress the data, it dies during ByteArray#uncompress with "There was an error decompressing the data".

I've tried setting the content type and mime type at various points, as well as encoding with Base64, but every attempt seems to break in a different way and I never get the same XML back that I sent in. Do I need to use multipart? Should I compress on the server? [code]...

View 2 Replies

Actionscript 3 :: Upload Urlencoded Binary Data To Tumblr?

Sep 13, 2011

I need up upload urlencoded binary data to tumblr.this is what I'm currently trying:

baseString.params = 'data[0]=' + URLEncoding.encode(byte.toString()).replace('~','%257E');

View 1 Replies

Actionscript 3 :: URLLoader Cant Load Binary Data From Different Domain?

Mar 5, 2012

1 - SWF must have ability to loading binary data from any domain.

2 - SWF cant load policy XML file from url, cause upload form allows me only to upload swf files, so I cant include any other data.
I tried:

Security.allowDomain("*");

But it works only for SWF files.I tried to embed policy XML file:

var dataXML:XML =
<?xml version="1.0"?>
<!-- http://www.foo.com/crossdomain.xml -->
<cross-domain-policy>

[code]....

This will make an security error, if file is from different domain than SWF file.Its possible to get binary data from JavaScript using ExternatInterface in AS3 code.Here is cross-browser library for reading files binary: binary reader and later version jDataView.

View 4 Replies

ActionScript 3.0 :: Convert A String Of Binary Data To Bytearray?

Jun 22, 2009

i have a string which contains all binary data. the binary data represents a custom object in my application.

i want to convert all the data inside the string into binary format and store it in a ByteArray. then I want to read the object from the ByteArray using readObject.

View 2 Replies

ActionScript 3.0 :: Encoding Image Data Into Binary Strings?

Jul 1, 2009

I'm trying to write a flash program that will import JPEG's and embed them into an XML string for storage. However, i'm having some trouble with casting them back into Bitmap objects, after encoding and decoding the strings in Base64.

I've used the external Base64 encoding class created by Steve Webster, which seems to work great in encoding and decoding the files, but i'm clearly doing something wrong in my code. I'm not sure how exactly I should be converting the decoded bytecode back into an image object, and get flash to display it. Should it be a bitmapData? do I have to code it via setting the pixels manually? Or can I simply just cast it as a Bitmap object?

here's a snippet of my code to show what I mean - At the moment this will return an error. Other things i've tried seem to return the object as a memory reference, rather than it's actual data.

(trace statement)
decoded.readObject() = ����
Error: Error #2030: End of file was encountered.
at flash.utils::ByteArray/readObject()"

[Code].....

View 5 Replies

ActionScript 3.0 :: Webcam Binary Data Of Current Frame?

Oct 26, 2009

When using a webcam, is there a way to get the current frame's binary data to save to a file?

View 1 Replies

ActionScript 2.0 :: Convert Bitmap Data Into Binary Form?

Jun 25, 2010

converting bitmap data in flash movieclip to binary form. Need the solution using AS2.

View 1 Replies

Flex :: ByteArray Manipulation - Storing Binary Data In String?

Jul 28, 2011

I have some binary data and I can't store it in a string, as such I'm using a ByteArray. The problem is that I need some functionality that comes with strings, to be specific I need the charAt, substr, indexOf and substring methods.

View 1 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved