Convert SWF To Image
Hello All,I'm working on somewhat of a templated systemwhere I've got a SWF file as a template and thenpeople upload their own images and place them inthe certain masked areas of the SWF to createlike a scrapbook page.My question is this, what would be the best wayto convert those images to an image that peoplecan save and thus print? Would I have to do thiswhile their viewing the SWF or is there a way togenerate an image with some sort of command linetool that I'd pass the swf the user's settings to makethe SWF unique each time?Let me know what'd be best.Thanks,-- DC
KirupaForum > Flash > ActionScript 1.0/2.0
Posted on: 10-03-2007, 11:15 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
Must-read: How To Batch Convert Image Files To Swf (for Image Galleries)
Sorry for cross-posting, but I thought this was important.
If you ever need to create an image gallery in Flash using loadMovie(), read this:
Last night, I was trying to create a Flash image gallery where each of the images are loaded dynamically using loadMovie(). As you know, this is usually a very painful process, since you have to create a movie for each of the image files, adjust the size of the movie, import the picture, set the quality, test, adjust, etc. etc. A conservative estimate of 5 minutes per picture gives us a whopping 2 hours for a gallery of 25 images.
Well, Fireworks 4 allows you to export to swf. Using its javascript API for extending, I was able to create a command where you specify the files to convert, the output dir, and the JPEG quality for bitmaps, and with that info the command batch converts all of the files to swf. The total process takes about 30 seconds!
Here's how you can use it:
Copy everything between these lines (not including the lines) and paste it into an empty NotePad:
Code:
//Batch export to swf; a script for Fireworks 4
//By Patrick Mineault
//patrickmineault@sympatico.ca
function checkForPC(){
if(fw.platform == "win"){
return true;
}
else{
alert("Sorry, this script works only with Fireworks 4 for Windows
" +
"If you would like to help me make the script compatible for the Mac,
" +
"please contact me at patrickmineault@sympatico.ca");
return false;
}
}
function noWindowsOpen(){
if(fw.documents.length == 0){
return true;
}
else{
alert("Please close all documents
before running this script");
return false;
}
}
function getDocs(){
alert("Select the image files
to batch convert to swf");
theDocList = fw.locateDocDialog(50, ["kMoaCfFormat_BMP",
"kMoaCfFormat_GIF",
"kMoaCfFormat_JPEG",
"kMoaCfFormat_PICT",
"kMoaCfFormat_TIFF",
"PNG"
]);
if (theDocList == null || theDocList.length == 0) {
return false;
}else {
return true;
}
}
function getExportPath(){
alert("Please choose an export folder");
thePath = fw.browseForFolderURL();
if (thePath == null || thePath.length == 0) {
return false;
}
else{
return true;
}
}
function getJPEGQuality(){
fw.dismissBatchDialogWhenDone = true;
var notFinished = true;
var result;
while(notFinished){
JPEGQuality = prompt("Non-vector objects will be converted
" +
"to JPEG's during the export process.
" +
"Please enter the JPEG quality.","75");
if(JPEGQuality == null){
notFinished = false;
result = false;
}
else if(!(JPEGQuality >= 0 &&
JPEGQuality <= 100 &&
JPEGQuality == Math.round(JPEGQuality))){
alert("Please enter a valid value");
}
else{
notFinished = false;
result = true;
}
}
return result;
}
function batchProcess(){
fw.batchStatusString = "Exporting as swf... please wait";
fw.progressCountTotal = theDocList.length;
fw.setPref("SwfMaintainObjEditable", true);
fw.setPref("SwfMaintainTextEditable", false);
var numOpenDocs = fw.documents.length;
for (var i = 0; i < theDocList.length; i++) {
fw.progressCountCurrent = i + 1;
var theDoc = theDocList[ i ];
theDocWindow = fw.openDocument(theDoc, false);
fw.setActiveWindow(theDocWindow);
convertToSWF(theDoc);
theDocWindow.close(false);
}
alert("Done!");
}
function convertToSWF(theDoc){
var lastSlash = theDoc.lastIndexOf("/");
//This part won't work on the Mac, since there is no last dot
var lastDot = theDoc.lastIndexOf(".");
var name = theDoc.substring(lastSlash+1,lastDot);
var url = thePath + "/" + name + ".swf";
fw.setPref("SwfJpegQuality", JPEGQuality);
fw.exportSWF(null,url);
}
if(checkForPC()){
if(noWindowsOpen()){
if(getDocs()){
if(getExportPath()){
if(getJPEGQuality()){
batchProcess();
}
}
}
}
}
Save this as "Batch export as swf.jsf" in C:Program FilesMacromediaFireworks 4ConfigurationCommands. The next time you open Fireworks, you'll see a new item in the Command menu, "Batch export as swf". Just run it and follow the instructions.
The script works with gifs, jpegs, bmp, tiff, pict and Fireworks PNG. Note that for Fireworks PNG the paths are exported as vectors, not as bitmaps. I've only tested the script on Windows, it probably won't work for the Mac; luckily there's an if that checks for the platform.
Anyway, enjoy!
Note: If you can fix the incompatibility with the Mac (look at the comment in the convertToSWF() function), please either e-mail me at patrickmineault@sypatico.ca, or post a meesage below.
[Edited by pmineault on 06-17-2001 at 07:35 PM]
Convert Image To Vector?
Hi folks, complete flash idiot here... Can someone tell me if there is a way to take a jpg or gif and convert it to a vector graphic? I want to be able to use it in a swish project... Possible? Thanks very much!
Convert Image Format
I need to display images inside a Ruby on Rails project as flash or swf. anyone have any ideas on how this would be done?
I upload images, resize them with mini-magick ( a ruby wrapper for imagemagick) and then place them in the filesystem. I would then like for when they are displayed inside of html to be displayed as swf to prevent people from downloading the files.
Thanks in advance for any ideas.
Edited: 06/06/2007 at 02:26:02 PM by m34joey
How To Convert A Drawing From SWF To Image/PDF
Hi All,
I need a help in AS 3.0. The requirement is, user needs to draw something and take a screenshot or in the PDF format from flash swf by clicking a Save button[Save button will be in the same flash file]. Is it possible in AS 3.0 with out any plug-ins?
Thanks,
Guru.
How Do We Convert Image Into A Shape
Hi,
When we convert a design from photoshop to flash ie animated it we import a particular image as png or jpg format and then animated it and all.
But i have just been through some fla files where the image is in the form of shape. We can change the shape of the image by the curve or strech the corners by the corner angle that we get. Here the image doesn't get destracted by the bg do gets streched or curves as we want. I wanted to know how do we convert an image to a shape in flash.
Attacehd is an image for what i'm trying to know
rgds
bn
How Do We Convert Image Into A Shape
Hi,
When we convert a design from photoshop to flash ie animated it we import a particular image as png or jpg format and then animated it and all.
But i have just been through some fla files where the image is in the form of shape. We can change the shape of the image by the curve or strech the corners by the corner angle that we get. Here the image doesn't get destracted by the bg do gets streched or curves as we want. I wanted to know how do we convert an image to a shape in flash.
Attacehd is an image for what i'm trying to know
rgds
bn
Convert Image Sequance To FLV
Greetings,
I need to convert a large image sequence (Approx. 2000 frames) to and FLV file. Is this possible from Flash 8 without any third party tools?
-Edward
Convert Image(bmp,jpg,gif) To Flash Graphics
Hi All !
All I need is a program that can converts famouse image file formats such as jpg, bmp or gif to actual Flash Graphics that we are using inside Flash. If anybody know any comercial once or anything please help.
Thx.
Convert A Flash Mx2004 To A Still Image
I need to capture a flash 2004mx image on a website and convert it to
a still image, jpg, gif.
How do I go about doing this and do I need any special program?
I am not using any flash programs and just need a still imge captured.
Thanks!
F
Convert Image Map Data To Actionscript
I have a website that has a gallery full of hotspotted images. I would like to convert the gallery to Flash. However, I do not wish to "re-hotspot" all the images. Is there a way to convert the hotspot coordinates into Actionscript and receive an equivalent shape and assign actions to it.
<map name="Map">
<area shape="poly" coords="62,104,32,29,97,67,170,32,145,99,166,133,7 7,169,20,163" href="#">
</map>
Any help would be greatly appreciated.
Convert Canvas To Background Image
Hello, I'm working on a small drawing app.. all is working well for drawing simple shapes. I have a pen tool that simply draws small line segments while the user holds the mouse down and draws. After a while the app really slows down because I have ton's of layers. I really don't need to be moving these shapes around.. so there's a lot of overhead in the layering.
Is there a way to capture all the pixels on the screen, erase all the shapes, then drop down the captured image as a background image. I figure every 100 shapes or so I could do this (if it's a slow process to do).
I found some classes that would probably do it.. but still a bit baffled on how to capture my canvas into an image.
This example I found in the docs seems almost there..
Code:
import flash.display.Bitmap;
import flash.display.BitmapData;
import flash.display.BitmapDataChannel;
var bmd1:BitmapData = new BitmapData(80, 80);
var bmd2:BitmapData = new BitmapData(80, 80);
var seed:int = int(Math.random() * int.MAX_VALUE);
bmd1.noise(seed, 0, 0xFF, BitmapDataChannel.RED, false);
bmd2.noise(seed, 0, 0xFF, BitmapDataChannel.RED, true);
var bm1:Bitmap = new Bitmap(bmd1);
this.addChild(bm1);
var bm2:Bitmap = new Bitmap(bmd2);
this.addChild(bm2);
bm2.x = 90;
Of course this is just putting random noise in the BitmapData, I'd like to capture the current screen and put it in there. Any help would be appreciated
thnx
Daniel
How To Convert Movieclip Into Image At Runtime?
hi to all
i am using AS3 and i have developed an application in which i have 5 images in library and all of them are converted into symbol (buttons) and linked for action script as class.
what i am doing is when i click an image (one of these five ) on stage then i create a new instance of that images class and display that into another area which is unfilled rectangle (which is converted into movieclip).
there are also two text boxes and the text on these boxes appears on the new instance of image in rectangle. upto this there is no problem.
i have a upload btn i want that when i click that btn then the new created image and text upon that image can upload to desired directory as image file.
can it possible to convert these three (rectangle, image and label on image)
how can i do that?
bundle of thanks in advance
Convert A MC To Image Using Binary Data
How can I change this so it saves the image as binary data. This code works fine but when the image is created the file size is too big.PLEASE HELP!!
Code:
import flash.display.BitmapData;
import flash.geom.Rectangle;
import flash.geom.ColorTransform;
import flash.geom.Matrix;
/**
* Little and simple print flash screen class
*/
class PrintScreen {
public var addListener:Function;
public var broadcastMessage:Function;
private var id:Number;
public var record:LoadVars;
function PrintScreen () {
AsBroadcaster.initialize (this);
}
public function print (mc:MovieClip, x:Number, y:Number, w:Number, h:Number) {
broadcastMessage ("onStart",mc);
if (x == undefined) {
x = 0;
}
if (y == undefined) {
y = 0;
}
if (w == undefined) {
w = mc._width;
}
if (h == undefined) {
h = mc._height;
}
var bmp:BitmapData = new BitmapData (w, h, false);
record = new LoadVars ();
record.width = w;
record.height = h;
record.cols = 0;
record.rows = 0;
var matrix = new Matrix ();
matrix.translate (-x,-y);
bmp.draw (mc,matrix,new ColorTransform (),1,new Rectangle (0, 0, w, h));
id = setInterval (copysource, 2, this, mc, bmp);
}
private function copysource (scope, movie, bit) {
var pixel:Number;
var str_pixel:String;
scope.record["px" + scope.record.rows] = new Array ();
for (var a = 0; a < bit.width; a++) {
pixel = bit.getPixels (a, scope.record.rows);
str_pixel = pixel.toString (16);
if (pixel == 0xFFFFFF) {
str_pixel = "";
}
// don't send blank pixel
scope.record["px" + scope.record.rows].push (str_pixel);
}
scope.broadcastMessage ("onProgress",movie,scope.record.rows,bit.height);// send back the progress status
scope.record.rows += 1;
if (scope.record.rows >= bit.height) {
clearInterval (scope.id);
scope.broadcastMessage ("onComplete",movie,scope.record);// completed!
bit.dispose ();
}
}
}
Convert An Image To A Button Dynamically
How to convert an image to a button through actionscript 2 (flash mx 2004)? Is it necessary to convert it to a button or there is an event so that if someone clicks on an image, he will go to another frame. I load images into my flash through an xml file and i need an event so than if someone clicks on an image, he will go to another frame.
Thanks.
Convert An Image To Button Dynamically
How to convert an image to a button through actionscript 2 (flash mx 2004)? Is it necessary to convert it to a button or there is an event so that if someone clicks on an image, he will go to another frame. I load images into my flash through an xml file and i need an event so than if someone clicks on an image, he will go to another frame.
Convert Image To Numbers (ALIASES)
Hello all,
i want to check if someone know how to convert image to aliases ?
any software can do that ?
you can check the demo made by Robert Penner, any one can tell me how did he convert his images ?
source code : http://www.souwar.com/Mosaic.zip
Thanks
How To Convert A Drawing From SWF To Image/PDF Without Any Serverside Program
Hi All,
I need a help in AS 3.0. The requirement is, user needs to draw something and take a screenshot or in the PDF format from flash swf by clicking a Save button[Save button will be in the same flash file]. Is it possible in AS 3.0 without any other server-side program?
This is very urgent. Please let me know whether this is possible or not.
Thanks
Guru.
Convert JPEG Image Into A Binary Data
Is it possible to convert an JPEG image to binary data. Because if this would be possible
then you can insert this data in a database.
Regards,
Micehal.
Click On TextField / Convert Text To Bitmap/image?
Dear All
I wasn't sure how to title this thread... What I have so far is a carouselmenu. I got a actionscript page (page1.as) where I load another one (page2.as) into.
page2.as is a Sprite (or MC whatever).
I can load and display the sprite in page1 successfully (several instances). I also have an eventhandler when i click on an instance of page2.
The problem now is that I have defined a textField inside page2 that is also being displayed. What's not working here is that when I mouse over the text, I cannot click on it (the cursor turns into the cursor that appears when I mouse over a text as in MS Word or similar for being able to mark the text). So I thought of making a bitmap out of the text field.
Can someone explain me how to transform a text(field or string) into a bitmap? I'd appreciate it to be transparent (so I have no background, only the text should be visible)...
Can anyone help me on that?
Cheers Oli
Image Sizes In Library - Should I Convert Images Back To Gifs?
I have an animated Flash file with a lot of images that I had to "convert to bitmap" in order to use Flash to clean up the edges and get rid of white artifacts (due to semi-transparent pixels at the edges when the background was removed). The images were originally scanned and have a lot of line drawing in them so I had to use the maximum settings (very tight corners etc.) to convert them. The quality is excellent.
Problem is, the fla file is nearly 8MB now. With all that vector drawing in there it takes forever just to do a test movie. I wonder if I should screen capture each image - take them into Photoshop, resave them as gifs with a transparent background, and import them back into Flash. Any ideas?
Thanks
Charles
Large Image File Sizes - Should I Convert Images Back To Gifs?
I have an animated Flash file with a lot of images that I had to "convert to bitmap" in order to use Flash to clean up the edges and get rid of white artifacts (due to semi-transparent pixels at the edges when the background was removed). The images were originally scanned and have a lot of line drawing in them so I had to use the maximum settings (very tight corners etc.) to convert them. The quality is excellent.
Problem is, the fla file is nearly 8MB now. With all that vector drawing in there it takes forever just to do a test movie. I wonder if I should screen capture each image - take them into Photoshop, resave them as gifs with a transparent background, and import them back into Flash. Any ideas?
Thanks
Charles
Loaded External Image Question: Use Default Image If Loaded Image Not Found?
Hello,
I use the following code to load an external logo into a Flash Movie.
Quote:
var myRequest:URLRequest=new URLRequest(logoPath);
var loader:Loader = new Loader();
loader.load(myRequest);
holder_mc.addChild(loader);
What if the logo file is not find? I wish that if the logo is not found, another default logo will be used, i.e.
if (logoPath is here) {
var myRequest:URLRequest=new URLRequest(logoPath);
} else (logoPath is not here) {
var myRequest:URLRequest=new URLRequest("defaultlogo.png");
}
How can I do that?
Thanks and best regards
Alex
Help Convert? Please?
okay here is what i need!!!!!
how can i convert a .fla or a .swf to .fire ?? for coffee cup firestarter???
aslo how can i edit .swf???? and with what program (i dont wanna use macremedia)
also how can i edit a .fla ??? i dont wanna use macromedia!!
hehe i hate macrrmedia...it sux
any other programs would be nice
craig..
Please Convert For Me
I am in a huge hurry and would love someone to simply write the actionscript for me..........Thanking you in anticipation
A way around loading and unloading movies continually is
simply, to put an empty movie clip on the top left corner of your stage, and call the instance "dummy" for example. Then, in your actions, you can make flash load any SWF file into this Movie Clip (Load Movie into location, target /dummy), and send tell target actions to it with the path /dummy.
Next, put an empty keyframe at the beginning of the SWF so you can load with a stop action. This will also allow you to make the loaded SWF disappear. To do this instead of using the unload movie function, simply tell the Movie Clip (/dummy) to Go to frame 1 and Stop. The movie will disappear.
To load another SWF into this location, simply overwrite it... The previous SWF loaded will still be in the browser cache and will appear instantly if you load it again into the location/target /dummy.
Convert .swi To .jpg How Do I?
i have been practicing on a geocities account to eventually work my way up to a .com site, now i need to know how to convert a .swi file to a .jpg file......and please be specific cause i am a complete idiot when it comes to this!!!!
HELP, How To Convert This
On (Release)
If (txtName ne "" and txtCompany ne "" and txtPosition ne "" and txtFrom ne "" and txtmessage ne "")
Load Variables ("cdontsMail.asp", 0, vars=POST)
Go to and Play ("valid")
Else
Go to and Play ("invalid")
End If
End On
i got this flash 4 actionscript off of some tutorial and obviously it doesn't work for flash 5. but seeing as how i am a total newb im having trouble converting it so if there is some flash god out there please help me out . thx
Convert MX To 5
Is it possible to convert my flash FX Movie, to a Flash 5 movie? My MX trial expired!
Convert Mac - Pc
Hi!
I am the lucky owner of both Flash 5 and Flash XM. Still I have 2 fla-files on my computer that I cannot open. Think the reason is that they are made on a Mac while my computer is a PC.
Does anyone know if one can convert the files, or any other Flash-files for that matter, from Mac to PC or the other way around?
Sincerly
//ikaros
Convert SWF To FLA?
Hi there, is there anybody out there knows any convertors can convert SWF to FLA?
My PC is crashed and I only have all the swf files now.
PLEASE HELP!!!
Convert JPG's To SWF's
hey,
anyone know of an ap that will convert JPG's to SWF's?
I have quick_jpg2swf, but it's ****, it changes the size of the image.
much thanks
Convert
When I convert a scence into a Movie Clip..it's now in the library..the convert process doesn't seem to convert the fram actions like shaping of a box from frame 1 to fram 10. It just shows the box. I selected all, but still doesn't work. Any Ideas of what I am doing wrong?
Convert PDF To SWF
Hi all,
I am a newbie to Flash, so please bear with me I have a PDF file with images etc that I would like to convert to a SWF with buttons to replace the PDF thumnails, but I don't know how to do it. The only thing I found was SWFTools for Linux but I use Windows and want to do it in MX. Is this at all possible?
Thanks in advance for any suggestions,
Jonathen
Convert PC To MAC
I use that tool [flash typer] in the tutorial section to convert flash files from PC to MAC. Works great. I need to find something that does it the other way now? Does such a thing exist?
I have a flash file created on MAC that I need to turn over to a PC user. Thanks gurus.
Convert Swi To Swf
I need help, I thought I new how to do this, but apparently I DON'T. I'm using swish 2.0 and I was trying to import my swish movie to homestead, but I have to have it in the swf file instead of the swi file of which I thought I had.
Well, when I get to my browser and located the swish file that I'm looking for, the file says it's a swi file, but I know when I initially saved my movie I did everything correctly.....so I thought. So is there a way the at can tell me how to take my swi file and convert them into swf file so I can use them on my homestead site.
Convert .swf To .exe
Convert .swf to .exe
Hello,
can someone help me out in converting 3 .swf files to .exe. It's 3 games.
It's a little bit urgent as i need to launch the web site tomorrow.
Thanks,
Miguel
Is It Possible To Convert Swf To Jpg On The Fly
I am working on a project in flash, where it would be very, very useful to capture the current contents of what is in the flash player and convert it to a jpg image.
Does anyone know if this is even possible?
Thanks.
Help Convert
im at a friends house doing a school project and i have the .fla file but i forgot to convert it to .swf. Can some1 please convert it for me? i dont have flash over here
Convert Exe To Swf To Fla?
Hi, I lost my fla file and now in need of converting my exe back to an fla. I am willing to purchase software that will do this however freeware preffered. Does anyone know of a company that provides software that will do this.
p.s. sorry if this is not the right room- not sure where this belonged.
Fleep
Convert Swf To Fla App
Hello,
a while back I saw an application announcement that converts an swf movie into a fla project file. Does anyone know of such application?
CV
How To Convert
How do you take a fla that has action scripts in it and layers,
and covert it to one movie clip anyone need to know how this is done
thanks
Convert Fla To Swf
i know fla is a macromedia flash file but i do not own the program and need to convert a fla file to swf so i can edit using my flash program
are there any programs that can do this apart from macromedia?
Convert Swf Into Pdf
This will be pretty tricky..
Is there anyway i could convert an swf file into and pdf ONLINE?
Meaning, i got a website with some pretty picture, is the user like it, they can "convert" those images and download it in an Pdf format?
Is it possible? Else, is Swf -> Jpg -> Pdf possible?
Thanks
chup
I Want To Convert .swf
I want to convert it to a .avi or a .mov.
I converted a .swf to a avi and it worked, but it was a small file. the movie i have that i am trying to convert now is a biger file over 3k frames and i cant seem to convert it. What can i do?
Please Help Convert To AS2
Hello,
I am having HARD time converting this small actionscript from AS1 to AS2. Please help!!!
THanks!!!
Aaron
|