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


Similar Posts:


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 :: 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 :: 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 :: Sending Binary Data To Server Via URLLoader (Freezes App)

Dec 20, 2011

I'm trying to send about 1 MB of binary data to server via URLLoader. But when I call method load of this class, my application hangs for about 1-1.5 seconds, then uploading runs normally. How can I prevent it?

View 2 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

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

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

Flash :: Send/load Data To/from Server Side?

Mar 26, 2011

How many possible ways to send/load data to/from server side data sources and what are the conditions of using each method.

View 2 Replies

ActionScript 3.0 :: Communicate With Server Through Binary Socket To The Server Through IP Address?

Oct 10, 2009

I am working on the web base flash application I am trying to communicate with server through binary socket to the server through 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. I dont know the Action Script 3.0 as much.for this We will have to communicate through IP and Port only

View 1 Replies

Data Integration :: Load XML Data From Remote Server?

May 8, 2006

I am trying to have a PHP page load some variables into aFlash banner ad that will be running on 8 different websites...I need to have one central location for the PHP page andallow 8 other domains access this data...I am finding that when everything is on one server... noissues... data reads just fine...But when the PHP page is on one server and the SWF file onanother... the data never gets through...I am assuming this is some issue with security within

View 1 Replies

ActionScript 3.0 :: Send Big Binary To Server?

May 5, 2011

I have project Business card design, my app have feature save their design with PNG extension after customer design their business card to server. I sent binary of PNG to server by urlRequest and urlLoader. But with files have file size more than 5mb, it can't upload.

View 5 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 :: Connecting To A Ftp Server With Binary Socket?

Dec 30, 2008

I'm trying to make a little ftp upload app - not a full FTP client, just something to enable image upload with decent performance. I basically took the approach Lee used in his POP3 socket tutorial. The problem I'm having is that I can connect to the FTP server and I can authenticate and log in but as soon as I try to enter passive mode for data transfer I get nothing- not even an error. From looking at the FTP RFCs, FTP requires two TCP connections - a command connection and a data connection - does this mean that I need to open a second socket for the data transfer? Another possible issue is the Flash Player security policy not allowing conection to ports under 1024 - I have not placed a policy file or policy server on the host running the FTP server but as I can successfully login, I appear to be able to connect to port 21 (standard FTP port) anyway. The code I'm using is:

Code: Select allvar s:Socket = new Socket("ftp.actechnology.co.uk",21);
var ftp_response:String;
s.addEventListener(ProgressEvent.SOCKET_DATA, receiveReply);
s.addEventListener(IOErrorEvent.IO_ERROR, showError);

[Code].....

why passive mode kills it or has successfully connected to a FTP server with the socket class

View 10 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 :: 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 :: 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 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 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

ActionScript 3.0 :: Binary Socket Policy File On Server

Jan 15, 2009

I am attempting to setup a binary socket connection between flash running on my desktop and a Rabbit RCM3800 Microcontroller providing the server on my home network, which has no file system and has a very basic http server on it. Due to limitations of the microC I cannot run Java/Perl/Python or any other server on it other than setting up a server using its own native Dynamic C language (essentially manually opening and controlling sockets in C). I am able to successfully connect to a socket on port 3333 of the server and transfer information between the server and the .swf file when it is the sandbox type "local-trusted" (while I'm debugging in Flash).

Because of this I'm fairly certain the code to setup the socket between the server and flash works fine. My problem occurs when I try to run the .swf file as "local-with-network" (such as running it after publishing on my desktop) or "remote" (accessing the .swf file when it is located on the server) and it then requires a socket policy server to host a socket policy file on the server. On my server I have code setup such that whenever a socket opens on port 843 or port 3333 (my data port) and sends a stream of raw data containing the request <policy-file-request/>, the server writes back in ASCII the below code and closes the socket.

Code:
Select all<?xml version="1.0"?>
<!DOCTYPE cross-domain-policy SYSTEM "[URL]">
<cross-domain-policy>
<site-control permitted-cross-domain-policies="all"/>
<allow-access-from domain="*" to-ports="*" />
</cross-domain-policy>
[Code] .....

So for some reason flash times out while waiting for the socket policy file. I have tested sending the <policy-request-file/> over telnet, and have received the above policy file. I have also sniffed using wireshark and saw that my desktop sent the policy request and received the policy file. I am guessing that Flash times out because it is waiting for some kind of terminating character that states the end of the policy file, and to that end I have tried sending. Interestingly, instead of sending the policy file I have tried sending random data from the server to flash, and flash displayed the Warning: Ignoring policy file at (URL) due to incorrect syntax. Because I don't receive this warning when I send my policy file I don't think it is formatted incorrectly.

I have also tried using the below flash code to hold the socket request open indefinitely, but it also errors after 20seconds.
Code: Select allSecurity.loadPolicyFile("xmlsocket://192.168.1.59:843");
The .swf file will eventually reside on the server itself at 192.168.1.59/myProg.html. I have only tested the flash file remotely on the server a couple times, and in addition to the previous warnings/errors, I received the warning: SWF from (URL) may not connect to a socket in its own domain without a policy file.

View 1 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.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







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