ActionScript 2.0 :: Image Processing In Flash
Dec 21, 2004I want the flash movie to allow the users to apply image processing functions on the jpg files that would be loaded by them..
View 4 RepliesI want the flash movie to allow the users to apply image processing functions on the jpg files that would be loaded by them..
View 4 RepliesWe're building a web-based application that requires heavy image processing. We'd like this processing load to be on the client as much as possible and we'd like to support as much platforms (even mobiles) as much as possible. Here's the info: Image processing is rasterization from some data. Think like creating a PNG image from a PDF file. We don't have a lot of server power. So client-side processing is a bit of a must.
So, we're considering: Flash - most widespread, but from what i read has lackluster development tools. (and no iPhone/iPad support for now). Silverlight - allows us to use .NET CLR, so a big ++ (a lot of code is in .NET). But is not supported for most mobiles ( rumored android support in the future) HTML5 + Javascript - probably the most "portable" option. The problem is having to rewrite all that image processing code in Javascript.
Clarification: I don't need further ideas on what libraries are available for Silverlight and Javascript. My dilemma is choosing Silverlight means no support for most mobiles choosing Flash means we have to redevelop most of our code AND no iPhone/iPad support HTML5 + Javascript we have to redevelop most of our code and not fully supported yet in all browsers choosing two (Silverlight + Flash) will be too costly Any out-of-the-box or bright ideas / alternatives
Is there a way to process a picture > 4096 x 4096 px in pixel bender? Or any other technique?
View 3 RepliesI'm creating some image uploader in Flex with client-side image processing. Processing consists of two steps:
1. Resizing (solved)
2. Converting resized image (represented by ByteArray in PNG32 with alpha-channel) to gray-scale PNG with bit-depth = 2 and no color-palette. Is there any existing library that is capable of second step? Something like libpng for C++, maybe?Edit:It seem I stumbled upon rarely encountered problem. However my descision was to create an AS3 class that is capable of converting bitmapData to 2bit grayscale PNG. I used standart PNGEncoder and PNG format specification (which is not so good as I expected) as basis.
I am developing a Image uploader using Flash 10. I am using Filereference object to browse images and Loader to show the image:
Sample code:
var tempFileRef:FileReference = FileReference(ev.target);
var oLoader:Loader = new Loader();
oLoader.contentLoaderInfo.addEventListener(Event.COMPLETE, onImageLoad);
oLoader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, onIOError);
oLoader.loadBytes(tempFileRef.data);
It works fine with .jpg and .gif files but when I browse .bmp or .tiff file, I am getting the error:
Error #2124: Loaded file is an unknown type.
Is there a way to load and display browsed .bmp images from desktop?
I want the flash movie to allow the users to apply image processing functions on the jpg files that would be loaded by them....
View 4 RepliesI've been using Processing for around two years now, and I really like it. However, I feel like Flash is a bit more useful for coding games, as it's more universal and flexible. I'm starting to feel like I have no idea what I'm doing, and I really don't get any of the concepts like movie clips and the stage and so forth. In Processing, to make, say, a ball, I might make this:
Ball[] ballArray = new Ball[ 0 ]; //Array to store each ball in
void setup()
{
size( 400, 400 );
[code].....
And that would let me create as many instances as I like, anywhere I like.I haven't the faintest clue how to make a comparable applet in Flash.I've tried making a 'ball' class in a separate .as file, but it gives me an error about too many arguments. I also don't know how to draw a shape directly to the screen.
I'm working on a Flash intro for a site. After the Flash movie plays I want it to wait three seconds and then send them to the index page. Currently I'm using the action script:
[Code]....
I've got that keyed to the last frame. The issue is at the end of the Flash movie it displays the company logo image. Well with that script added to the last frame it just quickly blips up the logo then takes you to the main page so fast you don't even get to really see the logo. I want the viewer to have a couple seconds to take it in, but then move them along to the main site without them having to look for a button to press.
I would like to know if theirs a way where you can type in a text field something like "5*5".
And then on enter, the document would take the database and be able to return 25.
I am quite confused due to the fact that content that you input into a textfield must be a String and when you use the Number() converter the system gets confused.
This is not a specific question, instead I'm trying to get an idea of flashes capabilities. I'm building a website that has an Mp3 upload component on it. Serverside I can use the command line audio tool "SOX" for most of my heavy lifting but I'd like to offload some of it onto a flash client. Essentially, client side, needs to be able to do the following: User selects an mp3 file off their harddrive. Render it as a waveform. Display a scaled indication of 30 seconds of the waveform that the user can drag backwards and forwards. This will record a start time. Upload either the full mp3 or just the selected start time plus 30 seconds.
I've never programmed anything in flash before so I'm not really sure what it's capable of.
I want to process the credit card details within a flash/swf based form.
View 2 RepliesI have an input textbox, say instance is "inptxt".I'd like to "search" the text inputted by user, e.g. search for letter "e", if user enters "hello", replace all "e" with "s".Idk how to process inputted text...example.fla After looking at the example, you will see that I am trying to do the following:
Code:
var user_input:String = "";
//Create var for inputted text.
var changedtext:String = "";
[code]....
I bolded the part I am actually having trouble with (it's 1 line).
I'm working on an interactive company, and for each campaign we create dozens of loaders. A loader is a simple flash file contains the following elements:* few lines of code for eRate (counting how many clicks have been done on a banner)* a loader for the source banner from "http://....host.../..../" + w,h + ".swf"* a button that tells what happens when a banner is clicked (different portals as us for different scripts)Is there a way to automate the process of making such files? it takes a 1 minute to make 1 swf, but the amount of loaders make the work a bit longer.I'd like to see an application that asks for a list for sizes + eRate code for each one and the URL for the source banners.
View 7 RepliesI have an input textbox, say instance is "inptxt". I'd like to "search" the text inputted by user, e.g. search for letter "e", if user enters "hello", replace all "e" with "s". How to process inputted text. I attached an example, I am trying to do the following:
Code:
var user_input:String = "";
//Create var for inputted text.
var changedtext:String = "";
//Create var for edited text.
user_input = inptxt.text;
[Code] .....
I bolded the part I am actually having trouble with (it's 1 line).
I basically have a form inside of Flash that I need to submit to a server-side processing page, which will then return either json or xml telling if it succeeded or not ( json, xml I suppose ). My version of Flash is CS4 and I'm wondering if there are any libraries or frameworks I can use to accomplish this.
View 2 RepliesI'm trying to convert a processing sketch to a flash as3 file, and I'm getting hung up on two of processing's commands - pushMatrix() and popMatrix() - how to convert these in flash?
Essentially I just need to store the matrix of lines I've drawn so far and draw a new line, and this gets done recursively. Here's my code:
var theta;
var xpos:Number = 0;
addEventListener(Event.ENTER_FRAME,draw)
function draw(e:Event) {
[Code].....
I'm working on a cartoon series in the uk and we use flash, 3d and after effects. I'm building a little pipeline tool to help us compositors do your job (there's hundreds if not thousands of files to be comped for a great number of shows)anyhow, we use flash for the 2d animation and we need to extract pngs. Right now it's a process I can't streamline (ie compers still have to have flash opened to choose which layers to export manually) but I'd like to be able to open flash and launch a specific javascript file ('command')
View 4 RepliesI built two flash uploaders using actionscript 3 & actionscript 2 that sends files to a java servlet. The java servlet successfully receives that file, but the flash uploader fires an IOerror #2038 instead of a complete event.
There was another question is my exact same problem, but the answer "clear the cache" was very broad, and the question owner was too lazy to give a detailed description.
[URL]
I've seen some example of using a Pixel Bender for mixing two tracks together (per shader passes). However, would it be technically possible to write a Pixel Bender kernel that could do this?
[Code]...
There may be more than one answer to this, but I'd like to know if there's some technology out there that exists to handle Audio Processing / Playback in realtime, so that Flash can:
Interface with the technology / plugin to generate sounds with no delay or lag. Apply DSP effects (Reverb, Delay, Dynamic Range Compression / Expansion, Distortion, etc). Manipulate DSP parameters in realtime (sweeping an EQ filter's band or Q).
The most important thing of all, would be for this technology to be available to most users, as it would likely be used for Gaming environments or online Audio production, even. So far, Flash has a few ways to manipulate Audio Data, such as the SampleDataEvent, Andre Michelle's Popforge library, chiptune libraries like SiON, and possibly some other unheard of libraries.
I'm not really convinced though, that these methods are the optimal ways to create interactive sounds - sounds that change depending on game conditions, sounds that closely responds to the users actions. Nothing (that I've seen so far) easily allows developers to create or communicate with a DSP effect in order to manipulate the sound in this way, in realtime.
I know that Flash has the ability to communicate over sockets / ports, so perhaps there is an existing library that can communicate with an external plugin, and can be easily distributed to users at the same time.
Is there such an audio solution out there?
I'm using the FileReference Class under AS2 to pass images to php/imagick for processing and then back to Flash as JPG. The AS is based largely on the Adobe examples here: Adobe Help.Its all working fine across various platforms except that filenames which include spaces never make it to the server - turns out thats about 10% of the images folk are attempting to upload.
View 3 RepliesFlash Player 10.2.153.1and Flash Player 10.2.159.1 are crashing my standalone application. Later with version 10.1 the application run ok, never crashes but was taking more than 90% CPU. The new Flash Player solve the problem of resources, and drop down CPU to 30%, but the application crashes always after a while, unespectly, or if I open the window of other application.
In the other hand when I disable the harware acceleration at the swf settings, the application goes crazy and start to make rapid flashes, and frame rate goes down to 8. [URL]. Right click on the Flash logo, Settings,then UNcheck the hardware acceleration in Display Settings.)
I'm on a Mac Mini Core 2 Duo with Mac OS X 10.6.7 (the last Snow Leopard these days). The graphical card is Nvidia GeForce 9400M.
I did test the application at a Mac Book Pro core i5, Mac OS X 10.6.7, graphica card Nvidia GeForce GT 330M and the application is more stable but finally crashes too.
Finally if I export my application with GPU Hardware acceleration at Publish Settings, my application crashes almost inmediatly after I open it in each of the computers.
My guess is that the new Flash Version is using my graphical proccesor in a corrupted way.
I get a working application in Flash made that lets the user click to create blocks which subsequently gravitate towards the mouse. I made the exact same thing in Processing too, just to compare speeds.However, when I run the Flash version and add around 15-20 blocks, the framerate drops to 5-10 FPS.In the Processing version I can add ~60 with no noticeable slowdown. What's the deal, Flash?
Links to each version's source:
Flash version
Processing version
Here is the source for each in case you are a wizard and can help just by glowering at the code sternly and telling it to behave:
Flash version:
blocks.fla
import flash.events.Event;
import flash.display.MovieClip;
[code]....
The XML file is formatted like this:[code]The traces are all for debug purposes.If I place this code into the actions panel of the first frame of the flash document (without the thisObj:TriviaGame = this part), everything works fine and I get correct traces.If I place this code within TriviaGame.as, all of the traces print 'undefined', but it claims to have opened the file correctly.I've found a lot of XML tutorials on this site, but none of them seem to deal with processing XML from within a class file--they all put the code directly on the frame.
View 2 RepliesI have to use an XML that starts as follows:
base.xml
Code:
<mythuitheme>
<window name="backgroundwindow">
<imagetype name="backimg">
[code]...
However, to render it thus appears to me the following error: Error # 1083: The prefix "size" element "small" is not determined.
Code:
<mythuitheme xmlns:size="localhost">
How can I make this change to the XML dynamically in Actionscript 3? Without changing the file directly.
PS: I have another XML (theme.xml), where the problem is to have repeat the same node name, identical in everything, for example:
Code:
<buttondef name="WIFI_TRACKING">
<image>buttons/WIFI_TRACKING_off.png</image>
<activeimage>buttons/WIFI_TRACKING_on.png</activeimage>
[code]...
How can I, dynamically, eliminate one of them?
I have a large amount of MovieClips and I want to change the ones of class "Circle". So far no problems. However, I want to change the ones with name "S2" to another frame than the rest. I have tried several methods, but couldn't get it to work.
Code:
for(var i:int=0;i<numChildren;i++) {
if (getChildAt(i) is Circle) {
if (MovieClip(getChildAt(i))._name == "S2") {
[Code].....
I've got a function that loads an XML file, and processes it into an array. Outside the function, if I trace for any of the contents of the array, it comes back undefined. What I've noticed is that the trace command is triggered before the array has been populated, even though the function to populate the array is called prior to the trace command.Here's the code:
Code:
var playListArray = new Array();
var myXML:XML = new XML();
myXML.ignoreWhite=true;[code]......
I am looking to delay the processing of coding for 1 second. A user will hit button and some of the coding is processed, a delay will then take place for 1 second or so and then process the rest of the coding. Does anyone know ho to achieve this?
View 8 RepliesI have created 3 forms.The forms appear to operate correctly.You receive an error message when the form hasn't been filled out correctly and when you fill the form correctly it appears to process the forms information.However the information is never received in my email account.I am assuming there is an issue with the php file.URL..
View 11 RepliesI'm using Flash Builder 4.6. As a simple example, say I have the following application:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:s="library://ns.adobe.com/flex/spark" xmlns:sdk="services.sdk.*">
[code].....