Php :: Flex - Send A FLV Format Data In ByteArray Using URLloader To A Script?
Dec 15, 2010
Im creating flash game that have the functionality to capture/record its gameplay that can be viewed later by the user, like a replay.
As for now Im already able to record the game and write it into a flv format in a ByteArray variable.
What Im working right now is how to send that ByteArray(the video file) to a php script and save it to a web server.
I've run into the URLLoader in flash where it can send the data and php will receive it thru the POST method. Unfortunately, the ByteArray containing the flv data must be first correclty encoded for php to read it. I figured this out from the example in the net where it does the same thing only that it is only sending a JPEG ByteArray instead of a FLV format using the JPEGENCODER.
Is there any existing class like the JpegEncoder for FLV format or any Video formats? Or any work around like creating the encoder my self?
here is my current code to send the ByteArray
//send byteArray to a php script
var request:URLRequest = new URLRequest(url);
request.method = URLRequestMethod.POST;
[Code]....
View 1 Replies
Similar Posts:
May 19, 2011
i want to know how to send data using the AMF format from my flex AIR project to a socket written in Java. I am getting CorruptedStreamException when sending data using writeUTFBytes() methods. Has anyone experienced similar problems? Also can AMF be used only if i am using LCDS only?
private SimpleServer(int port)
{
System.out.println(">> Starting SimpleServer on port " + port);
[code].....
View 2 Replies
Mar 30, 2012
I have a URLLoader which normally requesting the data to be in Text format, anyway on a specific conditions it might gets a Binary as result, which is actually just 1 integer number in binary format. Anyway the conversation :
[Code]...
doesnt passing anymore since the result data is in text forma due the request header... How to convert the result data into integer ?
View 3 Replies
May 11, 2010
I'm currently working on a small project. The user is supposed to draw/do a puzzle within flash, and also fill out a form with his details and comments.
When clicking the send-button, the image should be sent along with the form as an email.
I already know how to send the image as an email via php, and I know how to send a form as an email via php, BUT - I can't seem to do it together.
I've googled a bit and I found out that I cannot pass both the bytearray (from the image) and the form-data as URLVariables at the same time.
One way I got it to work is by passing the values from the form-data as a part of the URLRequest (and then use $_GET in the .php-file), but this has limitations as it can only pass 100 characters. As the user should be able to comment on his work, using GET with its limitations isn't an option.
View 2 Replies
Jan 25, 2011
I have an AS3 swf which users can upload jpg images to my EC2 instances which sit behind and Elastic Load Balancer. The jpg images are converted into bytearray data and sent using URLLoader.load(URLRequest)I make 2 calls when uploading, one to upload a large version, then another to upload a thumbnail version. A PHP script to which the bytearray data is uploaded converts this to a file using file_put_contents($destination,$GLOBALS["HTTP_RAW_POST_DATA"])Is it possible to combine these two requests into a single request which contains both the bytearray data for the large and thumbnail images and 'split' the HTTP_RAW_POST_DATA to create 2 files at the server. This would be better than uploading the bytearray for the large version then using something like ImageMagick to resize the resulting image into a thumbnail which I realise is another option.
View 1 Replies
Jan 10, 2010
How to send a jpg image as ByteArray from as3 to javescript? And how to convert ByteArray to image in javascript?
View 3 Replies
Sep 4, 2010
in AS3 I'm trying to load a URL (a Yahoo address) into the application so I can process the source code and pull things out of it.However, when I load it, or any other page, I get 0 bytes back.Here's my current code.
private function doSearch():void {
var req:URLRequest = new URLRequest("http://yahoo.com");
var loader:URLLoader = new URLLoader();
[code].....
View 1 Replies
Mar 25, 2010
The data provider (ArrayCollection) for my data grid consists of objects with ByteArray (int) fields. How do I make the data field display as int without transforming my data provider?
View 1 Replies
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
Feb 21, 2011
does anybody have a good explanation of the as operator? On one hand it seems to me, that it is often better to use as instead of instantiating a new object.But then there are situations, when this operator let's me down. For example when loading a text file in XML format through an URLLoader:
private function completeHandler(event:Event):void {
var loader:URLLoader = URLLoader(event.target);
trace("completeHandler: " + loader.data);[code]...
Why do I have to use a constructor here? Why can't I say var x:XML = loader.data as XML; and save some memory?
View 1 Replies
Sep 23, 2011
Who knows how to send a ByteArray to FMS?
View 1 Replies
Dec 3, 2009
Is there are component in Flex where we can display the data in table format. [URL]..
I did not like the look and feel, any other components.
View 2 Replies
May 12, 2011
I am using an mx:DateField in Flex and it works nice with the date picker, but I also need it to be editable, so I set editable="true". The problem is that now the user can enter anything they want - even though I have a formatString="YYYY-MM-DD" set. The date picker honors this format, but if the user enters in the format MM/DD/YYYY they can - or they can even enter garbage data.
I realize I can set up a data validator to check that it is a valid date and in the appropriate format as per the flex docs, but I was hoping to have something I have seen in other languages where the text field would show something like "0000-00-00" and the user clicks in to the field and it allows them to change only the digits (the zeros) and can not type any alpha characters or add/remove any length.
View 2 Replies
Feb 22, 2011
I am retrieving the details from the database and printing them in the XML format. It's working pretty good and can even display the same XML format in the Flex. However, I am not sure, how to save this XML file to give it as a data provider for datagrid.
Here is my JSP code :
<%
ps1 = conn.prepareStatement("select file from file where status='P'");
rs1=ps1.executeQuery();
[Code]....
I am using the following thing to get the details
event.result.body.people.toXMLString();
View 1 Replies
Jan 24, 2010
I have a working code that connects to my server using URLRequest. Now I m trying to make the server work with SSL. When I try to change the address in AS3 to https, i get: Error #2032: Stream Error. URL
I've googled it and found out this is a sendbox issue. I have two questions: 1. I m trying this from Flash CS3 studio. Should that ignore the sendbox restrictions? 2. When I will try this from a swf running in a browser, I can I fix this? using crossdomain.xml?
View 0 Replies
Nov 27, 2010
With URLLoader I can read vars from a file. How can I send the same files , new vars values?
View 3 Replies
Aug 21, 2009
I have a flex data grid. It contains two column Maths Mark and English Mark. If Math Mark >English Mark for any row then it will set that particular row color as Green.
View 1 Replies
Aug 11, 2009
I need to be able to send a bytearray object to a javascript function or a java method, but I was wondering if I could do it using XMLHTTPRequest.
import asfiles.encoding.JPEGEncoder;import flash.display.Bitmap;import flash.display.BitmapData;import flash.external.[code]...
So I have a video that plays stream from a webcam,I will click a button and take a picture. I encode that picture using JPEGEncoder then I store it in a ByteArray.How do I send that data over to either a javascript function or a java class?I don't want to use the navigateToURL (URLRequest) method because that will redirect my page.Is there a way to send the data to a function while still staying on the same page?For example, make a asynchronous call to a javascript function or java method?
View 1 Replies
Dec 18, 2010
I would like to use Flash to send a ByteArray (of a PNG image) to a php file, in a facebook application. Is there a way to do this by sending the ByteArray as just one POST variable instead of as the entirety of the POST data?
There was a nearly identical question here: How can I send a ByteArray (from Flash) and some form data to php? but the problem is different; instead of smuggling other variables in other parts of the request, the image itself has to be sent as just a variable because Facebook commandeers the post data and puts in its own junk.
If not, can I send the image in some form other than a byteArray?
View 2 Replies
Oct 3, 2010
I'm working on a Flash tool that needs to send some data in the form of a flash.utils.ByteArray instance to PHP (amfphp service class) and get that data back from the amfphp service as flash.utils.ByteArray instance. Now I can do all of these with the php_amf extension enabled on the local WAMP server. And the tool works fine. But how can I achieve this without the php_amf extension? I'm deploying on a shared hosting server and I don't have access to the php.ini and also the dl() function of PHP is disabled for security reason. With the extension disabled, I can send the ByteArray instance to PHP and save the data to DB. But the problem arises when I try to retrieve the data from DB, create a ByteArray instance (amfphp helper class) with the data and send back to Flash. I'm guessing here that proper AMF message is not being constructed because of the absence of the php_amf extension.
View 1 Replies
Apr 12, 2010
I am new beginner, is it possible the covert flex data grid to CSV file format with out use any backend (java,php ..) file?. Because I tried with out use bankend. is it convert or not?
View 1 Replies
May 25, 2011
Is there a way for different flex swf's to send large blocks of data between each other without using localconnection which is size limited or using sharedobjects. This needs to happen on the client without server communication.
View 2 Replies
Sep 24, 2009
have used the code from to send xml data to php...I don't know y i am having problem acessing data in php.
View 2 Replies
Jan 1, 2010
I'm trying to get some data from PHP/MySQL and send it to Flex..Let's say That my object in Flex would look like this:
package some.package.VO {
[RemoteClass(alias="VOPerson")]
[Bindable]
public class VOPerson {
[code]....
In my case, personDetails is an Array, and in theory, it could be some other object... But is it really necessary to make it an object? I do not intend to use that data nowhere else except within my VOPerson class. It is some associative array, and I can easily transform it to another object, but there will be lots of similar situations in my app, so I would like to avoid making unnecessary (value) objects if there is no need for it...
View 1 Replies
Aug 5, 2010
I want to save a screenshot from my Flex app on the Webserver (LAMP). Here is the Flex code:
[Code]...
View 1 Replies
Jun 2, 2010
I'm trying to send some data to PHP using HTTPService POST but for some reason it's not working. The same example works with GET but not with POST:
private function start():void{
var param:Object = {};
param.date = "2010-10-10";
[code]....
But when I change the method in HTTPService to GET and in PHP I get the result as expected - PHP sends back the date:
2010-10-10
View 1 Replies
Jan 27, 2009
im calling a module in my flex app, but i need to send it a variable and have no idea how this is done (both sending the variable and then the module retrieving it)...basically, the module generates a tree which gathers data from a PHP-generated XML...so I need the data that is sent to the module to be sent to the PHP file to show the details depending on which page the user is on.
Code:
<mx:ModuleLoader url="lists.swf" width="30%" height="100%" />
just a thought, if I were to add "?id=3" to the SWF, would that work and how would I retrieve that value in the module to use?
View 1 Replies
Feb 22, 2010
I have a login page (that working), if details is correct, i want to go to welcome page, and display the first name and last of the user.
Is ok to access to the label in the another page, and how can i do that
This is my code:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
[Code]....
View 1 Replies
Mar 11, 2004
I searched around and found some helpful things, but I am still missing something I think...
LoadVariables() won't work across domains, right, so, is it porrible to send data to a CGI script via getURL and not have a popup window on send?
View 3 Replies
Jul 31, 2009
I using Google calendar AS3 api for a project. I am sending a normal date but the api uses the utcdate format and thus my time interval changes. How can I send the date in utc format?
View 1 Replies