ActionScript 3.0 :: Sending Image Through Socket

Jan 15, 2009

I'm loading a small portion (rectangle), of a png file and extracting the ARGB (Alpha, Red, Green, Blue) values of the bitmapdata using C#. I then send this bytearray to the flash player (using sockets). The flash player receives this as a ByteArray. I then use LoadBytes but it gives me the error "unknown file type". I'm guessing that it could be because the data is not png encoded (I don't know how to do it), and loadBytes requires that.

View 6 Replies


Similar Posts:


Actionscript 3 :: Sending Images Via Socket?

Feb 29, 2012

I'm trying to send an image via a socket in as3 between two AIR applications that I made. It works fine with small images, but with the bigger ones, it gives me this error: "Error #2044: Unhandled IOErrorEvent:.text=Error #2124: Loaded file is an unknown type.". It repeats it several times, so I thought that the image might be cut to smaller ones, is that right? And if it is right, how to restore it??

View 1 Replies

ActionScript 3.0 :: XML Socket - Sending Video To Server

Feb 19, 2010

I'm working on a small school project, and I'm grabbing video from my webcam like this:

camera = Camera.getCamera();
if (camera == null) {
Security.showSettings(SecurityPanel.CAMERA);
} else {
camera.setMode(960, 600, 30, true);
camera.setQuality(0, 100);
outgoingVideo = new Video();
[Code] .....

And I would like to now send this video to a server I am connected to using an XMLSocket. Is this possible?

View 1 Replies

Actionscript 3.0 :: Socket Isn't Sending Any Data After The Connect?

Feb 24, 2009

I'm tring to write an instant messager implementation, but i got a problem with the initial socket connection.I need to send a GET request with some parameters to a server and it will reply with a seed number message server IP.

Code: Select allvar socket:Socket = new Socket("appmsg.gadu-gadu.pl", 80);
var response:String = new String;
var request:String = new String;[code]......

why the socket isn't sending any data after the connect,i also wrote a small pop3 client and it works fine.

View 1 Replies

ActionScript 3.0 :: Socket Connection - Sending Data Without Any Errors?

Mar 18, 2009

I use a socket connection to share data between flash and VB. I check the connection in VB and send a message when my flash is connected. My VB tool then sends the data continuesly (about every 40 milliseconds or slower) to flash. Works fine. Now I have to send some data back from flash to VB. I can send the data without any errors in Flash but it never arrives in VB.

View 3 Replies

ActionScript 3.0 :: Flash.net.Socket Sending But Never Receiving Data?

Jul 20, 2011

I'm trying to make a barebones, simple flash client communicate ANYTHING to a server over a regular socket. I setup the listeners:

socket = new Socket();   socket.addEventListener(Event.CLOSE, closed); socket.addEventListener (DataEvent.DATA, onSocketData); socket.addEventListener(Event.CONNECT, connected); socket.addEventListener(

[code].....

View 1 Replies

Actionscript 3 :: Sending '@' (at Sign) Character Socket For FTP Login

Nov 8, 2011

I'm trying to create a FTP Client in AS3.It works well with almost all my ftp hosts, but I'm not able to login in hosts in wich I have an "@" (at commercial) character inside the username.It seems a character encoding error.[code]but I'd never got a 331 response (Username Accepted) from the FTP server.i tried replacing '@' char with '%40' or '+' without success.

View 1 Replies

ActionScript 3.0 :: Socket Sending Policy-file-request Twice?

Dec 8, 2009

Running my Flash app from localhost (in debug) I can connect/contact the socket server just fine. Note: It doesn't seem as though the server detects any 843 connection (e.g. the policy file port) this way. However, when I move the app to the server itself and run it from there (i.e. from the website), it will send the policy file, get a disconnect (as it should), and then try to execute the regular port stuff but doesn't read anything from Flash. It seems like my Flash app isn't writing to the port as it should, or something else is going wrong. I did also notice that Flash seems to be trying to send the policy-file-request twice.My process right now is like this:

1) Flash tries to connect to port 843. The server responds to its <policy-file-request/> with the policy file.

2) Flash reads it, disconnects from 843

3) Server gets graceful disconnect, then gets another connection on 843.

4) Just after that, the server gets a connection on 2188, but reads another <policy-file-request/>, so sends the policy file again.

5) At this point, Flash SHOULD simply write the string "Test" to the socket (that's in my connect handler). However, my server doesn't seem to read anything on the socket after the second <policy-file-request/>.[code]

View 1 Replies

Flex :: Sending Character Zero "&#65533;" Over Binary Socket?

Feb 19, 2009

This code doesn't send the trailing null byte. How do I send the trailing null?

Socket.writeUTFBytes('Hello World');
Socket.flush();

View 4 Replies

Actionscript 3 :: Sending Character Zero "" Over Binary Socket In Flex

Feb 4, 2010

This code doesn't send the trailing null byte. How do I send the trailing null?

[Code]...

View 3 Replies

ActionScript 3.0 :: Image Sequence Through A Socket To NetStream?

Jan 15, 2009

I am trying to send a sequence of images through a socket to a swf and have those images play in succession (like video) to clients in the browser. I am able to get a java socket to send image data to a binary socket in AS3, but I don't know how to turn that into a valid image in Actionscript and redirect that to a netstream or netconnection. Is this possible or does anyone have an example? You can do something similar with a custom plugin on wowza, but I'm not sure how to make it happen with FMS (or Wowza for that matter)

View 0 Replies

Actionscript 3 :: Socket.readInt() And C# Socket.Send() Different Values Of Int-variable?

Nov 19, 2011

When I send number (int)52 s.Send(BitConverter.GetBytes((int)872415232));, flash show me trace(socket.readInt()); 872415232 If i send 872415232, flash show 52.Why? And how it fix?

View 1 Replies

Php :: Sending Image Data From Flash To GD?

Oct 26, 2010

If i send bitmap data from Flash AS3, to PHP and then PHP turns the bitmap data into a image file and saves on server... Would it take too much resources?I mean, The Bitmap Data could contain too much pixels etc does that affect the resources? If 10-100 people send data simultaneously is it going to cause problems.

View 3 Replies

Sending Image (Screenshot Of Stage) By Email

Sep 5, 2009

I would like to take a "screenshot" of the stage within flash and send it as an image by email. I have tried AMFPHP and the method described here - [URL]. This is saving a jpg of a movie on the server, but no email function. I know how to setup a very simple php email file but without attachment. So my problem is I have no idea how to "connect" all those parts together and make it so that when you click the button in flash it'll send the jpg by email directly.

View 2 Replies

Flex :: AIR: Sending Email With Embedded Image?

May 22, 2009

I'm making a Flex AIR application that will produce a giftcard from a webcam picture. This giftcard needs to be sent in an e-mail to a recipient provided in the program. Should I upload the picture to a server and use php to send the mail?

View 2 Replies

Asp.net :: Sending Captured Image From Flash To Page

Mar 27, 2012

I am using Asp.net/C# in my application , I am using a .swf file which is placed on my Default.aspx page to capture images from webcam, I have a requirement that the captured image should be sent to server or aspx page without storing it on the clients machine,

View 1 Replies

ActionScript 3.0 :: Sending The Code For Image Compression

May 4, 2010

sending the code for image compression.

View 2 Replies

ActionScript 2.0 :: Sending Image To Server Using LoadVars

Oct 20, 2009

I need to send a image to PHP (server) and get it in my mail. Sending using LoadVars.
Code:
import flash.display.BitmapData;
var bmd:BitmapData = new BitmapData(20,20,false,0x00ffff);
var output:String = bmd.getPixel(1,1).toString(16);
trace(output);
while (output.length<6){
output = "0"+output;
[Code] .....

View 2 Replies

ActionScript 2.0 :: Christmas Postcard . Sending Dynamic Image By Mail?

Nov 21, 2009

doing one christmas postcard in flash that works this way:We drag some elements to a scenario and when we finish we send the image that we made to our friends and invite them to make one.This as been done hundred times but I can't find this tutorial online, I guess Im not making the right search.My problem is the part when you send the message with the dynamic image the user has done.

View 2 Replies

ActionScript 3.0 :: Christmas Postcard - Sending Dynamic Image By Mail

Nov 21, 2009

I'm doing one christmas postcard in flash that works this way: We drag some elements to a scenario and when we finish we send the image that we made to our friends and invite them to make one. This as been done hundred times but I can't find this tutorial online, I guess I'm not making the right search. My problem is the part when you send the message with the dynamic image the user has done. I'm posting this on AS2 and AS3 forums,

View 2 Replies

ActionScript 3.0 :: Sending Current Sprite To Loader Function For Image Gallery?

Nov 30, 2010

I have set up a functioning xml image gallery with simple left and right arrows. I am now trying to make it an infinite looping gallery swapping the first and last sprites in an array and + and - their x value so they "physically" move in the photos container.

All of this works fine except for the actual loaded image. The xml data, name description, and image to be loaded are set up in one function and all the data is added to the sPhotoSprite (sprite) in this function. This All works perfectly..

A second function is then called to add the current image:

var currentImage:Loader = Loader(evt.target.loader);
then currentSprite.addChild(currentImage); (the sprite is declared at the start)

The problem being that the sPhotosSprite is no longer reference-able. I've tried :

imageLoader.contentLoaderInfo.addEventListener(Eve nt.COMPLETE, function( evt:Event)
{ imageLoaded( evt, sPhotosSprite )
} );

But this only ever returns the final sprite. The same problem of only ever returning the final sprite occurs when I try setting an external sprite to hold the current sprite in it and then referencing it in the second function.

View 1 Replies

ActionScript 3.0 :: Verify Image File Path Before Sending It To URLRequest/URLLoader?

Feb 12, 2011

is there a way to verify that an image file exists at the stated URL before passing that URL to various URLmethods?

View 0 Replies

Flex :: Actionscript 3 - Flex Socket And Erlang Socket Communication

Jun 29, 2011

I'm creating a client-server game. My client is a flex based game, and my server is erlang server. At the beginning, when I test directly my flex client in flash player, I can establish a connection easily to my erlang server through socket connection. And both can exchange data with no problem. The problem rise when I deploy my flex app at Apache http server, and running it using a browser by calling [URL] my flex socket sends message requesting for a crossdomain policy to my erlang server. So I create an xml message that represent a crossdomain policy, and send it back to my flex app as a response for that request.

Yet still I can't establish any permanent socket connection between my flex client and my erlang server. I know this because I add listener on my flex socket that will modify its internal state to CONNECTED, if a connection between client-server has established.

View 2 Replies

Javascript :: JavaScript Socket Vs Flash Socket?

Apr 30, 2010

Steve Jobs just posted this article on why Apple rejects Flash... [URL] I agree that javascript and css can be used to replicate some of Flash's animation, though Flash does all sorts of scaling and tweening that is incredibly powerful, and I'm not sure that there's anything comparable in javascript, if there is, I certainly haven't seen it.

However, my question is about the socket. Flash has an incredibly powerful openSocket class that allows you to connect to a server and have the server and the client talk back and forth to one another. As far as I know there is no equivalent class in Javascript. Am I mistaken? Is there some secret mystery Ajax class that replicates the openSocket? If not, then that feature alone makes Flash an invaluable tool.

View 1 Replies

Port 80 Socket Limitation?

Jun 28, 2009

I don't need to deploy an HTTP server and all the connections are made on port 80, the default HTTP port, which is generally not blocked by firewall.Unfortunatly at the end of my work I realized that the flash socket component has some limitation on using port 80.[URL]As nobody is interested by this report, I now think that this limitation is done on purpose by Adobe. I don't know exactly why, may be to force to use their data service product.

I can understand that. But what I am hangry about is that nowhere in the documentation of the socket component there is an information about this limitation. I guess lot of people lost time trying to reach an unreachable goal ! And most of the time you find the problem at the end of the work because local connection is working ok on port 80.

View 1 Replies

Actionscript 3 :: Socket Error - Sometimes?

Sep 5, 2010

I have this Socket (not XMLSocket, just Socket) client. I also have a custom PHP script on my server, that listens on port X. My client tries to connect to it.Everything works fine, the security and communication, sync and whatever else. But - the Flash Player (AIR runtime actually) shoots an error when trying to connect, but ONLY when the server is not running... the error is actually handled by try catch (IOError), and even weirder, the line that is specified in the output as the error line is the line where I just CREATE the Socket...?

Output:

Error #2044: Unhandled IOErrorEvent:. text=Error #2031: Socket Error.
at ---.server::Client()[/DevProjects/Libs/ASLibs/---/server/Client.as:167]
at Function/<anonymous>()[---_fla.MainTimeline::frame1:430][code].....

when I comment out the line where I actually connect using Sock.connect(...) - it does not throw the error, but it obviously does not work... Also, the connect part is also in try catch (IOError) block...

View 1 Replies

AS3 :: C# - Socket / Server MMO Communication

Nov 27, 2010

I'm working on a flash MMO with a c# server. I have a simple messaging protocol for the sockets. When a client joins he sends out this:

[Code]...

View 2 Replies

Flash :: Cant Connect AIR App To Socket.io?

Oct 8, 2011

I'm trying to connect an AIR application to socket.io, it's just not working.

[Code]...

View 1 Replies

AS3 :: Know When A Socket Has No More Data To Return?

Oct 21, 2011

I am trying to communicate using this protocol. It works fine except when the socket has a lot of data to return. Right now I am checking if a packet ends with to determine if I have received all the packages. Problem is that sometimes a package can end with as a line break even if it is not the last package, so I can not use that.

I am using a command queue, because I want to wait for a complete response before sending the next command.

The code with unnecessary stuff removed:

class CustomSocket extends Socket
{
private var _response:String;
private var _commandQueue:Array;

[Code]....

The problem is in the function readResponse. I've googled a lot without finding anything of interest.

Is there a way to know the total amount of bytes/packets a socket will return? Or a way to detect EOF or that a package is the last?

View 2 Replies

ActionScript 3.0 :: Receiving Socket Messages?

May 25, 2010

I am currently working on a project that involves using sockets. I am using Flash CS5 and AIR2.0. I am also using another program that will be acting as the socket server (Esperient Creator).I have successfully SENT socket commands from my AIR app to the server.What I need to do is RECEIVE socket commands within my AIR app from the server program. I read somewhere that this was a new feature for AIR 2.0. If anyone has any insight on how to get this to work.

View 1 Replies







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