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?
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.
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()"
Can I import binary in Flash CS5 and export swf, without AS code likes "Embed" ?I know I can use AS code,likes "[Embed]" metadata to embed binary in swf. But , how can I do that in Flash CS5 ?
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);
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...
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
I'm building an image viewer that has violent content (video games), and so it requires users to enter their birthdays. Problem is that because of company policy, I can't expose any of the source images being viewed in the event that someone might use their resources/net tabs (or just sniff the request) and get the direct link to the image. (I know that they could screenshot it, but that's out of anyone's control and not something I'm worried about.)Is there anyway to inherently mask loaded resources (images)? I've been using sockets, which is great, but there's also the problem of actually loading the image binary (after HTTP request headers are removed) as a Bitmap in Flash.
I have the Following requirement and I do not even know where to begin.I have created a map of a Country and on the map are several towns and cities, obviously easy enough so far.So, for example, say the XML data provides information of ten different pieces of information, one might be say Lightning Strikes.
I want to be able to create a dynamic map that adds a Red dot beside the City, that represents a record of the lightning strike. Or ,if required a larger dot might represent 10 lightning strikes if it is a very regular occurance.The main objective is to provide an up to date visual representation of which location is more active.I don't mind experimenting or following a link or guide to work it out,
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.
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.
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
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.
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 ?
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]...
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.
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]
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 ?
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]...
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.
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.
I`m using flash cs3 for my works , but i have one problem!when i use File=> Import=> Import to Library... or Import to Stage...the flash environment becomes terminated.I changed my flash version to CS4 and I have this problem again.
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.