AS3 :: Performance - Stagesized Bitmap And Update Regions?

Feb 28, 2012

I have a project where i'm drawing to a stageSized bitmap by using BitmapData.drawusing the 'show update regions' feature of the debug player, i can see that the player always updates the whole stage although i changed only a small part of the bitmapdata.Can I somehow make the player only update that part of the screen where there were changes made to the bitmap data?

View 2 Replies


Similar Posts:


Actionscript 3 :: Update A Portion Of A Bitmap With A Pixelbender Instead Of The Whole Bitmap?

Feb 17, 2012

In pure AS3, I have a pixelbender and a large bitmap. The pixelbender is configurable with a distance parameter to affect only a small area of the bitmap. The problem is that the pixelbender is executing over the whole bitmap. What would be the best way to update only the effected region of the bitmap? Given this config:

[Code]...

View 1 Replies

ActionScript 3.0 :: Getting The Bitmap Rotation Performance?

Dec 15, 2009

I've been developing an application which uses a lot of sprites to create a 'wheel of fortune'-like object. Since I use several filters, sprites, countless calculations, and various other tricks to draw it, it became painfully slow to try to spin that, as flash had to redraw everything every frame.

Needless to say, I took the bitmapData 'snapshot' approach - I drew the massive combined sprite to a bitmapData, removed the original sprites, filters, et al from the display list and nulled them, Threw the BMD into a Bitmap object, placed that in a container sprite so that I wouldn't have to continually use a matrix to rotate from the center when it registers at the top left, and started rotating the container.

Unfortunately, it seems that rotating the container with this 500x500 Bitmap in it is nearly as slow as it was when I hadn't snapshotted it and rotated the whole thing, filters and all. I have already played with the BitmapData's transparency, turned on and off cacheAsBitmap on various combinations of containers and the bitmap itself (hahaha), checked the Bitmap.smoothing property out, blah blah blah, the whole nine yards. Rotating a decently sized Bitmap (thus making pre-rendered/calculated frames a really bad idea) ... how do I make this run at a tolerable speed without eating my CPU and turning the fans on?

View 7 Replies

ActionScript 3.0 :: Slow Performance With Bitmap Erasing?

Nov 26, 2008

for the past couple of weeks I've been learning AS3, and for a school project I'm doing a remake of the popular DOS game Liero. Everything is working fine, I got a layer of dirt that I am shooting away, but the problem is that after a few hundred bullets, the game starts to lag heavily whenever a shot is fired.I'm using a simple bitmap and a brush to erase the parts where the bullets hit.

// Drawing stage
bmap = new BitmapData(1100,800, true, 0);
dispBmp = new Bitmap(bmap);

[code]...

View 1 Replies

ActionScript :: Flash - Bitmap Caching Vs Image Asset Performance

Mar 14, 2011

i've created a full spectrum color wheel Sprite object that is composed of 1440 vector triangles, or slices if you will. since i want to animate the color wheel, i've activated the display object's cacheAsBitmap property. however, caching the vector as a bitmap does not increase performance during animation it remains slow, jumpy. importing a PNG screenshot of the color wheel into the library with lossless compression, converting it to a Sprite, and rotating this new image asset performs great during animation. why does an uncompressed PNG image asset import out perform the same vector image with cacheAsBitmap property set to true?

View 1 Replies

ActionScript 3.0 :: Poor Quality Of Resized Bitmap After FP Update?

Mar 7, 2011

Now, after my flash player update from 10.0 to 10.2.152, resized image quality is poor. Also quality depends on original image dimensions, even 1px difference in width or height for same user's original image for some reason can affect differently on quality of resized image.Actionscript Code:

result = new FileWork(Bitmap(loader.content));
Actionscript Code:
package fgm{  import flash.net.*;  import flash.system.*;  import

[code].....

View 1 Replies

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

Flash :: Selecting Regions Of Image?

Jun 10, 2010

I am trying to write a flash app that will allow a user to select various regions of an image, similar to that of the selection tool in photoshop where a square region can be stretched and selected.
 
Would anyone have any ideas or tips for me that could get me going in the right direction? I have been researching for tools to help me write this but haven't been able to find anything useful..

View 5 Replies

ActionScript 3.0 :: Overlapping DrawRect() Regions 'exclude'?

May 7, 2009

Using Flash CS3 If I draw two overlapping rectangles with two different fill colors, I get the expected results.If I draw two overlapping rectangles with the same fill color, the overlapping region appears white, almost as if there were an exclusion blend applied. 

View 9 Replies

Professional :: White Regions When Running Movieclips

Feb 25, 2010

when we are running movieclips in flash for a few minutes, white regions or white artefacts will start to appear on the screen, and it will slowly grow in size.we have cleared the objects from memory, but these white regions are still coming.

View 3 Replies

ActionScript 2.0 :: Formatting XML - Roll Over On The Respective Regions?

Jul 25, 2010

I have a fla wherein when I Roll Over on the respective regions some text and images are displayed in the respective position ( text loaded in a dynamic text field). Now all these info are from XML file. I want to format it but have no idea how to do this one. I like to make it underline, want to make some paragraph , like to make some text bold and so on ...........

[code]...

View 2 Replies

Professional :: Breaking An Imported .png Image Into Clickable Regions?

Feb 16, 2012

I have a .png image of all 44 US presidents, I'm trying to figure out how I could break it apart so that each president can be clicked on.  I'm a fairly experienced actionscript programmer, have done some game development work in the developer role but never in the design/UI role, thus I'm not great (or even good!) at some of the beginner stuff regarding UI.  I was thinking I could use the lasso tool to select an area, then somehow make that selection into a grapic or movie clip symbol, but I can't seem to get that to work and I'm wasting a lot of time experimenting!

View 1 Replies

Flex :: Diffrent Values Of Alpha For Different Regions Of A Sprite?

Feb 18, 2010

I have a Sprite covering the entire screen.Other than a certain rectangle of this sprite.I want the rest of the sprite to have alpha = 0.5. And for that particular rectangle, I want alpha = 0.

View 2 Replies

Actionscript :: Flex Forcing Smaller Redraw Regions

Jul 13, 2010

I've got a small action-script chart, that's meant to be live updating, and also be able to support more than 10000 points of data. The way it's currently set up it doesn't need to redraw the whole chart if the new line we wish to add doesn't extend that chart's boundaries. Yet it does, the redraw regions show the whole chart as being redrawn as opposed to the single line i need to add. When the chart gets a new piece of data from the javascript it does the following.(some stuff has been stripped for clarity.[code] Is there any better way to do that, that won't redraw the whole screen? Is my coding pattern wrong for this type of update?

View 1 Replies

ActionScript 3.0 :: Images Be Selected At Various Regions And Their Color Can Be Changed?

Aug 13, 2010

I just wanted to know about a website's logo application. The website is www(dot)Logomaker(dot)com and I have question about how can the images be selected at various regions and their color can be changed ? What format are the images in the flash?

View 0 Replies

ActionScript 2.0 :: Reducing Redraw Regions In Snow Effect?

Jan 18, 2011

I've been making a flash animation for a client - the dimensions of the stage are 2,000px wide, 800px tall. They want a graphic in the background and a snow effect in the foreground.

The code I have written uses TweenMax to move a snowflake that has been dynamically loaded from the library on to the stage using attachMovie. When the clip leaves the stage, it is deleted and a new clip is created at the top of the stage.

I expect flash to redraw the background that the flakes pass over, but flash seems to also be redrawing space between the flakes - as if they were one movieclip - even though they are separate instances.

View 7 Replies

ActionScript 2.0 :: Store Array In An Indexed Object Called Regions

Nov 3, 2009

I have an array name region it has a couple of properties. "code", "name", "value"

I want to store this array in an indexed object called regions.

I would then like to access the object by referring to its sub property name

regions[1].code
regions[1].name
regions[1].value

I can set an array region.code, region.name and region.value but I can not set the regions values

regions[1].code = "abc"
regions[1].name ="alphabet"
regions[1].value =26

note: region is singular and regions is plural(many)

Can someone outline the variable definition and construct so I can access this information. Happy to replace the index field with the code value.

View 1 Replies

Flash :: Professional - Update Via SCUP - The Client Is Not Supposed To Be Interfered With The Update Progress

Nov 17, 2011

I am deploying Updates via SCUP and SCCM to hundreds of Computers. Fortunately Adobe provides an SCCM Update Catalog for both Adobe Flash ActiveX and Adobe Flash Plugin. But now my Problem: After publishing the Update via SCCM, the client is not supposed to be interfered with the Update Progress (which is working) I figured the Updater works like this: First SCCM checks if a Update needs to be deployed, if this is the case, The Flash Updater begins. First the old Flash Version is beeing uninstalled. But now: if the Client has a Browser Window (IE, or Firefox) open, the Updater is not able to install the new Flash Version and quits with an Error. This leaves the Client PC without any Flash (because its being uninstalled before) How can I prevent Flash being uninstalled due to the Update progress not working while a Browser window is open?

View 1 Replies

Actionscript 3 :: Movieclip Using A Timer To Update Dynamic Text. No Update?

Dec 12, 2011

I've got a movieclip, which has got a dynamic text element.The movieclip uses a package for its codeThe package if obviously derived from the MovieClip classI've got a timer, that updates the dynamic text field every second.When debugging the code, I see that the timer works well. Its updates the value of the dynamic text field.

View 2 Replies

ActionScript 3 :: Make Regions Like In C# , To Group A Part Of The Code Allowing Us To Collapse It?

Apr 7, 2010

Is there a way in flex (Flash Builder 4) to make regions like in c#, to group a part of the code allowing us to collapse it and see through our project more easily?

In c# it's like:

#region exammple

// my funtions I want to group

#endregion

View 3 Replies

ActionScript 3.0 :: Viewing The Same Html File In Mozilla, "Show Redraw Regions"?

Jan 4, 2010

I am working in Flash cs3. I am having problems with mozilla related to contextMenu.
 
Using contextMenu, i removed all BuiltInItems. Its working fine in IE.
 
when i am viewing the same html file in mozilla, "Show Redraw Regions" option is still visible when i am right clicking on browser. In IE, its fine.
 
How to remove this option in Mozilla.

View 3 Replies

ActionScript 3.0 :: Bitmapdata.hitTest - Bitmap 'emptyBitmap' With Bitmap Data Created

Feb 3, 2009

I'm cutting my teeth in actionscript 3 on a game that has a character running through a world. So, I have set up my Hit Testing by using the bitmap data hit test method, since I figured my world is going to be destructible - it'd be nice to update the level and then redraw it and have the character interact with the new change. (That works beautifully) I am however; a bit confused as to how I have my hit Testing set up. I've been messing around with it, and it works for now - but I'm not sure why.. currently, I have a character set up by using a class I built and using a series of animations I created. So, this character has a walking and falling animation, etc. This is a movie clip.

Then there's a bitmap 'emptyBitmap' with bitmap data created - however; I never really added this as a child to the character. This is sized to the dimensions of my character. My level is created as a movielip, then it's drawn to a bitmap - when the level movieclip is changed, the bitmap redraws, and that's how this updates.

[Code]....

View 1 Replies

ActionScript 3.0 :: Use The BitmapData Property Of A Bitmap And Pass It To The Constructor Of A New Bitmap Object?

Aug 20, 2009

I know the topic of "duplicating" movieclips is a hot issue with the new virtual machine. Luckily, I understand the implications. I only am [currently] interested in duplicating a Bitmap. See, I load an image from an URL using 'flash.display.Loader.load', which is a non-blocking operation in Flash Player.However,I may use multiple copies of the loaded image (which is reported to be a Bitmap, naturally) in the display list at the same time.Hence, I naturally do not want to load the image from an URL every time, because I don't want to wait for a non-blocking call to complete. Nor do I need to - I mean one copy is already loaded, so it should be possible to just "duplicate" it, right?

My idea is to do use the bitmapData property of a Bitmap and pass it to the constructor of a new Bitmap object. I have not tried the following in action, but I want to hear whether any of you did and if the following would not work, what would:

Code:

var original_bitmap: Bitmap;
var copy_of_original_bitmap: Bitmap = new Bitmap(original_bitmap.bitmapData);

LiveDocs mention that the BitmapData being passed to a Bitmap constructor is "being referenced", which to me might suggest it cannot be used twice? There is also the BitmapData::clone() method, which I am not sure is applicable here or not.I know this is a lot of talk instead of just trying this out, but I test so much Flash Player code daily just to see "what works" (which should be documented instead by Adobe),

View 4 Replies

Flex - Function To Redraw Bitmap On Sprite Without Passing In Said Bitmap?

Feb 22, 2011

If I have a BitmapData that's already been drawn onto a Sprite. Is there a way to redraw the BitmapData onto a Sprites Graphics object without having to invoke beginBitmapFill and passing in the same BitmapData?

View 1 Replies

ActionScript 3.0 :: Drawing From Bitmap To Bitmap Overrides Earlier Graphics?

Dec 29, 2010

I'm working on a game, and to keep performance good, instead of addChild'ing 50 new sprites to the stage every second, I decided to have each player draw to their own bitmap, and then to the 'master' bitmap. This introduces an issue though: the second player would override all data the first player has put into to bitmap...My basic debugging proof of concept:

Code:
// bitmap test

import flash.display.Bitmap;
import flash.display.Bitmap;[code]......

View 1 Replies

ActionScript 3.0 :: Copying A Rotated Bitmap Into A Bigger Bitmap?

May 9, 2011

I have a bitmap which has several frames (packed along the horizontal axis). In order to render them I copy it to the backbuffer (larger bitmap) as follows:

Actionscript Code:
public override function copyToBackBuffer(db:BitmapData):void{ if (active)  var drawRect:Rectangle = new Rectangle((currentFrame-1) * frameWidth, 0, frameWidth,

[code].....

View 5 Replies

ActionScript 2.0 :: Bitmap Font Text Drawn To Bitmap

Oct 8, 2006

Is there a way to write a bitmap font right into the bitmap being desplayed? Mabey better worded: myBitmap.draw(image, t) draws a picture is there a way to draw text? I'm stuck even if its just a work around in some way I would like to know... (the current work around i have in my head is writing it in a movieclip turning that into bitmap data and drawing it... esentially creating a prototype answering my question... but a built in way would be easier probably).

View 2 Replies







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