Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




ActionScript Save Stage



Hi,

I've got a canvas thing going on here, where the user can draw what they want. I would like it if there is some way I can save the stage for them and provide a JPG output.

Normally I would output the coordinates to the PHP gd library but unforunately my host doesn't support that library. Hmpf.

Anyway, can anyone suggest an alternative way of saving the stage?

Cheers

Paul



Ultrashock Forums > Flash > ActionScript
Posted on: 2005-03-16


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

How Do I Save An Image From The Stage?
How do i save an image from the stage? I heard it can be done using php, but how is it done? AS code would be nice.

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....

[CS3] Take Screen Shot Of Stage And Save To File Possible?
I dont know if this is possible, but I am trying to figure out how to take a screenshot essentially of the stage and then save that to file (dosnt matter what the picture file type is)

Thanks in advance

Save A Jpg,bmp Or Png With Actionscript.
I've made a project that saves a bitmap from flash to the user computer and also on the server. The project si here and you can download the sources to.

http://www.webdesign-flash.ro/p/savejpg/

Save As 4 Instead Of 5 (w/ No Actionscript)
In a simple flash movie that doesn't use any actionscript, I discovered there is absolutely no difference in file size / preload frames (preload seconds) if it is published as either version 5 or 4. Is there any reason I would save as 5 instead of 4, seeing as choosing 4 includes a bit more of the un-upgraded masses?

I previously had been following the usual advice to save as version 5 for the most compatibility, but now can't see why not save as 4.

Actionscript To Save An Image
I have a requirement to be able to generate the same image but with different language text, this does not have to be on the fly, is it possible for a standalone or web based flash movie to save a specific object/frame as an image?

HELP Is There An ActionScript That Will Allow Me To Save To A File?
I am creating a standalone that will be sent out to clients on a CD-ROM... I'd like to write a script that would allow users to click a button and save an image on that CD-ROM to their hard drive. I know Flash Studio Pro can do it... however, I am working in a Mac-only office, so Flash Studio Pro won't help.

Thank you in advance for any help with this matter.

Actionscript For Save Button..
hi i created a SAVE button for my flash but i do not know how to go about inserting actionscript to make the button works. Anybody can help me?
I want to add a actionscript to the button which enable the users to click and save the last frame as JPEG/BITMAP/whatever format.

Actionscript To Save Swf To Desktop.
I am making a screensaver with some simple actions to make it project full screen. I got it to work, as well as a button to quit the movie, but the last thing I need is the ability to save the swf to the desktop with a button in the swf. Ive looked for hours. Our site is set up pretty strange, thus doing it the old fashioned way would require more work than I care to do. Does such an action exsist for swfs? thanks!

Save And Load With Actionscript
i am working on an interactive movie game kinda like the old dungeon and dragons books where the user has the choice of which path to take, i want the user to have the options of save and load. is there an easy way to do this with actionscript??

CS4 Save As And ActionScript Versions
I'm curious as to which versions CS4 can save an FLA as. As government contractors we are obligated to submit our FLAs as part of our final deliveries, and some customers require the version to be 8. For this and other reasons we need to be mindful when considering upgrading.

Also, will CS4 allow us to create files as either AS2 (gotta have that Tree component!) or AS3 in the same way that CS3 does?

Thanks in advance.

'Save File' Using ActionScript?
I need to incorporate the facility to save a file in swf or jpeg or bitmap format using actionscript.. is that possible?? if so, how?
the file should contain a movieclip that's on stage.. i could convert it to bitmapData and then try saving.. or if not that, then atleast the screeshot of the whole movie should get saved..

help??

Save Txt File ActionScript 2.0
hi guys, i was browsing arround trying to find a way to save a txt file from a flash made exe widh the projector, and no way... i cant find it, i have found an example, but im not into old school programming
lets say i started with 2.0 and i find it more easy
now..... i have seen this example and goes arround with fscommand, so my question is.... where can i see more commands that can be used with fscommand ? because "Save" is not documented in flash, do i have to check msdn ?
some light for this coder would be quite nice

thanks for your time

Save Or Export With Actionscript?
does anyone know of a way to export or save files through actionscript?

for example, ask the user for an input and save that variable as a .txt file while the program is executing...

Actionscript For Save File OnPress
What actionscript would I use for onPress that would prompt the user to DL a file? I have an audio file that on the press of the play icon, it would play the file. On the press of the floppy icon, it would prompt the user to save the file. Thanks

[F8] Actionscript Edit Text And Save With Php
when some one hard have example or script i have for making save but for edit is ok

for save in php
-----------------------------------------------------------------------
$Website = $_POST["Website"];
$keybord = $_POST["keybord"];
$description2 = $_POST["description2"];
$url= $_POST["url"];
$NumLow = $_REQUEST["NumLow"];
$NumHigh = $_REQUEST["NumHigh"];

// Replace special characters - you can remove the next 5 lines if wanted.
$title = ereg_replace("[^A-Za-z0-9 ]", "", $title);
$description = ereg_replace("[^A-Za-z0-9 @.-/'|]", "", $description);
$description= ereg_replace("[^A-Za-z0-9 @.-/']", "", $description);
$description2= ereg_replace("[^A-Za-z0-9 @.-/']", "", $description2);
$Website = eregi_replace("http://", "", $Website);
$Website = ereg_replace("[^A-Za-z0-9 @.-/'~:]", "", $Website);

// Remove slashes.
$title = stripslashes($title);
$description = stripslashes($description);
$Website = stripslashes($Website);
$keybord = stripslashes($keybord);
$url = stripslashes($url);
$description2 = stripslashes($description2);



if ($Submit == "Yes") {
// Next line tells the script which Text file to open.
$filetitle = "database.txt";

// Opens up the file declared above for reading

$fp = fopen( $filetitle,"r");
$OldData = fread($fp, 80000);
fclose( $fp );

// Gets the current Date of when the entry was submitted
$Today = (date ("l dS of F Y ( h:i:s A )",time()));

// Puts the recently added data into html format that can be read into the Flash Movie.
// You can change this up and add additional html formating to this area. For a complete listing of all html tags
// you can use in flash - visit: http://www.macromedia.com/support/fl...s/htmltext.htm

//$Input = "title: <b>$title</b><br>description: <b><u><a href="mailto:$description">$description</a></u></b><br>Website: <b><u><a href="http://$Website" target="_blank">$Website</a></u></b><br>keybord: <b>$keybord</b><br><i><font size="-1">Date: $Today</font><br><br>.:::.";

//$Input = "<database> <record title="$title" description="$description"><link>$Website</link><keywords>$keybord</keywords></record>";

//$Input = "<database>--> <record title="$title" description="$description"><link>$Website</link><keywords>$keybord</keywords></record><!--";

$Input = "<database>--><record title="$title" description="$description $description2"><link>$url$Website/</link><keywords>$keybord</keywords></record><!--$Today";
/* This Line adds the '&GuestBook=' part to the front of the data that is stored in the text file. This is important because without this the Flash movie would not be able to assign the variable 'GuestBook' to the value that is located in this text file */

$New = "$Input$OldData";

// Opens and writes the file.

$fp = fopen( $filetitle,"w");
if(!$fp) die("&GuestBook=cannot write $filetitle ......&");
fwrite($fp, $New, 800000);
fclose( $fp );
}
----------------------------------------------------------------------
actionscript in button save
----------------------------------------------------------------------
on (release) {
if (title eq "") {
_root.Status = "Please enter your title";
} else if (description eq "") {
_root.Status = "Please enter description Address";
} else if (Website eq "") {
_root.Status = "Please enter the URL to your website";
} else if (keybord eq "") {
_root.Status = "Please enter the URL to your kyebord ";
//} else if (documents2 eq "") {
//_root.Status = "Please enter the URL to your kyebord ";
} else {
Submit = "Yes";
NumHigh = 10;
NumLow = 0;
_root.GuestBook = "Processing.. Loading New... ";
loadVariablesNum ("GuestBook.php", 0, "POST");
//_root.Status = "Your entry has been submitted. You should see your comments appear immediatly";
gotoAndStop (2);
}
}
----------------------------------------------------------------------
now i need button Edit make modification in my save in .txt

Inserting A Save Command In Actionscript
Hi all. I'm pretty new to Flash, though I've been using it for a few years, on and off, to do simple animation, so I apologise if this question has been asked before.

Basically I'm creating an animation where a user can colour in a drawing, by selecting the colours. I've got more advance ideas for that, but it's a while down the line. I want to give the users the ability to save the image as a GIF (for use on a message board), and if possible also save the FLA, so they can modify it later - I doubt the second option is possible.

I've gone through the ActionScript commands, and searched on Google, but I can't find any tips on how to add a button which will Export or Save the drawing, once the user has coloured it.

Is this possible?

How Do I Save ActionScript Animation As Movie
I am a Flash developer and motion graphics designer. I have created a lot of Flash movies with Actionscripted animations and I'm dying to convert them to video. Whenever I save as Quicktime MOV, I lose the animation altogether, probably because the Flash Player is required for the scripted motion. Is there ANY way to convert ActionScript animation to video short of videotaping your screen?

Can Actionscript Load/edit/save Cookies?
I have this game that I created. I only want people to be able to play it once a day (Chance/luck game). Can this be done with actionscript? If so. how?

Thank you very much in advance!

I Want Actionscript To Save To An External Text File
I have a button and i want to make it so when I click that button, whatever is typed into a dynamic text box (called "speech"), will be saved to a document called "data.txt" . Could somebody show me the code? Thanks!
-WLM

How To Save Stuff To A Text File With Actionscript
How do you make actionscript write to a text file that can be loaded by a dynamic text box?? (I know how to do the loading..)


I basically want to learn how to have an input box (Admin section basically) that I can go to my website select a text file from a drop down menu, the text file will get loaded into the input box, Then I be able to save the changes that I've made.

If anybody knows how to do this, I'd greatly appreciate it!!

How To Save A Move Clip As A .jpg Or .gif File Using Actionscript
i have a move clip which is running in the browser. i want a save button in that move clip, and when i press that button the movie clip should be saved as a jpg file.

Note: The move clip is running in the browser, and the size of the movie clip is 800X600 Pixel

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

Problem With FLVPlayer In Flash CS3 (need To Save Out As Actionscript 3.0 SWf File)
I am using Flash CS3 and am trying to publish a SWf file that makes use of the "FLVPlayback" component. I need for this SWF file to be published as an Actionscript 3.0 file, so I have set my publish settings to Flash Player 9.0 and Actionscript 3.0, but keep getting an error as follows:

"WARNING: The component 'FLVPlayback' requires ActionScript 2.0."

Has anyone encountered this?? I am doing something wrong? I'm pretty comfortable within Actionscript/Flash 2.0, but am only beginning my first steps into the relam of CS3 and AS3.

I have also attached a screenshot of the files that represent my FLVPlayback component (or so I assume). (see this link for attachments http://www.actionscript.org/forums/showthread.php3?t=140886)

Thanks all,
Mark



http://www.actionscript.org/forums/showthread.php3?t=140886





























Edited: 07/03/2007 at 11:37:27 AM by marke

Save Or Export Flash Movie As IMAGE With Actionscript
Hello Flash GURU's,
Lets assume that I have a movie clip named myimage_mc and I need to use actionscript 2.0 to export/save this movie as an image, is it possible ?

Save Or Export Flash Movie As IMAGE With Actionscript
Hello Flash GURU's,
Lets assume that I have a movie clip named myimage_mc and I need to use actionscript 2.0 to export/save this movie as an image, is it possible ?





























Edited: 08/14/2008 at 10:35:30 AM by TALAL MANAA

How To Save Strings On Runtime In A .txt File From Actionscript Of Flash 8?
I need to know the action script code for writing & saving in a .txt file with Flash 8 on runtime. It would be best if there is a way to save strings one by one somewhat like Array.push() function; from which the strings could be called on runtime from the .txt file according to their index. Putting in other way, i need a way to create array as an external file but want to use & amend it as comfortably as an usual array in flash. Plz plz plz plz plz help me. I really really need it!!!!! or im

[F8] Actionscript Or Stage, Which One?
I'm building a gallery. I've been working all in actionscript but it seems to be getting overwhelming and I'm maybe halfway through.

It seems to me I could save a lot of time doing some of the stuff on the stage. This way I can decorate things a little more. Make tweens easier to work with and such.

I guess I'm not really sure which way to go. Should I do everything in actionscript, or should I do mostly AS and the other stuff like graphics on the stage? Now that I'm talking about it that latter seems the way to go.

Thanks for any suggestions.

Center To Stage With Actionscript
I'm trying to figure out if I can use actionscript to center this text to the stage as it builds. Right now I am creating a textfield for each character of a sentences the senteneces obvioiusly differ in the amout characters so how can center the whole sentence to the stage one it is built?



// code ==================================
on (rollover) {
var myText = _root.text[2];
for(i=0;i < myText.length;i++){
_root.createTextField("t" + i,i,_root.kern*i,0,20,30);
_root["t"+i]["text"] = myText.charAt(i);
_root["t"+i].setTextFormat(_root.tFormat);
_root.xStart = _x;
_root.yStart = _y;
}

Saving The Stage As A .jpg Through Actionscript
I am trying to save the stage (sort of screen capture) as a picture file, through actionscript. The Publish command doesn´t get the several stages of the movie, since it is a single frame movie with movieclips moved by Actionscript commands.

Thank You very much for your help.

Saving The Stage As A .jpg Through Actionscript
I am trying to save the stage (sort of screen capture) as a picture file, through actionscript. The Publish command doesn´t get the several stages of the movie, since it is a single frame movie with movieclips moved by Actionscript commands.

Thanks a lot.

How To Identify One Of Many MC On Stage For ActionScript?
It is a sort of a game, like puzle, and I need to rotate or change color of one peace of several on stage. I thought that if I could determin the specific MC as "selected" By clicking on it, and convice the created button to manipulate the "selected" item it would do the job. Same as in any drawing program,
but I could not find out how to do this.
And than I should Know How to clear selection.

Can help me on this, or have another idea to do the trick?
Thanks
Nit Kalish

How To Identify One Of Many MC On Stage For ActionScript?
It is a sort of a game, like puzle, and I need to rotate or change color of one peace of several on stage. I thought that if I could determin the specific MC as "selected" By clicking on it, and convice the created button to manipulate the "selected" item it would do the job. Same as in any drawing program,
but I could not find out how to do this.
And than I should Know How to clear selection.

Can help me on this, or have another idea to do the trick?
Thanks
Nit Kalish

How Do You Align MC To Stage By Actionscript 1.0?
Sorry if it sounds dumb, but how do you align MC to stage by actionscript?

cheers

Centering A Textfield On The Stage Using Actionscript
Hi,

I have been trying to figure out how to center a dynamic textfield on the stage using actionscript. I have tried several ways but can't seem to figure it out.

Does anyone have any suggestions on how to do this in actionscript?


You assistance is appreciated.

Thanks,

- Alex

Is It Possible To Resize The Flash Stage Using Actionscript?
I have a flash document with an intro that is 800 x 336. The stage is the same size.

After the intro I want the Flash stage to resize to 800 x 550.

Is it possible to do this with actionscript?

if so, then how?


thanks

Changing The Stage Colour Using Actionscript
is it possible to change the stage colour using actionscript and if so how? Please help i have tried a number of ideas but none seem to work.

Control Stage Color With Actionscript?
Can you control the color of the stage with actionscript? stage.color() or something like that?

[F8] Move A Mc To A Spot On The Stage Using Actionscript
how do i animate moving a mc to a certain spot on my stage using actionscript? i dont want it to happen instantly in one frame, but animate like with a motion tween. and the coordinates will change based on events that happen, so i dont want to just setup the animation as a normal movieclip animation.
i.e.
my mc starts out at (0,0). user inputs 100 then MC animates moving to location (100,100).

Slide Stage Using Button Actionscript
Hi,

I am looking to create a menu interface that has 4 seperate mc's and the camera point slides between each one when a button from the menu is clicked.

So on load, mc1 will play and fill the screen, when someone clicks 'about us' in the menu bar for example, the screen slides horizontally and stops on mc3 and so on with corresponding mc's to different menu options.

Any help would be extremely appreciated, so thank you all in advance!

How Do I Click A Button On The Stage With ActionScript?
How do I click a button on the stage with ActionScript?

Dynamically Aligning Mc With Stage Using Actionscript
Trying to align mc on the center of the stage. Here is an example.

http://www.robitussin.com/coldandflualert/index.asp

Can anyone help out?

// this sets the vars on root frame
var targX = Stage.width / 2;
var targY = Stage.height / 2;
var xscale = 200;
var yscale = 200;

onClipEvent (enterFrame) {
//this variable stores the current x position of the clip
cX = this._x;
cY = this._y;
sX = this._xscale;
sY = this._yscale;
//this variable stores the distance between the clips current x position
//and where we want it to go
//I am setting the targX variable in the root so that it is easy to target with our button
difX = cX-_root.targX;
difY = cY-_root.targY;
scalX = sX-_root.xscale;
scalY = sY-_root.yscale;
//this moves the clip 1/5 of the distance every frame.
//Because the difference between the clips current location and its destination
//will get smaller each frame, so will the amount the clip travels each frame.
//This is what makes the clip appear as though it "eases into" it's final destination
setProperty(this, _x, cX-(difX/8));
setProperty(this, _y, cY-(difY/8));
setProperty(this, _xscale, sX-(scalX/8))
setProperty(this, _yscale, sY-(scalY/8))
}

thanks

Changing The Background Of The Stage Using Actionscript 3
What the best way is to add or change the background image of the stage.

How To Zoom In Or Out Of Stage By Using Action Actionscript?
hi, can you zoom in or out of stage by creating an action script for it??

Controlling The Size Of The Stage In Actionscript
I am reading in a XML file that is setting the size of a movie clip. I would like to resize the stage to the same size. How do i resize the stage within Actionscript after i have read in the XML? Is this even possible?

Aligning Object To Stage With Actionscript
I have a dynamic text box pulling info from an xml file. After the text loads the box resizes with autoSize.
Any ideas on how i can get the box to align to the center of the stage after that with actionscript??
I've looked around and can't seem to find a solid yes or no anywhere.
Or if that's impossible, is there any way to vertically align the text, which would negate the need for the resize and align.

Thanks

Help Change Stage Coordinates With Actionscript
Hello
I have objects off the stage on either side with this code on a mc:
on (release) {
_level0._x = -835;
}

and it works but I want to see it move towards that point, not just change to it....any ideas??

Actionscript Animation Works Just In A Zone Of Stage
I have a MC with a root actionscript animation.
There's a way to make it work just in a delimited zone of stage.
Thank evrybody
Manner

Can Actionscript Dynamically Put A SWF On The Stage In A Specific Spot?
Hey everyone. I have not found a good way around this problem.

I want to do the following

Dynamically load another swf ( which is smaller than the main stage ) into a specific area on my stage and play it only once it has downloaded. I want to pre-load this swf into the area on my stage, once it has loaded I want to run part of my main timeline to be some type of transition and then play the loaded movie. ( Idealy I want to pre-load it into a specific frame if possible )

I cannot find a way to do what I want. ( I suffer from newbiness )

Do I have to do the following, on button click run main timeline for exit transition, load movie that has its own built in pre-loader into my desired location?

However, if I run this code
_root.CreateEmptyMovieClip(empty1,10);
//some type of size, positioning code required.
_root.loadmovie("load1.swf",empty);
it totally overwrites my entire stage.

I have not found a way to move and size my empty movie clip called "empty1" once I create it

any ideas would be a great help.

Copyright © 2005-08 www.BigResource.com, All rights reserved