How To Save A Jpeg From Flash?
I need to make a postcard system where people can create thier postcards by dragging moives around, adding text, choosing photos ...etc... but they need to then be able to email the postcrad they have created as an jpeg to a freind. Any idea how I can do this? will I have to use director instead? I'd rather keep it in flash if at all possible.
thanks for any help.
FlashKit > Flash Help > Flash ActionScript
Posted on: 07-30-2001, 06:38 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Save Flash As Jpeg
hi, i hope someone can help me on this... stuck on tis..
i m creating a t-shirt customization by using flash, ASP.NET and MSSQL..
there are 3 main functions of customization which are add color, add image and add text. and finally save as jpeg file.. and store into database
is tat possible to do this?
how to write e code which save t shirt as jpeg file?(by using flash and asp.net)
anyone can help ??
[F8] Save Flash Frame As JPEG
Hi is there any way to convert a frame in flash as a JPEG file.
The frame consists of input text boxes and other images.
Your help will be appreciated.
cheers
Save A Jpeg From Flash 8, Help With Source Code
This could potentially be useful to a lot of people out there.
I have been deconstructing the save bitmap script from, http://www.flash-db.com/Tutorials/snapshot/. Trying to turn it into a really simple application a lot of people could use.
Here is where I am at, (FLASH 8 player required).
(I had to take this link down, in fear of blowing out my bandwidth on my site, source code is below...)
It is simply duplicating a movie clip as bitmap data and then passing it to a php script that then turns it into a jpeg. Pretty cool and potentially useful.
The problem, as you probably have seen is that the color shifts a lot on conversion. I am guessing the problem is in the php script...
I am not a php guru, any of you?
THE PHP CODE:
PHP Code:
<?php //If GD library is not installed, say sorry if(!function_exists("imagecreate")) die("Sorry, you need GD library to run this example"); //Capture Post data $data = explode(",", $_POST['img']); $width = $_POST['width']; $height = $_POST['height']; //Allocate image $image=(function_exists("imagecreatetruecolor"))?imagecreatetruecolor( $width ,$height ):imagecreate( $width ,$height ); $background = imagecolorallocate( $image ,0 , 0 , 0 ); //Copy pixels $i = 0; for($x=0; $x<=$width; $x++){ for($y=0; $y<=$height; $y++){ $r = 255-hexdec("0X".substr( $data[$i] , 0 , 2 )); $g = 255-hexdec("0x".substr( $data[$i] , 2 , 2 )); $b = 255-hexdec("0x".substr( $data[$i++] , 4 , 2 )); $color = ($r << 16) | ($g << 8) | $b; imagesetpixel ( $image , $x , $y , $color ); } } //Output image and clean header( "Content-type: image/jpeg" ); ImageJPEG( $image ); imagedestroy( $image ); ?>
THE FLASH CODE:
ActionScript Code:
/**
Screenshot and jpg output
**/
import flash.display.BitmapData;
import flash.geom.Matrix;
//Buttons handlers. Should add an extra function because delegate doesn't allow to pass parameters
shaF.onPress = mx.utils.Delegate.create(this,makeShadow);
//Helper functions to pass parameters
function makeShadow() { capture(0) }
/*
create a function that takes a snapshot of the Video object whenever it is called
and shows in different clips
*/
function capture(nr){
this["snapshot"+nr] = new BitmapData(output_vid._width,output_vid._height);
//the bitmap object with no transformations applied
this["snapshot"+nr].draw(output_vid,new Matrix());
var t:MovieClip = createEmptyMovieClip("bitmap_mc"+nr,nr);
//positions clip in correct place
//t._x = 350; t._y = 10+(nr*130); t._xscale = t._yscale = 50
//display the specified bitmap object inside the movie clip
t.attachBitmap(this["snapshot"+nr],1);
output(nr);
//attachMovie("print_but", "bot"+nr, 100+nr, {_x:t._x+t._width+50, _y:t._y+t._height/2})
}
//Create a new bitmapdata, resize it 50 %, pass image data to a server script
// using a LoadVars object (large packet)
function output(nr){
//Here we will copy pixels data
var pixels:Array = new Array()
//Create a new BitmapData
var snap = new BitmapData(this["snapshot"+nr].width, this["snapshot"+nr].height);
//Matrix to scale the new image
myMatrix = new Matrix();
myMatrix.scale(1, 1)
//Copy image
snap.draw(this["snapshot"+nr], myMatrix);
var w:Number = snap.width, tmp
var h:Number = snap.height
//Build pixels array
for(var a=0; a<=w; a++){
for(var b=0; b<=h; b++){
tmp = snap.getPixel32(a, b).toString(16)
pixels.push(tmp.substr(1))
}
}
//Create the LoadVars object and pass data to PHP script
var output:LoadVars = new LoadVars()
output.img = pixels.toString()
output.height = h
output.width = w
//The page (and this movie itself) should be in a server to work
output.send("show.php", "output", "POST")
}
stop()
Save An SWF 2 ASP /PHP - As Jpeg Or?
i'd like to save an SWF out from a flashplayer - and into an ASP /PHP file on server side, hopelly using varables or even better a bitmap or jpeg.
please help if you know
Save Swi File As Jpeg
Hi!
I have created a file in flash that I would like to save as a jpeg (or other file I can modifiy in picture editing software). Can I do this?
Thanks for any help!
Esther
Save As A Jpeg, Tiff Or Pdf
I'm fairly new to flash so forgive me if what I ask can't be done. I am working on a stand alone CD useing flash. In it I have a photo gallery, as of now to save the photos I have them pop up in a seperate window in the type choosen (jpeg, tiff, pdf) then you can right click or go to menu and save as. Is there a way to have it save without haveing to pop up in a seperate window.
Save MovieClip As A Jpeg Or Bmp
Hi I am looking for a way to save a movieClip as a jpeg or bmp.
The code I have makes a line drawing that I would like to save.
Any help or push in the right direction would help.
I am using FlashCS3
Thanks!
Help To Save/export Swf Into Jpeg/gif
hello,
I have a flash program thrugh which i can select paint and fill the different areas of an image.
My problem is :
Can i save this into jepg or gif i.e after i selected the colors for the different areas.
Thanks for all your help
A Simple Save JPEG?
I'm trying to use the bitmapData class to get the data of a movie clip. Send it to php, have php return the link, so I can reload it later for other purposes. I'm using AS2, but I can use AS3 and load the swf on a different level to do the work. I'm using the Flash 9 player for the browser so either AS2 or AS3 will work.
I've browsed for two weeks and I can't find this anywhere. Everyone wants you to save the array of pixels to a database? Why? Why not just make a jpeg and send the link back to flash. I know php can make jpegs.
Anyone know how to pull this off by creating a "screen shot" and saving the jpeg?
Thanks
SAVE THE STAGE AS A JPEG
Hi there...
Does anybody knows how to save the stage as a JPG?
I need the user to click on a map; this will position a bullet on the click coordinates. Then when the users click "save changes"... this will trigger the script to save the map window as a JPG in the server!
IS THIS POSSIBLE?
Thanks....
Using BitMapData To Save As Jpeg
I was following http://www.sephiroth.it/ tutorial on saving a movieclip as a jpeg. This is making use of PHP from a webserver, is it possible to do all this offline?
Save Snapshot To Jpeg
Hi,
I have an swf that allows a user to upload a photo, which is then used as the background for the swf, and then then can drop items onto this, and resize, rotate, delete them....
I have been searching the forums and google for a way for the user to save what they have done, and have this design emailed to us.
A lot of the posts I have found are old (2003), and I have even tried looking for swfdraw2jpg at www.f-mod.com (which ain't there anymore.. )
I am using Flash 8 Pro, so I am sure there has to be a way to accoumplish this (without having users with slow PC's/connections going off and making a coffee while waiting for it to finish).
Can anyone help?
Tezza
Save MovieClip As A JPEG
I'm trying to create a signature pad and I've got the write and sign bit down. But I'd like to save the signature as an image. I'm guessing it would require using PHP/GD which I'm skilled with, but can't figure out how to read the clip as an image and then send it to my php script. I saw this: http://www.sephiroth.it/tutorials/f...creen/index.php
but it doesn't work when I try to test the example.
Save Swf As A Jpeg Wallpaper At Runtime Using PHP/ASP...?
Hi guys
I'm just trying to figure this out.
Can I in any posible way save a "screenshot" of my swf during runtime on a website. I know it's not posible within Flash itself (at least not until AS3 ), but perhaps with a little help from a serverside friend like PHP/ASP?
This will be handy if u want to be able to save wallpapers from the swf!
I'm digging into this subject, so any respond is highly appreciated - tuts, links anything.
Thnx guys
Save A Movieclip As Jpeg File
Hi Flashers,
I Need a immediate help from you,
I want to save a movieclip as a JPG or other image format.
I searched three days for that purpose only, From the work I found its possible with php integration, I got some of the sample files, But Its not working in my local host, So please help me to clear the problem, Please give me the useful links or sample files appreciated,
Thanks you so much,
Suresh J David
Save Locally A Jpeg From A LoadMovie
I have a movie that loads a jpeg using loadMovie from my webcam server (every x seconds it updates)
I would like my clients that are using the webcam movie to be able to locally save a copy of the onscreen jpeg. (instead of having to prt-scrn and crop it each time)
Any ideas on this? I don't have a clue. TIA!
Save Movie Clip In Frame As Jpeg
We Are Developing A web Application as the following :
the Client Can select A template then Write words on over it and Save the Template as Jpeg format ,we did the first part ,how we can save the movie Clip as JPEG format ,I looked in the Bitmap class and i did not found any Solution,also I used the PHP to send Data to It From Flash but it is very Slow Proccess is there any way to do this from Flash
Edited: 12/08/2007 at 10:32:20 AM by hanyegypt
Quick Question About Using BitmapData And PHP To Save As Jpeg
Greetings Everyone,
Just a bit lost as to what I found on the internet about the Bitmapdata class. You see, Im trying to create a flash game where at the end, the user should be able to click on save as Jpeg.
The only problem that I have is merging movieclips that are positioned in 1 area, and turning it into one complete image file at the end.
So far right now its only aimed at one movieclip, so thats the only thing that saves as a jpeg
a Working example is here currently: http://keyeske.com/test/index.html
Just would like to see if I can turn both images into one single file.
Any suggestions?
Now I was looking into bitmapdata merge, then use that as the variable to send to php, but im not really sure how that will go.
Thanks in advance!
Dynamic Jpeg Creation & Save (using BitmapData) From SWF Using Actionscript - HELP
Hi everyone,
I've built a little online Flash application where I want to save a portion of the SWF file to the server as a jpeg when the user clicks a button.
I approached it by using BitmapData to record the RBG values of every pixel in my movie (600 x 400 = 240000 pixels). This means I end up with an array of 400 pretty big strings (one for each row) to send to my ASP page that creates the image (the ASP page works fine by the way).
Basically, I'm completely stuck now because it takes so long to send the data that the application is unusable and the bandwidth on my server will be through the roof.
I found an example of a different application that uses the same principle. The creation of the jpeg from his Flash interface seems absolutely instant, and the e-mail arrives very quickly:
http://demo.*****.com/flashcard/stateless/
He surely can't be sending all the data, pixel by pixel, as I am doing, as it only take a second or two for his application to process this stage, so my question is: am I missing something? Is there some really simple way of creating a jpeg from an swf file using actionscript that I don't know about, or is there a way of compressing the data so much that it is much quicker, or is there a 3rd party plugin which allows jpegs to be dynamically created and sent to an ASP/PHP page?
I am completely stuck on this so any help would be really appreciated.
Thanks in advance,
Jim
Can I Take The First Frame Of The FLV File And Save As A JPEG File ?
Dear,
Is it possible to take a snapshot photo with a webcam, and save it to JPEG file on server ?
I have successfully taken a snapshot picture using Flash and Flash Comm Server, But it is stored on the FCS server as a FLV file. Is it possible to convert the first frame of FLV file to a picture file (like a JPEG) and shared this picture with others ?
Any Idea ?
Kevin
Can I Take The First Frame Of The FLV File And Save As A JPEG File ?
Dear,
Is it possible to take a snapshot photo with a webcam, and save it to JPEG file on server ?
I have successfully taken a snapshot picture using Flash and Flash Comm Server, But it is stored on the FCS server as a FLV file. Is it possible to convert the first frame of FLV file to a picture file (like a JPEG) and shared this picture with others ?
Any Idea ?
Kevin
JPEG Loading... How Do I Wait Until The Jpeg Has Loaded
Hi everyone!
this is the code that I currently use. I want to be able to wiat until the jpeg is loaded before going trought the loop again.....
any ideas? I have tried to use the getBytesLoaded and getBytesTotal but they always show up as 0. Very annoying.
Code:
var currentX = 0
for (k=0;k<galleryVar.items;k++){
_root.thumbslider.createEmptyMovieClip("thumb" + k,(50 + k));
eval("_root.thumbslider.thumb" + k)._x=currentX;
loadMovie(_root.categoryList+"/thumbnails/"+_root.imageArray[k]+".jpg",eval("_root.thumbslider.thumb" + k));
currentX = currentX + eval("_root.thumbslider.thumb" + k)._width;
trace("Pic" + k + " " + currentX);
}
the "currentX" (2nd line from the bottom) doesn't get a value because the jpeg doesn't get loaded quickly enough. How can I wait for the jpeg to load before going through the loop again.
I don't want to use frames becasue I am creating everything dynamically!
Am i making sense?
Hope someone can help me!
Thanks
A
FMX: Save User-drawn Objects And Save/load DXF/DWG?
Hey everyone. Sorry to seem like a leech, but I could really use the guidance. Usually I'm pretty good for finding the solution on my own without having to trouble people, but this time I seem to be coming up short. So thanks in advance for taking the time to read this.
I'm developing an auto-cad esque flash application (going good so far too). I have no problem storing object information in a database (xy coordinates, rotation, scale etc), but now my problem is converting that data to another format; specifically DXF or DWG. Now I know the flash environment itself can import/export DXF's, but I don't know how to load the user-made data into the environment. Is it possible to have the environment run actionscripts to build these user-made objects and then manually save that to a DXF? (or even better would be a save/load DXF from the flash player)
Essentially I'd need to know if it's possible for the flash environment to read from my database (probably from reading a PHP built XML file), execute actionscript to reconstruct any objects created, and then let me go and manually (or automatically!) export a DXF of that.
Any comments or help would be greatly appreciated =]
EDIT:
The other very viable alternative is if you guys know of an XML to/from DXF/DWG converter.
[F8] Im Going Gray By The Secound Save Me Somone, Save Me :(
Thanks for taking the time to have a look
This problem is driving me mad so i hope you can help, i will try and ex plane to problem as best i can.
programme :flash 8
i'm trying to load a external swf in a main motive use a movie clip holder, useing
loadMovie("name.swf", "_root.Mc_holder"); the move loads but the coding don't work( i.e. animation) the effect within the swf was made in action script 1 using Absolute and the motive is 2 using relative also the player setting on the swf are for player 6 unlike the movie which is 8
it does work if i use levels but overlaps on to the main movie which does'nt look great
and not what i need.
this is very hard to ex plane so any help would be great.
i will post some links if it helps please let me know
thanks
AS 2 Save Image With Open / Save Dialogue
I am wanting to use fileReference to open an OS save dialogue so my users can save jpgs to their hard disks.
I been trying to get this working but I can't can any one please give me some code or some idea how to get this working.
I just want to be able to click a button and the save dialogue appear asking where to save the file.
Thanks
Save Image With Open / Save Dialogue
Hi
I currently have a button that when click opens a new browser window so a user can right click on an image and save it to their PC using getURL.
Is it possible to have a button open the save dialogue box of the users operating system?
So as soon as the button is click the OS save dialogue box appears.
I'm using Flash CS3 but with AS2.
Thanks
Richard
What Is Up With Jpeg.s In Flash 5?
How do I appropriately import a jpg without a white outline? I know that Flash seems to prefer jpgs (they look much better than imported gifs and pngs), but how do I get them to stand seperately, without the white box?
The "Break Apart" (cmnd + B) command used with the wand tool really does not do a great job taking off the white. I'd really have to sit down for quite awhile with the lasso tool to get a perfect edge, around image... What else can I do? This seems like it should be such an easy & common sense kind of thing!
Help!
Flash And Jpeg
I'm having a problem importing certain jpegs into flash. I'm uploading the pics from an html form, which gets a php file and sends the pic to the appropriate location and creates a thumbnail of the pic. The thumbnail works fine, however, the php i'm using contains if(uploadedpic_type !="image/pjpeg"){ echo "please choose a jpeg image";} This is also working. HOWEVER, nearly every picture i try to upload (and yes i've checked their file extension to make sure they are jpeg or jpg) comes up saying "please choose a jpeg image". I could take out the file check to upload the image anyways, but then when i try to import those images into flash, they won't load. Its really confusing to me. I also have a question about changing the name of the jpg, to see if that might work. Is there a way to have the php change the name (ex. me and friend.jpg) to (meandfriend.jpg) eliminating the spaces? I've noticed that pics that don't have spaces in the name do load, however, this is not always the case. Its a very confusing problem for me. I hope i didn't make it more confusing than it should be! Sorry if its cluttered!!
Thanks in advance!
Flash To JPEG?
Is there a way to dynamically create a JPEG image of the swf stage? Say, for a user making ecards or something.
Thanks.
frozenpeas
E-card Save Capture And Save
I have created a drawing palette, now when the end user draws there picture I want them to beable to email it as an ecard.
any ideas
thanks
How To Save X-y Coords In One Array And Save'n'such
Hello evryone.
just fighting with those array functions in flash.
well, i have a mouserecorder "Paintthingy" which records the mouse coordinates into 2 array's, after that the arraydata will be saved over a php script into 2 textfiles.
works fine, but i have to open 2 url's for that and 2 seperate phpscripts to write x and y seperated in 2 files.
is there a way to save both x and y over 2 own identifiers in an array ? that would help alot, because i have to load that textfile after that, to put the textfiledata in the array again.
easily said it's a very simple paintprogram with save function so that after a refresh the last painting won't get lost.
check the attached file!
Save Button To Save Dynamic Mc's?
If anyone could help, I would really appreciate it.
Problem in short :
Working on interactive kiosk - have button that creates dynamic copies of my parent movieclip (picture of lion) The user would click on button to create copies and using "drag" move the lion to where she saw it on the map.
Once the lion "sightings" have been visally logged on the map, and need to be able to give them a "save" button to save what you see on screen.
Because this is created dynamically by the user, I need a way for the user to save it at runtime.
How would one go about this?
p.s I need to be able to show the new saved file from a remote pc.
Any help - you are my hero
JPEG Substitute For Flash
When someone doesn't have Flash installed (what kinda browser are they using?) or if it's just disabled or what not, what is the code you need in order to provide alternate JPG or Code for the Flash area content.
I know you could create a javascript program to detect it and then either show the JPG or embed the SWF, but is there code that's built into the Flash Object or Embed tags?
Loading A Jpeg Into A Swf With Flash 6
I'm loading a jpeg into a movie clip in a swf with flash 6 with the loadMovie function, and it works perfectly
But I wanted to restrict the size of the file that comes in...
say something like...
if the picture's width is greater than 500, shrink the image proportionately to make the width 500
if the picture's height is greater than 400, shrink the image proportionately to make the height 400
but I'm not sure how to change the size of the jpeg as it's loaded in. I tried defining the size of the movie clip that it's loaded into, but it doesn't effect the image. Anyone know if this is possible, or does the jpeg pretty much have to be the size I want it before I load it in?
JPEG. Quality In FLASH.
Question:
I work in photoshop to save all of my images for the web,
by the **save for web** option.
I am on a Macintosh with a plasma flat screen, and I optimize the images usually around 60-70 percent, and don't ever see any pixelation.
After, I published my site, and viewed it on, PC's and other older monitors, the JPEG quality looks like ****e.
Does anyone know anything about this?
Check My site: www.carpeinternational.com
look at jpegs. give me some info..
cheers.
happy 300th post to me!
Jpeg Images In Flash
hi ive noticed that when i insert jepg images i have made into my flash movies, when i export the finished movie and view it, the quality of the images goes down, and they get all fuzzy. how do i sort this out? ive tried changing the jpeg quality option to 100 in the xport movie options, but that doesn't help.
Bad Quality Jpeg An Gif In Flash
Im making a screensaver with flash, with imported jpegs and pngs and such, but the quality changes for the worst when its published as swf or exe. I allready changed the directory of the pictures so flash doesnt compres it but the quality is still bad..
anybody got suggestions? (working in flash 4)
Flash 6.0 External JPEG Tip
Hi,
I've just this minute, found a resolution to
the 'streteched pixel' effect sometimes
noticable on jpg images when they're loaded
into placeholders.
Sometimes, you get this:
Top pixel row is duplicated, creating
a stretched pixel effect.
Even if you try changing the placeholder's
X or Y position to 240.0 co-ordinate for
example, there is no change . . .
. . . but on close inspection, this is only
true when co-ordinates are changed when the
stage is at 100%.
If you zoom in to the stage to about 800%,
you will find that the 240.0 co-ordinates
that you've entered at 100%, have actually
changed to something like 240.1 or 240.4
which causes the off-pixel effect.
With the stage at 800%, simply change the
co-ordinate back to 240.0 and then try
viewing the result.
It should now look like this:
Pixels are all correct.
Note: I've only tried this in Flash 6.0
Oops - Just noticed that I posted this thread
from a Boadroom thread I was reading.
Would someone be so kind as to move it some
place more appropriate. Thanks.
Space Between Flash And Jpeg :(
Hey guys, i am using dw mx and i have a banner for a page and also a flash object that has to go RIGHT NEXT TO THE JPEG BANNER (with no pixels in between). I cant seem to do this, there is like a pixel width space between the flash and the jpeg, how do i fix this? thx
Flash Strips 1px Of My Jpeg
Hi there,
I'm working with flash mx 2004, but I want a v6 compatible swf in the end.
When i place a jpeg in my movie and i export it to a v7-swf, everything works fine, but when I export the same fla to a v6-swf my jpeg is incomplete. On the right and the bottom border of the pic a 1px line is missing.
Any ideas how to circumvent this issue?
Thanks in advance
Rick
--
mac/osx10.35/flash mx 2004 7.2
Webcam-> Flash-> PHP-> Jpeg
I was wondering if it wouldbe possible to let flash take pictures with a webcam (eg when a user clicks a button), then send this pictures to the $_POST array in php and, then display a jpeg of it... for example to make a collection of pictures of visitors on your site.
And all this without Communication Server. I know that you can access the webcam with flash, but can you send its data through php to the server?
Jpeg Quality In Flash
I'm currently creating a flash site for a photographer and the image quality is becoming a problem. The Jpegs seem to really decrease in quality when published to the web. I have put the "Quality = Best" script in the first frame of the movie but my general question is....
do jpegs just look better in non-flash sites?
[MX] Upload A Jpeg With Flash And Php?
I am new to action script and new to php. Looking at some previous threads, I was able to create an email form in flash with php that included basic stuff like name, email address and a message.
Is it possible to set it up so that the user could also attach a jpeg through the form? Any help is much appreciated.
Here is the action script I have so far on my submit button:
Code:
on (release)
{
var sMessage = "Fullname:" + tFullname.text + "Email: " + tEmail.text + "Subject: " + tSubject.text + "Message: " + tMessage.text;
lvSend = new LoadVars();
lvReply = new LoadVars();
lvSend.msg = sMessage;
lvSend.address = "evilredcardinal@yahoo.com";
tFullname.text = "";
tEmail.text = "";
tSubject.text = "";
tMessage.text = "";
lvReply.onLoad()
{
tName.text = "";
}
lvSend.sendAndLoad('mail.php', lvReply, 'POST');
getURL("http://www.texasclay.org","_self");
}
And here is my php code:
Code:
<?php
$message = $_POST["msg"];
$address = $_POST["address"];
mail($address,"E-mail Form Message",$message);
?>
Thanks!
|