Actionscript :: PNGEncoder Performance And UI Blocking?

Sep 25, 2009

I'm trying to use PNGEncoder to encode a bitmapData object into a png ByteArray so I can send the data to the server. Everything would be peachy except the bitmapData is 4000x4000px and when I run the PNGEncoder.encode function on it the whole app stops (UI is blocked) for 5-8 seconds while it runs. Does anybody have any suggestions on how to not make it block so bad, I read about chunking up the process (since you can't multithread in AS3) but can't find any sample code on chunking up the process.

View 6 Replies


Similar Posts:


Performance :: Performance - Hold MouseDown To Increase Speed/power?

Sep 12, 2011

this is what i'm trying to accomplish; With a click on a movieclip (cannon_mc)a shot is being fired (ball_mc)

The longer mouse is down, the speed of wich the ball is fired with should increase.My question to you is;

What is the most efficient way to accomplish this? With a timer or something like this;

[Code]...

View 2 Replies

Performance :: Optimization - Improving Performance With Large #'s Of Objects

Jan 11, 2011

I'm devloping some library classes for flocking/steering behaviours on large numbers of objects (2000+). I'm finding that at < 500 instances, performance is reasonable. As the numbers increase, framerate bogs down.

I've seen remarkable performance with libraries such as Flint or Box2D with ridiculous #'s of particles / objects, so it should be possible to optimize / refactor my code to be a bit better.

I'm aware of the basic optimizations, such as bitwise operations and optimized for loops. Are there any more fundamental approaches I should be considering? For example, currently each instance is a vector-based MovieClip. Would working with BitmapData be more efficient?

View 1 Replies

Performance :: Flex - Using Nested ViewStacks Cause Performance To Decrease?

Nov 4, 2011

Will I take a big hit in performance using nested ViewStacks? Should I strive to handle all navigation in one ViewStack and push children manually or will the affected performance be negligible?

eg.
<viewstack>
<tabnavigator />
<tabnavigator />
<tabnavigator />
</viewstack>

View 2 Replies

Performance :: Improve Flex Performance For Invisible Views?

Mar 19, 2012

We have a medium size Flex 3.6 application that contains around 20 different page views (managed via a single lazy ViewStack) each having multiple components. Most use custom renderers.All model data is loaded at startup and changes to model instances are communicated via binding and/or collection change events.Once the user has viewed each page at least once, all page views are instantiated and happily listen to update events.Which in effect means that each time a model instance changes, all interested views receive that event and compute derived data or trigger item-renderers.I have tested and confirmed this behaviour in a proof-of-concept application. Even when setting a list to being invisible, it still listens to collection change events and invalidates any renderer affected.What would you do?

View 1 Replies

ActionScript 3.0 :: PNGEncoder With PHP?

Aug 23, 2011

I am trying to utilize the PNGEncoder with the dynamicfash Base64 to send a Base64 String to PHP and save the PNG File but for some reason that i cannot figure out, the PNG file is never readable. It is there and has a size (contains data) but cannot be opened by anything so is not a valid png file. Here is my code...

Code:
var target:MovieClip = new MovieClip();
target.graphics.beginFill(0xff0000,5.0);[code]..........

View 1 Replies

ActionScript 3.0 :: PNGencoder WITH Transparency?

Feb 8, 2011

im using the pngEncoder from adobe, its working great. But all my .PNG's are saved with a whit bg, how to export with transparent?

ActionScript Code:
function eventPostPictureToServer(e:TimerEvent):void
{
var urlLoader:URLLoader = new URLLoader();

[code]....

View 1 Replies

ActionScript 3.0 :: ImageSnapshot And PNGEncoder In Flash

Sep 27, 2010

As usual I've come across something easy to do in Flex but not in Flash. Flex has ImageSnapshot and PNGEncoder to get a .png out of a display object. Any way to do this in flash without using a 3rd party API as I can't distribute a license with my app. I'm using Flash CS5. I wish there was as much support for Flash as there is for Flex. I've had to write my own tree component, if I'd have used Flex I could have just used the Flex tree component. I'm hoping I don't have to write my own display object to png class myself.

View 2 Replies

ActionScript 3.0 :: Any Way To Use PNGEncoder Multiple Times?

Jun 7, 2009

I have a large image that exceeds the bitmapdata limits, so I am trying to break it up into 4 separate images and encode them separately using the PNGEncoder. The first 1 comes out great. The remaining 3 all contain the same bytearray data and result in a blank image.

Code:
public function encodeUsersDrawing():void{
pngImageQuadrant1 = new BitmapData(1875, 2400, true);
pngImageQuadrant2 = new BitmapData(1875, 2400, true);
pngImageQuadrant3 = new BitmapData(1875, 2400, true);
pngImageQuadrant4 = new BitmapData(1875, 2400, true);
[Code] .....

View 2 Replies

ActionScript 3.0 :: PNGEncoder - Save A Png Image Onto The Server But It Is 0kb

Dec 23, 2010

I am struggling to encode and then save a png image onto the server. The file 'myImage.png' gets saved onto the server but it is 0kb. My actionscript is:

[Code]....

View 1 Replies

Flex :: Making Images 300dpi From Pngencoder?

Dec 26, 2010

Also i understand that i only get 96dpi from image, because of my monitor dpi, but I need to make sure that even it generates 96dpi, it really is 300dpi quality.

I am taking 28 original images from user and making a "thumbnail picture collage" out of it for printing. I dont get the crisp quality in generated collage images, compared to originals. Here are my function, I really need to generate photo quality images for printing.

private function createImages(object:Object):void
{
progress.text = "Start Generating Images ( "+(index+1)+" - 28 )";
images_array.push(ImageSnapshot.captureImage(album.tilesList[index],30 0,new PNGEncoder()));

[Code].....

View 1 Replies

ActionScript 2.0 :: AS3 Way To Use Jpgencoder / Pngencoder Classes From Adobe

Jun 14, 2010

Is it a way to use jpgencoder/pngencoder classes from adobe in AS2 projects?

View 2 Replies

ActionScript 3.0 :: PNGEncoder - Saving Image Onto Server

Dec 23, 2010

I am struggling to encode and then save a png image onto the server. The file 'myImage.png' gets saved onto the server but it is 0kb.

My actionscript is:
import com.adobe.images.PNGEncoder;
import flash.display.BitmapData;
import flash.utils.ByteArray;
// Go to PHP Page.//
bitmap_btn.addEventListener(MouseEvent.CLICK, gotoPHP);
function gotoPHP(event:Event):void {
[Code] .....

View 2 Replies

ActionScript 3.0 :: Flash - Keep 'Alpha Channel' Data With PNGEncoder?

Jul 25, 2011

I'm trying to import an image and assign it to a Loader object, which works just fine, though I want to use the PNGEncoder rather than a the JPGEncoder, because if the source image has an alpha channel (transparency) I want that data preserved. The code, or the encoder, or something is preventing or deleting the alpha channel data. What should be transparent is showing as white.

[Code]....

View 2 Replies

Flash :: Merge Multiple BitmapData Objects Into One So That It Can Be Encoded Using PNGEncoder?

Jan 30, 2012

I am creating a program that is effectively an sprite creator. I'm very new to AS3, but I know JQuery, JS, PHP, etc. After going through multiple steps of selecting pieces to customize a character, you are supposed to be able to download the final product using fileReference(). Everything works, and I can download the image in the end, but the problem is that I cannot capture all of several movieclips on the stage, I can only capture one. Maybe this will help clarify:

[Code]...

Could it be that each of the movieclips I'm adding to the sprite have children of their own?

View 1 Replies

ActionScript 2.0 :: Jpg Is Blocking GotoAndStop?

Jun 8, 2009

I've got a strange thing in attached fla: my gotoAndStop command won't go past a photo?First I've got the 'background' layer. On it is a red rectangle on frame 1 and 2. Frame 3 changes it into a jpg.

On the actions layer I've got a gotoAndStop(4), which should show the photo and trace a command. But it won't get past the red square? It's like the jpg photo blocks the gotoandStop(or Play for that matter) command. It doesn't trace to prove that the gotoAndStop command is executed on frame 4 and it keeps showing the red square on frame 1 and 2. Where it should show the photo which has already been placed on frame 3. when I replace the photo with a normal Flash shape (rectangle e.g.) it works fine.

View 2 Replies

F8 :: Actionscript 2 Blocking Off Screen

Nov 6, 2009

I am creating a very simple interaction. I have a symbol as a moviclip which I can move around the screen using the arrow keys. I want to block certain parts of the stage so that the movieclip cannot pass into them. For example if I have a fence on the stage I don't want the movieclip to move over the fence I want it to stop when it reaches it. This will keep the user moving in the directions that i want, lead them toward another area of interaction.

View 2 Replies

White Bar Blocking Text?

Jul 29, 2009

I have an animation, when i preview it looks fine, but when i use the timeline to scroll through the animation (and when i export as .avi) - there's this strange white bar over the text! I have tried to remove the object from the library, but then the text disappears (also when i preview)

If you wonna check it out, the .fla file is here (5mb) : [URL]

View 2 Replies

Java :: Non-blocking Io In Flash?

Feb 28, 2010

is there non-blocking io in flash? I need it for my live chat project.what thing need if i make a live chat with the web cam in java.

View 1 Replies

_rotate Is Blocking Timeline Animation?

Aug 21, 2009

I'm using Flash 4 and AS2;I've composed the code such that my MC (called hole) will turn slowly upon entering the first frame:

var hole:MovieClip;
this.createEmptyMovieClip("rotator_mc", this.getNextHighestDepth());
rotator_mc.onEnterFrame = function() {
hole._rotation += 1;
};

Then, on frame 55 I have:

rotator_mc.removeMovieClip();

to stop the clip. After that, I animated "hole" on the timeline to shrink... but when I play my movie, the timeline animation doesn't happen.

View 7 Replies

Javascript Blocking Flash Content

Oct 21, 2010

I'm working on a simple website for A level ICT and am having some difficulties. My site has a javascript based drop down menu, as well as two .swf files embedded. When the drop down buttons in the menu are scrolled over, the .swf files disappear.index1.jpg is a screenshot of the page normally, index2.jpg is a screenshot when the menu link is scrolled over.I am also having difficulties with flash working with java on another page, the same .swf files do not fade into the background like the rest of the page when images are enlarged in a javascript gallery within the page. gallery.jpg shows this.

View 2 Replies

Professional :: TextFields Are Blocking Buttons?

Mar 20, 2010

I've been creating a calculator as part of an assignment. I've created button instances in actionscript and then putting a text field over it. The problem is the text field blocks my button so it is difficult to press.exaple code:

var equals_btn:equals = new equals();equals_btn.x = 247;equals_btn.y = 369.9;equals_btn.width = 115;equals_btn.height = 45;this.addChild(equals_btn);
var equalText = new TextField();equalText.x = 276.1;equalText.y = 349.9;equalText.width =

[code]......

View 5 Replies

Professional :: MovieClip Is Blocking My Button

Dec 14, 2010

I have various buttons on stage that will initiate a popup box upon hover. But some of the pop up boxes are too big and covers some buttons which disables the button.Is there anyway around this? Logically, when a button isn't hovered, its popup box shouldn't cover what's underneath it. I have tried moving the layers around, although this works, but now the buttons are on top of the pop-up boxes which is no good.

View 3 Replies

Flash :: Blocking Clicks In An External SWF?

Apr 11, 2012

I have a first SWF, the interface, which loads external SWFs, the pages, throughattachMovie. The pages themselves contain clickable buttons. What I am trying to do is enable and disable the buttons on the pages, without altering the code of the pages. I can only change the contents of the interface.I have tried using a blocker, a movieclip with :

onrelease = function() {};
onpress = function() {};
useHandCursor = false;

[code]....

View 1 Replies

Chrome IFrame Blocking Out Flash

Aug 4, 2010

An image says a thousand words:URL...A flash object in a CKEditor dialog is being blocked by the IFrame element. This only happens on Chrome. I have tried changing the z-index, that didn't work at all.

View 1 Replies

ActionScript 3.0 :: Use Navigatetourl Without Popup Blocking?

Jan 4, 2010

I am having a terrible time trying to sort out a clickTag issue.

I have now decided in placing an embedded url within the flash file and use the navigatetourl code.

It seems to be blocked in IE.

View 0 Replies

ActionScript 2.0 :: Blocking The Hit Area Of The Button?

Jul 3, 2003

I have a button (with actionscript) under some dynamic text. The dynamic text, including some small transparent space around it, is blocking the hit area of the button. How do I solve this problem?

View 2 Replies

ActionScript 2.0 :: Blocking Buttons On Level 0?

Jun 9, 2008

made a site with several buttons that load other .swf on level 1 which cover the entire stage, but the buttons that are on level 0 can still be clicked on. Is there anyway to block these buttons while the level 1 .swf is playing

View 1 Replies

ActionScript 2.0 :: Firefox Blocking Pop Up Window?

Jul 30, 2008

I have a Flash movie that loads an html file with a link that should open a new window when clicked. The problem is that Firefox blocks the new window from opening, and I don't know how to solve it. Unfortunately, I have no access to the HTML page where the Flash will be included, so I couldn't use Javascript in that HTML page.This is the code in the HTML file that is loaded into the Flash movie:

<p>This is the company that makes Photoshop:<a href="http:[url].... target="_blank">Adobe</a></p>

View 3 Replies

ActionScript 3.0 :: Firefox Blocking URLRequest?

Aug 16, 2009

I've created a client that communicates with a server via XML-RPC through a network using the URLRequest object to contact the server.

When activating the client through flashplayer, explorer or chrome, the xml-rpc messages are sent. When using firefox, for some reason these xml messages are blocked, and are not seen on the server.

What's causing firefox to block xml messages to a remote server and how can I make it work??

View 10 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved