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


Similar Posts:


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 :: 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

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

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

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

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

IOS :: Drawing Images Off-Screen Results In Performance Drop

Sep 19, 2011

Im writing an IOS game using AS3. Here's the problem- I have an image on the screen that moves around. When the image's y value goes negative (the image is partly off the screen), the frame rates bottom out. I've gone over my code pretty thoroughly, even threw together a few test projects just to experiment. In all the test I do, whenever there is an object that is off screen, even partially, the frame rates drop. It's making scrolling backgrounds impossible. BTW, I'm using Packager for iPhone and a 3G (not 3GS). Frame rates are normally 24 with no problems

View 2 Replies

Actionscript 3 : :Improving Slow Performance Of Drawing Application Using BitmapData.draw()?

May 27, 2011

I am using a custom Flex skin to create an active blur/frosted glass effect on the background of floating Panels, TitleWindows, and other containers (similar to http:url....). There is a background image in the Application skin, and potentially any number of other components above and below the active blur component. Here's some relevant code within the skin:

public static const BLUR_FILTER :BlurFilter = new BlurFilter(16, 16, BitmapFilterQuality.HIGH);
private var _bitmapFill :BitmapFill = new BitmapFill;
private var _matrix :Matrix = new Matrix;[code]....

Unfortunately, the performance of this when the component is being resized, and especially when moved, is poor. There is noticeable drag delay and overall slowdown, and this is with only one popped-up TitleWindow in the test application. There is especially poor performance when components inside the TitleWindow are changed (button hover states, etc.)I've attempted to optimized a little bit by avoiding reinstantiation of the blur filter, bitmap fill, and matrix, but this has had little or no effect. I removed the blur at one point, just drawing the Application to a bitmap, and the performance is still poor, so it's clear that it's mostly the BitmapData.draw() call.

I've read about using scrollRect and cacheAsBitmap, but I'm not sure where to apply these properties (or other optimizations I'm not aware of) within the Application or its components.

View 2 Replies

IDE :: Video Streaming Technique In Flash?

Mar 2, 2010

I have embedded the video in flash in .mov format. Now I am looking for video streaming technique in flash.

View 2 Replies

Php :: HTML : Flash Player Detection Technique?

Sep 27, 2010

when we place flash files in our websites, it OFF-COURSE requires flash player on client machines, and prompts to install flash player..is there some php code using which i can check weather there is flash player on the client machine and if not then instead of placingembedding a flash file i place an images over there...cuz in my specific case flash is not that much important... it is just for cosmetics, an animation... which i can replace by a gif or a simple jpeg doesnot matter...

View 3 Replies

Play Two 2 Swf Files By Looping Technique In Flash In A Browser?

Aug 20, 2009

How to play two 2 swf files by looping technique in Flash in a browserI have a webpage designed where in i am playing a swf file in the page with some text animation. Currently one swf file is playing on my web browser, But i want to have another swf file and loop it with the current swf file and play out on the browser. Is there any looping technique in Flash on this?

View 3 Replies

Professional :: Export Technique That Flash CS5 Has For IPhone But For Windows Phone 7 Series Too?

May 4, 2010

What would be a great idea is the same export technique that Flash CS5 has for iPhone but for Windows Phone 7 Series too. 

View 3 Replies

Actionscript 3 :: Understading Flash / Flex Shared Objects And Hashing Technique

Jan 24, 2012

I was trying to observe how some of the top browser game makers are implementing the asset management and also study their animation techniques. So I was trying to crack my browsers cache and share-object paths to peep into the assets.What I have noticed is that all the files are hashed or encrypted with unreadable names and all of them have .sol extension example somethingbigandunredable.png.sol or somethinglesebigandhugtring. swf.sol and so on.I thought they are just suffixed with .sol and just removed the .sol and tried to open the png but its neither showing the previw nor opening in the browser. Same with the swf file.So I was wondering if there is any way to peep into their assets. I am aware of swf decompiler tool (currently using) which can extract only the unecrypted swfs.

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

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

ActionScript 2.0 :: Improve SEO For Flash Websites?

Oct 8, 2008

I would like to know if anybody could help me to learn more on improving SEO for flash websites as it is not as good as for html websites (if i am not mistaken).I have heard something about xml that can be used to improve your SEO for all your flash websites.

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

Improve Text Quality In Flash With Enabled 3D?

Aug 7, 2011

I've put text in TextField, set Z coordinate to enable 3D, and placed object close to the screen plane. Text quality is very bad. Is there any way to force Flash draw proper vector text? Fonts are embedded, so it's not a problem.

View 1 Replies

ActionScript 3.0 :: Improve Video Playback Through Flash Apps?

Apr 9, 2009

I understand Core Animation is Objective-C specific, and I am NOT familiar with developing AIR applications, but I was wondering if there was some how a way to trigger Core Animation through developing an AIR application? Don't AIR apps become native to the platform they're developed on?I just want to find a way to improve video playback through flash apps.

View 1 Replies







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