ActionScript :: Create Image From Data-in-uri (base64-encoded PNG) In It?
Jan 11, 2011
I have a string of of base64-encoded PNG image that is suitable to use as a src (source) attribute in a <img> tag. However I need to transfer this image to Flash applet where I need to create (show) the image fast. Is there a way to simply use the data string and somehow create an image (inside a Flash movie) from it?
I'm developing a flex application that displays a list of images along with some metadataThe images are less than 500kb. They are stored in the database as base64 encoded stringsretrieved using PHP, send over to flex as XML (which creates a fairly large XML output file)Now my problem is that, while I can display upto 2-3 images easily, anything more than 3 or sometimes 2 images will cause the images to be corrupt. Sometimes the whole app fails.I am guessing this is due to the large size of the generated XML. I know I am doing something wrong here. I want to know what is the proper method for storing/retrieving a lot of images in a flex application.
I'm trying to create a list with icons. There're a lot of examples but seems all of them are using embedded images.My problem is how can I create the list with icon from base64 png string at runtime?
I have an actionscript 2 code that uses base64 to encode/decode incoming data. problem is that data is binary and includes null (0 characters), actionscript 2 fails when handing null to charCodeAt.I figured what I need is an actionscript 2 lib that can do base64 encoding/decoding on an array rather than a String.
I have this code which Im using to pass data in JSON encoded format to php. Is there a way I can check at the php end if it was received and beamed in proper format? var people:Array = new Array(); var person:Object = new Object(); var url:String = "[URL]"; var request:URLRequest = new URLRequest(url); var requestVars:URLVariables = new URLVariables(); [Code] .....
I want a class that I'm going to pass a short bit of XML data And then I want that class to create either a Sprite or Clip that consists of an image and some text based on the XML data Example my XML might look like
I know how to get to the data what I'm looking for is the best way to create this Sprite on my stage.should the class create a sprite or clip?should the class called to create an instance and then I addChild in my core script?
In javascript, I have a variable which holds a pdf in base64 (the pdf is generated in flex and passed to js). I want to open it in the browser (ie I want the browser to display the open/save dialog box letting the user open or save the pdf).
I am using Data URI which works fine in some browsers, but is not supported in IE 6/7:
function getPdf(pdf) { window.open("data:application/pdf;base64," +pdf); }
How can I get this PDF to open in IE6 and 7? I've read about MHTML as an alternative to data uri but I don't think it can do what I need, or can it? For now I just need to open pdfs but in the future I will probably need to add support for xls (MS Excel) files too. Currently I'm using Flash's Filereference.save to let the user save the pdf to the disk then he can open it, but the client is insisting on giving the user a choice to open it automatically rather than forcing him to save it first.
I have recently been using Charles the debugging app. And noticed a very chatty app named skyrocket (a very very cool slide presentation app) sending a lot of data across the wire. It is built in flex by the looks and I was wondering why they had chosen to send their data using base64 and not amf. Is it because they don't want to be locked into the flash platform? Or could there be another reason. Is it to store it as XML in the database as they don't want to be dealing with amf when handing data to other services/clients (iPhone etc).
I'm using AS3 to base64 encode a JPG and pass it to Javascript. I'm attempting to use AJAX to pass that base64 encoded string to PHP and have PHP decode it. (I know I could send it back to Flash and Flash could decode it and send it to PHP, but I'm trying to eliminate the need for Flash on the decoding end).It appears that AS3's encodeToBase64String() function and and PHP's base64_decode() function do not use the same algorithm, as PHP evaluates it as a base64 encoded object, but does not seem to output it properly
I am referring to Send image from flash to Asp.net for sending image captured by a webcam to an asp.net page. However I need to download base64 encoder to proceed. The link the user provided for downloading it seems to be broken. Can anyone tell me how I can download the base64 encoder?
'm trying to convert a movieclip to base64 and send it a server.
I've checked everywhere and I realized I can do it with an external PHP page that will communicate with the flash file and will send the MC as BASE64 JPG using POST.
Unfortunately, my client asked me to do that WITHOUT ANY EXTERNAL FILES (so I can't use the PHP page). Only the final SWF should be used.
I've tried to convert the project from AS2 to AS3, but it seems to be almost impossible.
Is there any way to convert the MC to JPG without the PHP page?
Is it possible to pull questions from a data file into flash without having to create new frames for every question. This would be a multiple choice test. We currently hand type the questions into multiple frames and grade at the end.
I have a issue here with unzipping the .zip files that i have in combobox.i select 1 .zip file and after selecting the particular .zip file Button should unzip it and put the contents in another combobox.
So I'm using AlivePDF to generate a 6 page PDF with a range of text and graphics. It's a fairly large PDF, prob 4mb when saved. I need to be able to pass the PDF along with a few other variables to a PHP script that uploads the PDF and then sends an email.
Because I need to pass the PDF data along with other information, I've been using a standard POST request with URLVariables, only I Base64 encode the PDF ByteArray before sending to avoid any sort of corrupt data. This works fine, except the Base64 encode operation takes ~8 seconds, and sometimes longer on a slower machine, causing a timeout.
I want to get image data from php and also display in flash. I want to know... how to read and display imagejpeg( $imgData ); from php. I am able to get php data in flash through below method...
I attempting to make a slideshow like the one on this page: [URL] But i was wondering if it is possible to change the code so that if you click on the main image, another image could come up next to it? (I'm making a portfolio site, and i want people to click on one of the main images to then see a detail image next to it).
I'm trying to create a simple image player that tweens from one image to the next every 5 seconds. The data is being pulled from xml.
So far, I have managed to load the image onto the stage, but am now stuck as to how to get it to remove the child showing, the add the next child every 5 seconds.
My Code:
Code: var tweenTimer:Timer; var imageLoader:Loader; var xml:XML;
is there a way to resize an flv? i have a client that gave me a set of FLVs that a previous designer made for him. the client no longer has the original mpgs. these flvs are much larger than we need them for the new site, and if i just resize them from flash on playback they look terrible and are an unnecessary longer download. i tried importing the flvs into flash's encoder, flixpro and squeeze and haven't had any luck.
I put the h264 packets into flv file with the flv file format in video_file_format_spec_v10.pdf. I used CodecID=7(AVC) and filled video data with h264 encoded packet. But it doesn't work. The codec lib is x264 with CABAC enctropy. The test.flv file in attachment is what I created using x264. Below is the media infomation about test.flv.
I'm working on creating a widget that displays the local weather forecast. I have the RSS feed I'm working with, but in that feed, there is a tag for <content:encoded> It looks like this:
What I want to do is to be able to grab the URL for the image and use it in the Flash movie..I can parse the rest of the XML just fine and it works perfectly for what I need...except for that one image I want.
When I try to import an MP3 file (specs below) I just bought off Amazon into Flash CS4, I get an error that reads "One or more files were not imported because there were problems reading them." I tried other MP3 files and they worked no problem. Does anyone know if there's a specific type of MP3s that Flash hates? Maybe I need to convert my MP3 to be encoded differently?