ActionScript 3.0 :: Send ByteArray To Flash Without Using Php_amf Extension
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
Similar Posts:
Sep 23, 2011
Who knows how to send a ByteArray to FMS?
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
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
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
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
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
Feb 16, 2011
I am working on a game, made with Flash (using AS3) The game has a fast ball and when this ball hits an object it has to make a sound... but the sound starts with delay (so the ball is far away when the sound is played).This sound is edited by me and it hasn't got any silences at the beginning.The method i'm currently using is the simplest one:
public var sonidoPuntos1:sonidopunto1 = new sonidopunto1()
and then...
sonidoPuntos1.play()
I am trying to introduce the file into a ByteArray and then playing it from there...
View 2 Replies
Mar 28, 2011
I know its a true Pain but does anyone know any way to convert wav ByteArray to mp3 ByteArray.
View 1 Replies
Nov 16, 2010
I'm looking to send a list of variables (say 6 in total) from php to flash and for flash to pick a random one and send it back to php when clicking a button.
I would like it to appear in a dynamic text box. That randomly selected variable needs to be sent back to php on pressing a button.
View 2 Replies
Nov 16, 2010
I'm looking to send a list of variables (say 6 in total) from php to flash and for flash to pick a random one and send it back to php when clicking a button. I would like it to appear in a dynamic text box. That randomly selected variable needs to be sent back to php on pressing a button.
View 6 Replies
Jan 13, 2012
i have an error that i dont understand why appear, the most weird is that happens sometimes but lately happens always, the code that i use is the same and i dont have make any changes to it, in fact i dont execute any code in the start of the application, i use buttons , so i dont get a reason with this error please help me, the error is a dialog that say:Native extension Error: there are packaging errors/warning. Check each native extension in the Flex Build Packaging Page for each target platform. would you like to continue?And when i click yes the program dont start, the debbuger show me the line:
[code]...
View 1 Replies
Oct 10, 2009
Is there an extension or mod available to allow Flash CS3 have bracket highlighting? I just think it would be very useful and save split seconds of confusion.
View 1 Replies
Aug 31, 2004
I just download from macromedia exchange this extension for flash, and all ready have a headache
can you see where my problem is: (i get the "undefined" message all the time)
[Code]...
View 2 Replies
Sep 20, 2011
Is there a drawing board in Flash Professional CS 5.5 installed or an extension? I want to use it to display a text string, and the user would be able to draw above the text. For example I could display a question and the user would be able to circle the right answer. Is it possible?
View 1 Replies
Oct 5, 2004
Is it possible to edit the .mxp-files that you install with the extension manager? The extension I have in mind is an API with some functions that need to be tweaked.
View 5 Replies
Oct 5, 2004
Is it possible (and if so, how?) to edit the .mxp-files that you install with the extension manager? The extension I have in mind is an API with some functions that need to be tweaked.
View 5 Replies
May 21, 2011
We used Flex to build the web app below. It lets the user build an interactive activity and click "Publish as Flash" to save a SWF file on their local computer.http:[url].........
Problem: When saving the file, the "Save As Filetype" drop down is empty and end users can accidentally delete the swf file extension in the filename.How can we lock down the extension so it will always have SWF in the extension?
Technique 1? Set "Save As Filetype" to SWF by default.
Technique 2? Click "Publish as Flash".User specifies the filename.File is saved on the server. User presented with prompt to download file. File is downloaded from the server using the traditional browser windows explorer dialog box (the same dialog box if I downloaded a program from cnet's [url]...........)
View 2 Replies
Dec 22, 2010
Possible Duplicate: losing extension when use FileReference download I'm having an issue that looks common when using the FileReference class in FP10 when saving a file. The whole thing works fine as long as I don't change the default filename. If I do, then I loose the extension of the file... which is annoying >_< I haven't found any "acceptable" workaround, but the posts I've seen are from a couple of months already. So I'm inquiring hoping that something's been done regarding this issue since then =)
View 1 Replies
Jan 9, 2008
i've got a pic gallery from kirupa which i modified a bit.I've added a download button with filereference. The thing is everthing works when the download button is pressed.But if somebody wants to download a picture and wants to change the name the file isn't recognised because the extension is lost.Flash doesnt read after the dot (example .jpg). If you dont change the name of the file which you save it keeps its extension.
here's my code for the download and the link
Code:
/////////////////////////////////////
// DOWNLOAD CODE
import flash.net.FileReference;[code]....
ive tried to put it like this but it doesnt work
Code:
function downloadPICT(){
fileRef.download(url+download[p]+".jpg");
}
PS download[p] is read from an XML file its the link to the downloadfile, which looks like this
Code:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images titel="DJ CHUCKIE" omschrijving="HEINEKEN FULL MOON PARTY" datum="VRIJDAG 5 JANUARI">
<pic>[code].......
View 2 Replies
Jul 1, 2011
I'm wondering what the process would be for importing the filenames of songs minus the .mp3 extension into Flash would be? I want to import the filenames, and then create a for loop that goes through and adds some html tags to each name, and eventually I'll spit out a text file of it all for me to copy and import into a search function on a webpage. I think I can work through the latter, but I was wondering how to originally import the filenames into a swf?
View 5 Replies
Jul 8, 2010
I'm using FlowPlayer to replace an existing FLV player on my site that plays videos from Amazon E3. I have many pages and each should show a different video. For each page, I have a value stored in my CMS that is the "streamName". The stream name corresponds to a flashvars paramenter in the object/embed tags that show the video player:&streamName=my-great-video
On my new player, I'm able to get the video using a URL similar to [URL] How Does Flash (or Amazon???) know to add in the .swf extension? There are several video formats used on the site, and the current player works with them all... But, as I mentioned above, on each page the value store for the video (ex="my-great-video") includes no extension.
View 1 Replies
Apr 29, 2011
I'm working on a Google Chrome extension that monitors mouse events. For some reason the following javascript code in the extension's content script is causing embedded Flash content to break:
[Code]...
If you mousedown inside a Flash element, it never registers the mouseup and it appears as though you're still holding your mouse button down even though you've let go. At first I thought it was some kind of event bubbling issue, that this method was swallowing the event, so I tried returning true (and false for that matter) but it didn't seem to have any effect.
View 1 Replies
Feb 20, 2012
how to best handle the issue of not having enough permission inside of a Google Chrome Extension. I am interacting with the YouTube API, but I am not using swfobject.js, just using am embdeeded div. I do not believe this is introducing my security issue, but perhaps it is. In development, I had to navigate to Adobe's flash player security page and designate my development folder as a 'safe' location. In deployment, I do not have the ability to do this. I do not want my users to have to click 'Allow All' on flash player security, but I do not see another way to achieve my results.Seems to be a duplicate of SWFobject in a Chrome Extension - API Unavaiable but remains unanswered.Source: https:[url].....
To run: Pull from the repo, load up Chrome, click the wrench, go to extension, check 'Developer Tools' -> Load Unpacked Extension and browse to the folder.
View 1 Replies
Mar 22, 2011
The BLOB field (pic) is turning out as 0 Bytes when trying to send ByteArray through as3 to PHP, so i assume the PHP script or the HTTP_RAW_POST_DATA isn't working.I think the Flash part is working, I have set a trace() to see if the bitmapdata is coming through and it seems it is, so I'm assuming its my php side.3
private function export():void
{
var bmd:BitmapData = new BitmapData(600, 290);
[code].....
View 2 Replies
Mar 13, 2010
How to save ByteArray to HardDrive from Flash swf?
So... I have a generated if flash ByteArray Now I want to save it to Hard Drive.
View 2 Replies
Mar 27, 2011
The complied SWF is not showing the preloader until the whole SWF completely loaded.
View 1 Replies
May 25, 2011
I have to convert a MovieClip to ByteArray and send it to php using the POST method. The person handling php says that only ByteArray needs to be send and conversion to JPG and PNG can be done from PHP side. When I built the option for saving on the local machine the following steps were used.
Converting to Bitmapdata
Using JPGEncoder and PNGEncoder on the Bitmapdata
Then assiging to byte array variable.
So in this case different byte arrays were used for saving in case of JPG and PNG and it worked.
I found the code to convert movieclip to bytearray in Stackoverflow itself
[Code]...
View 1 Replies
Oct 3, 2011
What is the simpliest way to find an occurance of some sequance of bytes (string) in a long byte array?
UPD: I tried to do
my_byte_array.toString().indexOf(needle_string);
the problem is that in flash/air string consist of utf8 characters, so indexOf will return value different from offset of "string" in a byte array (actually it's zip archive)
View 2 Replies