ActionScript 3 :: Improve Performance Using Blitting For Graphics?

Sep 9, 2010

I am a bit new to using blitting for graphics. But I have worked up a few demos myself, and I have been reading a lot of information on the methods used. One common theme I have been seeing though is that all of them brute force rendering; drawing the farthest back object first and stepping through all other objects. even drawing objects that are going to be completely overlapped. The reason all of them say this is that any kind of testing to see what should be drawn actually takes more time than just drawing everything with no checks. Is there any kind of way to detect what should be drawn, that will run faster than just drawing everything?

View 1 Replies


Similar Posts:


Flash: Improve Performance By "breaking Apart" Graphics And Creating Symbols?

Mar 18, 2011

In flash, if you have a complicated graphic (like a complex diagram) that doesn't change much and you want to move/zoom/rotate it around, then does Flash perform better if you convert all graphics into symbols? Or does making symbols slow things down?

Background: Sometimes, you do things for so long, you can't remember why you started in the first place. Whenever I import graphics in flash (like from Illustrator, for example), I select everything, press cmd-B (or ctrl-B on Windows) repeatedly, "breaking apart" everything until I can't, anymore. Then I press F8 and create a symbol.

That's just what I've done for like the last 10 years. It's to the point where I don't even think about it, anymore. I vaguely remember doing this after learning that performance improves when you break apart graphics to create a symbol.

Now, I have a problem: I'm translating/rotating/scaling a massively complex, static diagram and it's too sloooow. I'm trying every technique I can think of to speed things up—every little bit counts.I've read this link and lots of others but I haven't come across the topic of creating symbols.

Summary:should I go back through and make everything a symbol? Should I go through and make everything NOT a symbol? Which is faster?

View 1 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

Flex :: How To Improve Performance Of App

Jan 19, 2010

I am working on a flex application. The application occupies 100% of the browser screen, but it is slow to load. How should I improve the performance, what are the best techniques one should follow for improving the performance of a flex App. I did try some stuff though, I am not using relative layout instead i am using absolute layout and putting the buttons/images etc at exact places in a Canvas, still i feel it is slow. Can I profile the App or flex code to see where exactly the app is taking the maximum time to execute.

View 3 Replies

Media Server :: How To Improve FMS Performance

Mar 25, 2011

I have two FMS 3.5 streaming servers... Both have Windows Server 2003 x64 with 16 GB of RAM..I'm streaming from a common storage and my Application.xml file is like this:

<Application>
<StreamManager>
<VirtualDirectory>

[code].....

View 7 Replies

Flex :: Improve The Performance Of PurePDF?

Jan 31, 2011

I am using the Open source PurePDF library in my Flex AIR application. The problem is performance:It takes 100% CPU usage and too long to generate a PDF.

I have done some analysis on it and find that the text writing in pdf is expensive. That's why I need to know how I can improve the performance. Are there any fonts for which pdf generation is less expensive, or is there some setting or tip that can make this process somewhat better in terms of performance? secondly in case of images the ImageElement generation is very expensive when writing that element to PDF. Is there any way to reduce the processing?

I found a way to reduce the ImageElement generation processing by resizing the image using flex and by then passing the small image's bitmap data to the image element. It works fine, and i have reduced the time of execution to a good extent. is there any way to tell PDF to work in chunks or divide the work in such a way that it may take more time to complete but won't block the GUI while the PDF is being generated?

View 2 Replies

Actionscript 3.0 :: Blitting Lines - Draw Approximately 50000 Lines And Performance Is Poor?

Aug 17, 2011

I have been working on a map viewer based blitting technique. As part of the map I need to draw approximately 50000 lines and performance is currently really poor.

Code: Select allvar movie:Shape = new Shape();
for( ... )
{
movie.graphics.clear();[code].....

View 2 Replies

ActionScript 3.0 :: Improve Performance By Using Multiple Air Apps?

Feb 17, 2012

I have a program that is decently complicated in one area and the rest is simple. The complicated stuff is data crunching, pretty much. Would I get an increased performance by doing the data crunching in a second app and just having it send the couple bits of info I want from it to my other app that would be the front end of the program? Or is this a dumb idea? I know air doesn't by default multi thread, so I was just trying to think of a "work around."

View 1 Replies

Flash - Possible To Improve Performance Of Drawing Technique?

Oct 22, 2010

Am currently working on a tool created by a colleague of mine and would like to improve performance. Basically, it's a tool for drawing on screen and uses a combination of Sprites and the Graphics class to draw a line segment every time the mouse is moved when the mouse button is down. Here is the drawing bit:

// on MouseMove
protected function drawLine(e:MouseEvent):void {
if (currentTool.thickness > 0){
//pen
var line:Sprite = new Sprite();
line.graphics.lineStyle(currentTool.thickness, currentColour);
[Code] .....

As you can see, it checks if the line 'thickness' property and draws if it is and erases if it isn't. I did think of using a technique similar to blotting here where it'd draw to a bitmap but I'm not sure this'd give the performance boost I want or if, indeed, there would be any way to have an eraser function. The drawing itself works nicely - this isn't the problem, it's the performance of the subsequent 'drawn' sprites.

View 3 Replies

Flex :: Improve The Performance Of The SQLite Database?

Apr 26, 2011

Background: I am using SQLite database in my flex application. Size of the database is 4 MB and have 5 tables which are

table 1 have 2500 records
table 2 have 8700 records
table 3 have 3000 records
table 4 have 5000 records
table 5 have 2000 records.

Problem: Whenever I run a select query on any table, it takes around (approx 50 seconds) to fetch data from database tables. This has made the application quite slow and unresponsive while it fetches the data from the table.

How can i improve the performance of the SQLite database so that the time taken to fetch the data from the tables is reduced?

View 3 Replies

ActionScript 3.0 :: Improve Performance With Embedded FLVs

Aug 6, 2009

I've been building a project that is essentially a mashup style editor. You pick from a series of clips, arrange them in order, and then can play them back. Originally it was a series of FLVs that would play one right after another, one stops, next one starts, but this wasn't seamless. So I switched to embedded FLVs inside of SWF files.

Locally this performed better, the videos were more seamless, no gaps where the video disappears because the FLV isn't ready to play, but online it brings the flash movie to a crawl. In total I have 56 video files, either FLV or SWF. There are 4 "tracks" that play simultaneously. Each track is made up of multiple clips. I'm preloading the videos so they are ready for playback when the time comes. The videos are alpha transparent.

View 0 Replies

ActionScript 3.0 :: Improve Real Time Graph Performance?

Mar 20, 2011

I'm working on a simple real time graph. The data is polled every 50ms, and each poll translates to a line one pixel wide, (data_point) pixels high. The graph scrolls such that new data is on the right, and the oldest values eventually fall off the left.

My solution is embarassingly brute-force, in that I just use theMC.graphics.clear() and a loop of lineTo()s for every graph refresh. While this displays correctly (and I can control the refresh rate to mitigate the CPU burn), it should be painfully evident why I want to move away from this method.

I want to programatically scroll or pan the entire graph one pixel to the left (and drop the leftmost line), and then just draw one new line on the right, but I can't figure out where to start. Assuming such a thing is possible in AS3, would someone be so kind as to point me in the right direction?

View 2 Replies

Actionscript :: Improve The Performance And Reduce Code Size?

Jan 25, 2011

There is so many ways to improve the actionscript performance and reduce code size. Let share what tricks you can come up with.

View 1 Replies

ActionScript 3.0 :: Improve Graphics Drawing Angle?

Dec 28, 2009

I have a code, that draws a horizontal line, then it turns into a slope, and at the end of the slope it draws a circle. Here's a code:

Code:
var xspeed:Number = 1; // defines increments for x of slope
var yspeed:Number = 2; // defines increments for y of slope
var hspeed:Number = 5; // horizontal line increments

[code]....

Create document 800x700 and put this code into main timeline. Now test movie As you can see, everything works great. But there is a problem. The circle is being drawn at 0 degree angle. But I want the circle to match the angle of the slope, so it looks like the slope and the circle are both at the same angle.

View 3 Replies

Actionscript 3 :: "destroy" The Camera Object For Improve The Application Performance?

Jun 21, 2011

I am using the Camera on Flash, but when I finish to use, now can I "destroy" the camera object for improve the application performance?

private var camera_atual:Camera = Camera.getCamera();
private var video_camera:Video = new Video(820, 546);
camera_atual.setQuality(0,100);
camera_atual.setMode(550,480,30,true);
video_camera.attachCamera(camera_atual);
this.palco_mc.addChild(video_camera);

View 1 Replies

Actionscript 3 :: Use Adobe's "Stage3D" To Improve The Performance Of My 2D Applications And Games?

Jan 18, 2012

I've been doing a little bit of reading about Stage3D, which will be a new API used with Flash Player 11.Will this API improve the performance of 2D rendering (Vector) in any way, or will the library be used primarily for rendering 3D?

View 3 Replies

Flex :: Improve Datagrid Performance When Using Itemrenderer With In Datagrid?

Jul 31, 2009

For poor performance reasons, the DataGrid will cache checkboxes and reuse them for different rows. If you have 50 rows, it won't create 50 checkboxes. It will create as many checkboxes at are visible, plus a few more for padding, and then reuse them as you scroll. This is why you need to explicitly manage their state. How can improve it ? How can fixed checkbox value ? i used checkbox like below But checkbox doesnot remembering the values

[Code]...

View 3 Replies

ActionScript 3.0 :: Blitting + Pixel Perfect Collision?

Oct 23, 2011

I'm using a blitting engine that uses bitmapData. No display objects.Is there a fast pixel perfect collision detection available for such a game system?I already tried CDK but that didn't work because it assumes you have display objects which my objects don't use. Sometimes my objects are pretty big and hitTest sucks in this case. I already tried circle-to-circle collisions but that didn't do the trick either.

View 1 Replies

ActionScript 3.0 :: Unable To Use Tile Sheet For Blitting?

Feb 20, 2012

I am trying to get bitmapdata from a loader to be able to use my tile sheet for blitting. I seem to be unable to get it to work. After some testing I noticed that none of the code after this piece is executed in the SWF, so apparently it always freezes at this point:

ActionScript Code:
tileSheet = (evt.target.content as Bitmap).bitmapData;
bmp = new Bitmap(tileSheet);
addChild(bmp);
Obviously I am doing something wrong.

View 9 Replies

ActionScript 3.0 :: Blitting CopyPixels With Pooling BitmapData?

Nov 7, 2010

What do you think about mixing this two up? Would it lead to better performance for the scenario described below?However, method done below still contains jerking/stuttering in animationWhat my app does is to create a random mix of smiley and draw it into the canvas, and update the movement of the smiley (x,y)I have a source bitmapdata containing different smileys each of the same size.Example:The app creates a random mixture of smileys inrandom length;Example:tc...I have 2 vector that acts as pool. 1 vector is to store bitmapdata1 vector to store SmileyObject (SmileyObject has 3 properties, positionX, positionY,bitmapData)If the pools is empty, I create a new bitmapdata and SmileyObjectThe bitmapdata copypixels random smileys from the source bitmapdata.This is then placed into SmileyObject.I have a loop that goes through each smiley objectand copypixel each bitmapdata into the canvas along with the x,y position.However, even with copypixel and pooling bitmapdata + smiley object,I can still view the stutter / jerk / stuttering / jerking in the smiley animation.

View 6 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

Actionscript :: How Much Faster Is Blitting Than Using Vector Sprite Objects In Flash

Feb 18, 2011

I know there are different situations where one would be better than the other, but I'm comortable with a generalized statistic of... How much faster is blitting than using vector Sprite objects in Flash?

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

ActionScript 2.0 :: Attach Graphics Instead Of MC Cause A Graphics File Size Is Relatively Small Than That Of A Graphic?

Apr 9, 2005

I was wondering about MC and hey can help to lag a game out. I set up an advanced class system so i don't have to use MC to simulate walls, all i use isthe x,y,width and height. Well anyway since i don't need MC anymore I was wondering if there is a way to attach Graphics instead of MC cause a Graphics file size is relatively small than that of a graphic, I think. If anyone could tell me thats true and show me a way to attach graphics that would be nice. I haven't tried it yet but maybe if I exported the graphic from the library imihgt be able to call its name, but it doesn't have an instance name so im stuck.

View 2 Replies

ActionScript 3.0 :: 1119: Access Of Possibly Undefined Property Graphics Through A Reference With Static Type Flash.display:Graphics.

Oct 8, 2009

i am trying to receive in my function as a parameter either a shape or a sprite and then access their graphics property, but this gives me an error:

Code:
public static function makeRect( obj:DisplayObject, ...
var g:Graphics;
if(obj is Sprite){

[code]...

//1119: Access of possibly undefined property graphics through a reference with static type flash.display:Graphics.

View 1 Replies

Way To Improve Video Quality

Jul 14, 2010

There is no maintainAspectRation property for video object.Then how to improve the quality of video when even we resize the video dynamically.It has to maintain good quality.How to achieve this.

View 7 Replies

IDE :: Faulty 3D Transformation - How To Improve

Jan 31, 2009

I'm playing around with Flash CS4 trial and tried to 'compose' a 3d Box by putting 6 MovieClips as the side elements of the box in one clip which represents the whole box. (only using the Flash Tools, no Actionscript). Within the BoxClip (after doubleclick on the BoxClip on stage), all sides look right, each side is positioned with the correct angles and coordinates. Outside the BoxClip, back on root stage, the box sides are not parallel anymore, the angles are not 90 degrees, there is no 'box' actually. So I guess, one of the problems is the 3D Center point of the objects which is absolute to one point in coordinate space. The other problem is the faulty '3D' display in Flash, that is, changing from inside to ouside a clip changes the view also. So far, the Flash GUI seems quite useless for doing some '3D'. How to improve the workflow?

View 3 Replies

IDE :: Improve Quality Of Sound?

May 28, 2010

The quality of sound when playing my flash file on the timeline in flash CS4 is excellent, however when I go to test movie the sounds quality becomes awful, like its being played in a tunnel on terrible speakers, my sound files are .wav files, am I missing a process I must do to ensure the quality of sound is carried through to the final published animation?

View 5 Replies

Improve Font Appearances In Flash?

Feb 24, 2010

I am using Helvetica Neue 43 Light and it looks great as Dynamic Text without embedding the fonts. It is nice and bright, sharp edging, etc.

I notice though, that on other computers, the Helvetica Neue font is displayed as Times. I am presuming because these other computers do not have Helvetica Neue installed on their computer system.

If I embed the fonts, it looks the same as static text or text that I have broken apart. The fonts are thicker and has blurry edges.

Is there any way of getting around this and have my Helvetica Neue looking sharp and crispy like dynamic text without embedding the fonts.

View 3 Replies







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