ActionScript 3.0 :: Saving BitmapData To Server As JPG

Jun 29, 2010

I'm trying to write a contest where the user can paint an outlined image I provide, and then submit it. I want it to then save the image on my server with properties so I can tell who submitted it. They will be asked to input these values of course. I looked into the JPGEncoder but could only find examples for downloading the image directly. Is there an easier way to do a contest like this? I'd rather not have them have to save the image locally and then e-mail it, as this is geared towards kids and I don't want it to be confusing.

View 2 Replies


Similar Posts:


Php :: Saving Bitmapdata To Server And Getting Filename Back?

Jun 16, 2011

Here's what I am trying to accomplish. I have a BitmapData that I am sending to a PHP function as ByteArray on the server by using URLRequest. The PHP function then saves the ByteArray as a jpg. All is well, so far and I am able to save the image on the server. Where I am stuck is that the PHP function generates the image file name randomly and I have no clue on how to get the name of the file I have just saved on the server. I am using the below code to send byteArray to the PHP function. How to modify/add this so I can get the filename of the image once it's saved on the server?

var myHeader:URLRequestHeader = new URLRequestHeader("Content-type","application/octet-stream");
var myReqst:URLRequest = new URLRequest(path);

[Code]....

View 1 Replies

ActionScript 3.0 :: Saving BitmapData Withing Bounds?

Feb 15, 2009

So I am trying to save a screenshot using JPGEncoder while in full screen mode. The document size is 100x700, and the stage is aligned to bottom. I've been able to capture the right size, however it always seems to capturing the image from the wrong start x,y position. There is some elements out of bound but I am just trying to clip them.

Here was last attempt :

Code:
stage.quality=StageQuality.HIGH;
stage.align=StageAlign.BOTTOM;
StageScaleMode.NO_SCALE;

[Code]....

View 2 Replies

ActionScript 3.0 :: Saving BitmapData In Image Component And Clear Canvas

Feb 10, 2009

I made a program in Flex that uses the actionscript 3 drawing api. I am drawing on a Canvas and on every mouseUp event I save the bitmapData in an Image component and clear the the Canvas. That works great, but the problem appears if I want to add a background to the paint that was drawn.

Here are the mxml components:
Code:
<mx:Canvas id="_backgroundColor" width="100%" height="100%" x="0" y="0" />
<mx:Image id="_image" x="0" y="0" mouseEnabled="false" />
<mx:Canvas id="_paper" x="0" y="0" />

And here it is the function I have on the Canvas (_paper) mouseUp
Code:
private function onSaveModifications(evt:PaperEvents):void{
var bmpData:BitmapData = new BitmapData(this._paper.width,this._paper.height,true,0x00FFFFFF);
bmpData.draw(this._paper);
this._image.source = new Bitmap(bmpData);
this._paper.graphics.clear()
}

I want when I set the _background Canvas background color to see it, but I cannot because the Image component(_image) where I save the bitmap is masking it.

This is how I set the background
Code:
this._background.setStyle("backgroundColor",0xff0000)
Do you know how can I make the pixels of the bitmap that weren't drawn to be transparent?

View 2 Replies

ActionScript 3.0 :: Saving XML To The Server?

Dec 21, 2009

Im trying to save an xml file in the server, Im using the code of AS3 book. and here is the code as3 and php ,that suppositly save an xml file on the serve. but it dont work. i set te permition of the folder to 777  to allow writting. well i look at evrything and dont find the probleme at the error message it give :An error occurred when attempting to load the XML.Error #2032 (but it come from the book, it should work)?

[Code]....

View 6 Replies

Php :: Flex In Saving PDF At Server?

Jul 8, 2009

I am a new bee to flex. what i am trying to do is to generate and save the layout design which nothing but canvas to a pdf format at the server. Currently i am able to display the pdf in browser (see the function below:) but cannot save the file at the server.

private function continueToPdf():void{
myPDF = new PDF( Orientation.LANDSCAPE, Unit.MM, Size.A4 );
myPDF.setDisplayMode ( Display.FULL_WIDTH );
myPDF.addPage();

[Code]...

View 2 Replies

ActionScript 3.0 :: Saving Xml To Server

Nov 30, 2009

I have created an xml driven application with which the client is very happy. They currently use notepad/dw to create the xml files. They now want a "form" of some description to create the xml file to avoid writing tags and so on. I have had a good look around. There is some info about creating the xml itself in as3 (looks pretty easy), but very little about how to save that file to the clients server. I gather that the flash doesn't do this for security reasons?

My question is really this: would i be better using php to create the form for my user rather than flash as3. Or is it better to create in as3 and then append a little php to upload the doc? Or am I going abouit this the wrong way!

View 2 Replies

Professional :: Saving Data To Server Via SWF?

Jul 26, 2010

I have in mind a very basic swf file that allows someone to enter data (via dynamic text box), submit this data (via php), which in turns saves it as a file on the Server. This file (.txt) would be used to populate text on the main site. Most of this seems quite straight forward, and standard practice, apart from actually saving the data as a particular file and on the server (or overriding an existing file), which I'm sure comes up against problems such as FTP access and everything else, but I was wondering if someone might have an insight on how this could be done?

View 3 Replies

ActionScript 3.0 :: Saving Bytearray To Server As A Zip

Oct 22, 2009

I trying to save an byteArray to the server as an zip using nochump AS3 Zip Library (URL..). I'll belive I'm quite near with the as stuff, but can't figure out how the php handles the byteArray.[code]

View 1 Replies

ActionScript 3.0 :: Saving Masked Image To Server?

Apr 6, 2009

change the following php/AS3 to make it save the dynamically created masked image to the server instead of offering it for download? You have to pass it variables from the as3 AT THE BOTTOM OF THIS POST...

PHP -
<?php
if(isset($_FILES['Filedata'])) { // basically if file data exists to actually upload.

[Code]......

View 9 Replies

ActionScript 3.0 :: Saving Dynamically Changed Swf Over A Server?

May 22, 2010

Say I have a webpage where a user enters their name and it is displayed to them on a swf. If I have a save button, how could they save their dynamically changed swf to their computer, with their name on it?

Bare in mind that if a normal save is completed, they will only be saving the swf on my server. Somehow, something needs to happen to get them to save the swf with thei name on it, as saving a dynamic swf is not possible in as3 (I dont think)

View 3 Replies

ActionScript 1/2 :: Saving Image To Server From Stand Alone SWF Using PHP?

Jan 12, 2010

I built an information terminal for the shop of a friend of mine which uns as fullscreen application.On this terminal the swf file is running as a stand alone file by unsing the flash player directly.I want to save a snapshot (jpg) from a webcam if someboy presses a button.This does work as long as I run my application (swf) by using the browser (Firefox , Apache and localhost).But if I try to use it as it should be used no image is beeing created.
 
There was an error when first testing the application which forwarded me to an Adobe site where I had the possibility to grant files permissions, which I did for the file (the SWF) that needed it.Did I do something wrong, or is there some permission thet I have to grant before it works as it should be?

View 1 Replies

Flex - Saving Images From Flash To Server Using PHP

Sep 29, 2010

I am trying to save some images from Flash to Php by sending a jpgstream, capturing it in php and pushing it to a file. Not sure what I am doing wrong here.

I am putting all the images I need into an array like so: (history is just where I am keeping all the image data)

[Code]...

But this doesn't seem to do the trick. I have been going through a bunch of different tutes and code snippets, so maybe I just ogt something confused along the way. I have done this before though and don't remember it being this difficult.

View 2 Replies

Actionscript 3 :: Saving Image From Flash On Server Under Different Name

Mar 25, 2011

I followed this question:flash Actionscript 3 and php image upload.I copied the code:[code]It works great, I just need to know how to save the image under a specific name, how do I pass an argument to the php script? or is that not necessary, can I change it before calling the script?How would I then call URLrequest to show user the file he uploaded ?

View 1 Replies

ActionScript 3.0 :: PNGEncoder - Saving Image Onto Server

Dec 23, 2010

I am struggling to encode and then save a png image onto the server. The file 'myImage.png' gets saved onto the server but it is 0kb.

My actionscript is:
import com.adobe.images.PNGEncoder;
import flash.display.BitmapData;
import flash.utils.ByteArray;
// Go to PHP Page.//
bitmap_btn.addEventListener(MouseEvent.CLICK, gotoPHP);
function gotoPHP(event:Event):void {
[Code] .....

View 2 Replies

ActionScript 2.0 :: Saving Swf Contents As Image To Server?

Nov 25, 2003

way to have a specific portion of the stage save as a .jpg to the server.

So, if a user were to draw something, and click a "save" button, they would be able to save their drawing to the server as a jpg.

View 2 Replies

ActionScript 3.0 :: Saving Game Data To The Server?

Jul 22, 2009

I am working on an educational game that requires the user to enter their username and password in order to retrieve their saved game data. I know how to do this locally using the sharedObject class but I do not really understand how to do this remotely on the server. I thought maybe using remote shared objects would work but it looks to me like that only works with a flash server and data can be changed by anyone.

View 3 Replies

AS3 :: Flash - Upload BitmapData To A Server?

Jan 13, 2012

I have bitmapData. I want to upload it to a server using URLLoader. I tried many ways, but with no result.This is my current code in ActionScript 3:

import flash.net.URLLoader;
import flash.net.URLRequest;
import mx.graphics.codec.JPEGEncoder;

[code].....

View 3 Replies

ActionScript 3.0 :: Upload Bitmapdata To Php Server?

Sep 17, 2005

I am having a bit of problem uploading bitmapdata which i have taken with my webcam onto my php server..the code i have so far:

public function browse(event:MouseEvent) {
var header:URLRequestHeader=new URLRequestHeader("Content-type","application/octet-stream");
var jpgURLRequest:URLRequest=new URLRequest("url");

[code]....

Im getting this error:

ArgumentError: Error #2127: FileReference POST data cannot be type ByteArray.
at flash.net::FileReference/upload()
at Source/browse()

View 1 Replies

ActionScript 3.0 :: Upload Bitmapdata To Php Server

Jan 24, 2012

I am having a bit of problem uploading bitmapdata which i have taken with my webcam onto my php server.. the code i have so far:

[Code]...

View 1 Replies

Media Server :: Saving Stream In Custm Path?

Nov 4, 2010

I developed a video recording application using Flash with Red5 .
 
It records the stream and saves atha in webapps folder. But i want to save that in custom directry?
 
Is it possible to mention the path inside the flash code? I tried out this code ... but it throws error saying bad name....
 
ns.publish(videoName,"http://mysite/video/record");
  
steps to change recording path of the streams.

View 1 Replies

PHP :: Upload Photo To Facebook Album Without Saving On Server?

Mar 12, 2010

I'm using CURL to upload files to a service. Currently I'm getting the file content with $GLOBALS["HTTP_RAW_POST_DATA"] then save it on my server. After that, I'm using CURLOPT_POSTFIELDS with the file's full path. Is there a way to send the file content directly, without saving it on my server, as if I saved it? Or is there a way to upload a Photo from a flash app to facebook album, without saving it on the server?

View 1 Replies

ActionScript 2.0 :: Saving A Screenshot Of SWF Without Any Server Side Functionalities?

Nov 2, 2009

how I can save a screenshot of a SWF. All the examples I found requires some form of PHP scripts and some action on the server side.I am doing a simple program where at the end, the players will be awarded a certificate and they have to be able to save it on their desktop. This program is to be run on a cd-rom or off a local hard disk, thus it must not involve any server side actions.

View 2 Replies

ActionScript 2.0 :: Upload BitmapData To (local) Server?

Mar 19, 2009

I have a webcam script that takes screenshot when you click the snapshot button. Now I would like people to have another button to upload their photo on the server. How can this be done?

import flash.display.BitmapData;
mycam = Camera.get();
vid.attachVideo(mycam);// vid is videoobject on stage
bitmapData = new BitmapData(160, 120, true, 0);

[Code].....

View 1 Replies

Php :: Why Is The Bitmapdata Not Posted To Server Side With Flash

Jul 3, 2010

Here is the code I used to post the bitmapdata to server side(PHP):

private function savePicToServer(bmpData:BitmapData):void
{
trace("in savePicToServer");
trace(bmpData);

[code].....

Finally the trace output is :

in savePicToServer
[object BitmapData]
finish savePicToServer

View 1 Replies

Php :: MySQL Or XML: Saving User Votes On Server From A Flash Movie?

Nov 21, 2009

A project of mine involves a flash movie (.swf) in a webpage, where the user has to pick from a number of items, and has the option to thumbs up or thumbs down (vote on) each item.So far I have gotten this to work during each run of the application, as it is currently loading the data from an XML file - and the data is still static at the moment.I need to persist these votes on the server using a database (mySQL), such that when the page is reloaded, the votes aren't forgotten.Has anyone done this sort of thing before?The two mains methods that I have found on the 'net areeither direct communication between AS3 and the SQL using some sort of framework, orpassing the SQL query to a PHP file, which then executes the SQL query and returns the SQL to AS3.

Which of these methods is the better option?For the latter method (involving PHP), I have been able to find resources on how to acheive this when attempting to retrieve information from the database (i.e. a read operation), but not when attempting to send information to the database (i.e. a write operation, which is needed when the users vote). How is this done?Edit: Implemented solutionSomewhere in the PHP file:

if ($action == "vote")
{
$id = $_POST['id'];

[code]....

View 2 Replies

ActionScript 1/2 :: BitmapData From Remote Server Since 10.1 Update Not Working?

Jul 22, 2010

I have had an SWF running on a HTML page since early 2008, and this SWF pulls down some images from another server - subseqently displaying them for the user.The SWF uses BitmapData to smoothly display the loaded JPG images.However, since the 10.1 update, this no longer works - everything gets drawn blank (when the bitmapdata's .draw() method is invoked).I must point out that this has been working fine for years before the 10.1 update, and the security setup has also been done correctly (the image server has the crossdomain.xml file, and the local SWF file has the relevant Security.allowDomain settings in place).Has anyone else experienced this, or know of a fix? This is driving me nuts, many of our clients who have this SWF in place on their website can no longer see the images after updating to 10.1.

View 3 Replies

Flex :: Downloading A File From A Server And Saving It In A Specific Location Without User Intraction

Jun 23, 2010

I want to download a file from the server and save it in a particular location of the disk without user interaction. All this I want to do it in Flex.

View 1 Replies

Media Server :: Microphone Sound Recording,saving / Playing Flv File Is Saved But Not Working

May 4, 2009

While recording the flv is saved inside applications/stream/samples/audio.flv. But it is not working properly.[code]

View 1 Replies

Media Server :: FMS 4 - FLV Not Saving - Record Video From The Users Webcam And Play It Back At A Later Date

Mar 24, 2011

I'm trying to record video from the users webcam and play it back at a later date.
I call

[Code]...
 
However, when I look at the FMS Admin Console at the streams in app/_definst_, their types are either "NetStream" or "Live". If they were being saved wouldn't they say "Stored"? After I close the application doing the recording, the "NetStream" type stream disappears, and after a while all the "Live" typed streams are gone too. Nothing is saved.

I have no idea what is happening. I don't know if it's a problem with my AS3 code not closing the recording properly or if I'm doing something else wrong, or maybe somethgin isn't right in the FMS?

View 1 Replies







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