Can we save an image into .doc file with AS 3.0 - actionscript-3

I am loading an external .jpg file into flash through AS3.0 with Loader class and later I need to save the image file into .doc with FileReference Class... Is it possible?
Please Help me...
Thanks a ton..

Wow... this is a good question! Yes this is possible, but not all through Flash.
REQUIRED: Flash / PHP
How to (I'll add full examples later):
(1) create a php page that will accept the raw post output
(2) set the headers on the php page to match a .doc file
(3) send the image data from Flash to PHP, have php serve the .doc file back
What this will do is allow the user to send/save the image in Flash, and have a download context box popup to save the .doc file.

Related

Extract Base64 data sets from a Swiffy file

Extract Base64 data sets from a Swiffy file
Anyone had experience with this? I had a swf file converted to html and all my images have been converted into base64 in one document.
how can i extract all the images from the html is there a program that can detect base 64 or at least detect multiple images in a html/txt file?
I just extracted from a Swiffy HTML file an MP3 file encoded as base64:
http://www.casedasole.it/testing/swiffy.html
...like this:
opened HTML file in Textpad and searched for "base64"
found this: "data:audio/mpeg;base64,fQb/4yDAA [etc., ending with] CAAIAAgAAA\u003d" (all between one set of quote marks)
copied from fQb/ down to AAgAAA (ignored \u003d")
pasted text into http://www.freeformatter.com/base64-encoder.html, clicked DECODE
was prompted with "A binary file can't be displayed inline and you will therefore be prompted to save the output as a file attachment", clicked yes, downloaded file, and added extension .mp3 to the downloaded file
It plays (in desktop FF and Chrome, with autoplay)! http://www.casedasole.it/testing/swiffy-base64.html
It wasn't an image, but with the same procedure you should be able to spot and extract images. Lemme know.

Quickly converting Word Doc into HTML

I am trying to convert a word document into html. I used an online converter http://word2cleanhtml.com/ but it does not keep the pictures I have in my file. From the html I will be making a nook and kindle ebook. Does anyone have a tool or suggestion for this project?
Using save as html in word doesn't keep images either.
Download the KindlePreviewer: http://www.amazon.com/gp/feature.html/?docId=1000765261
Then, save your file as HTML. Images will not be part of the html file, instead they are stored in a separate folder.
Open the resulting html file into the KindlePreviewer, it will find the images in the images folder and add them to your book.

FLV Player Skin Custom URL

I have a flash banner ad (AS3) which uses a FLV Player component for a remove video. The Skin exports it's own SWF file for user with the video controls as I'm sure anyone familiar with Flash knows.
Is there anyway to specify where this file is remotely? I have to provide 1 file to my advertiser, and do not want to have to create custom video controls for this. Is it possible to upload this swf file to a remote location and tell Flash to pull it from there?
Any help would be greatly appreciated.
if you're using the actual FLV component, you would use the skin property
A string that specifies the URL to a skin SWF file. This string could contain a file name, a relative path such as Skins/MySkin.swf, or an absolute URL such as http://somedomain.com/MySkin.swf.
e.g.
vidPlayer.skin = "http://youdomain.com/skin.swf";
If you're going to go that route, you need to setup a crossdomain.xml file on that server that is hosting the skin so whoever is making the request to load the skin swf is allowed.
I did banner creations for a little while and I remember the strict file size limits and the one file thing. I ended up hosting a lot of the content on remote servers too.

Web application that compiles to swf

I have a swf template that can be used with different data input such as colors, texts etc. however i don't want to use the ordinary way of binding data to it such as xml. I would like the application to be able to produce a compiled swf with all the data in it.
Is it possible to inject the data in the compilation time?
Thanks
it should be, but depends on how much you want to mess around with the code of the template.
You can embed resources in flash, so you can just embed the XML with the information you want.
Then all you need to do if find the place in the code where it loads the XML file, and give it your own embedded XML file instead.
Yes it is possible, but only if you have access to the the source .fla file, so that you can generate a new .swf file from it.
If you simply want to change a few colors or other looks of some of the objects in the .fla file you should be able to do that without having to mess with xml, simply open the library items in Flash and edit their colors.
If you want to put your external assets within the actual .swf you can do that too, but if you already have it to pull external assets I would recommend keeping it that way.
For the XML, in ActionScirpt you can actually declare the XML within the actual Actionscript code. Open up the XML file and copy the the XML contents over to your code where it is parsing it.
For images you can simply drag image files directly on the stage or into the library.

I have a .swf file in my website

I have a .swf file inside a website I've been asked to modify. Will this file contain normal html files and if so how do I get to them, there are no .fla file on the machine that created the site.
Thanks
Ross
.swf file is a flash element which is "playable" by your flash player. .swf is normally created used action script. In other words, the .swf file is the compiled version of the .fla file, and you can therefore not edit the .swf file.
Although Roskvist is completely right, there IS a way to convert .swf files back to actionscript code (and possibly .fla). This won't get you the original source code, but an 'estimated' code (with different variable names etc) that would give you pretty much the same .swf upon rendering. This can be done by software called a 'flash decompiler'.
A word of warning though: It's not okay to use this for stealing flash code from others' flash creations, you must have the rights to use any source code.