ActionScript 3.0 :: Flash Improving The Rendering Performance?

Apr 26, 2011

I am working on a large project and I would like some advices about improving the rendering performance when scrolling some content.I have a large sprite with a lot of content that I need to scroll and the problem that I am encountering is that when scrolling this big sprite, the rendering of the Flash Player seems to slow down and the movement is choppy.

I wrote a custom scrollbar class that simply updates the target sprite y or x properties on an enter frame event.The large sprite that I am scrolling mainly contains other sprites that have drawn shapes, loaded bitmaps and text fields.

Considering that I am simply moving the sprite, there are no other animations happening, nor other intensive processes at the same time, I do not think that it should be that resource intensive as to slow down the Flash Player that much. What can I do to improve the performance when scrolling the sprite ?(Just to give a rough approximation, the sprite that I am scrolling contains around 20-30 sprites with drawn shapes, 2-5 loaded bitmaps, 5-10 text fields.)

View 6 Replies


Similar Posts:


ActionScript 3.0 :: Improving The Rendering Performance

Apr 26, 2011

rendering performance when scrolling some content. I have a large sprite with a lot of content that I need to scroll and the problem that I am encountering is that when scrolling this big sprite, the rendering of the Flash Player seems to slow down and the movement is choppy. I wrote a custom scrollbar class that simply updates the target sprite y or x properties on an enter frame event. The large sprite that I am scrolling mainly contains other sprites that have drawn shapes, loaded bitmaps and text fields.

Considering that I am simply moving the sprite, there are no other animations happening, nor other intensive processes at the same time, I do not think that it should be that resource intensive as to slow down the Flash Player that much. What can I do to improve the performance when scrolling the sprite? (Just to give a rough approximation, the sprite that I am scrolling contains around 20-30 sprites with drawn shapes, 2-5 loaded bitmaps, 5-10 text fields.)

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

ActionScript 1/2 :: Improving Performance With Overlapping MCs?

Oct 29, 2009

I'm having some performance issues in certain areas of a flash game Im making.
 
Here's the situation: I have big movieclip containing a map that can be scrolled and scaled. There are some pannels with a bunch of MC buttons, controls, etc. on the right side of the stage. These are seperate from the map and stay in the same place.
 
Everything runs fine untill the large map is  zoomed in and/or scrolled such that the right side buttons and stuff are overlapping them map. Then the framerate jumps down from a nice smooth 30 fps to about 3 fps while the map is moving. There are no issues with the map moving when they don't overlap.
 
Now the thing is, is that's there's no real interaction between the buttons and the map. No transparency or anything, in fact I'm perfectly happy with the map dissapearing behind a side pannel. There are only about 3 pannels that the screen drawing routine would have to worry about, as all the buttons rest on top of the pannels, so why is my performance taking such a hit?
 
(Hmmm. Actually I do have a lot of transparency, but each is on top of a solid background, and none interact with the map.)

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

Flash - Major Performance Hitters Aside From Rendering Vectors?

Dec 5, 2011

In Actionscript 3, you quickly learn that using vector graphics is a guaranteed way to inflict massive damage to the performance of your project. Using a combination of Bitmap, its bitmapData property and its copyPixels() method in place of all vector graphics will yield a ridiculous performance boost and is essential for people like myself developing games within Flash. Beyond this I'm not really sure what the next major things that I should be targeting and attempting to optimize are.

I do use a lot of the inbuilt trigonometry functions, but they don't seem to affect it all that much. I know there are some libraries that optimize mathematics with some approximation methods and similar, but so far I haven't found these necessary. Are there any other massive known points I should be looking at? I'm more referring to the inbuilt things that I should be careful of (like avoiding vector rendering) rather than how to improve my own coding style.

View 1 Replies

Performance :: Measure Flex/Java App Response And Rendering Time?

Sep 19, 2011

We have Flex/Java app with a typical scenario:

Clicking the button
Preparing request
Sending request to the backend
Receiving a response from the backend
Rendering the response

How can I measure time from the start of step 1 to end of step 5?

View 1 Replies

Improving Flash Slideshow?

Aug 12, 2009

So I have made a basic slideshow on flash for a website. Nice but simple, 3 images fading in and out. But I want to make a slideshow that moves either vertically or horizontally, but most likely at an angle. I also want some text to either fade in or move as well. So I have a few questions.1) What is the best way to get th pictures to move at an angle? I have read some xml options for editing in dreamweaver, can't seem to find one for moving the picture.I would imagine you have to edit it in flash? Yes I'm new to flash!2) I take it you edit the text in flash, could it be dynamic text and what is the best way to move it?

View 4 Replies

ActionScript 3.0 :: Flash Improving Time Taken To Open Swf's In Webpage?

Nov 25, 2010

I have an html website that displays still photographs contained in a swf built in flash. I refer in particular to the images in the rectangle window on the right. [URL]As you can see the swf starts with a % preloader. The images are fairly high resolution, 14 in total (each embedded into movie clips and not dynamically loaded)I just wish to know if there is a way of SPEEDING up the time it takes for the swf to load and open in the web page, to aid users with a slower connection.I understand that if my host server is reaonably fast (which I believe it is) then the problem lies with the users connection speed, but IS THERE ANY ADD ON ACCELERATOR or CODING I can apply from my side of things ?

View 4 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 :: 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 :: Improving Workflow With The Drawing API?

Nov 12, 2009

I'm used to the drawing tools within CS3/CS4, but i tend to draw from with AS3 using the drawing API, this is because I tend to want to programmatically animate the drawing parameters.Is there some solution whereby you can use the drawing tools within flash CS3/4 but then 'capture' the drawing information so you could then draw the same line/curve/ shape from within AS3?So a pentool could then give a code output like:

lineStyle(..)
moveTo(...)
lineTo(...)

[code].....

View 4 Replies

ActionScript 3.0 :: Improving The Script Interpreter?

Nov 6, 2011

So i'm building a plugin system for my game, and i need to know actively what objects each plugin wants to use. For this, i have made a simple String interpreter. What it can do so far is separate id's and get whether a required input uses all of that kind.

my input format is like this:

Code:
IA:[param];IA[param];NN

IA is the index of all objects matching the parameter to the right of it. A is replaced by A if you want all those objects with the ID of param, or a number for a specific index.:[] tells the interpreter that what is inside the ['s is the param.the param is the string identifier that it looks for when finding objects.NN is the end sequence. this tells the engine that it doesn't need any more params.so say i had a plugin that uses the string

Code:
I2[player];IA[world];NN

the engine will loop through all objects with the ID "world" using them as the second param for the plugin's behavior, and the first will always be the 2nd "player" in the list.I can currently detect whether it wants all of a certain parameter, and what the parameter is. Now, i need to be able to find the index each param requires if it is not all. And i've tried multiple ways of doing this, but none so far have worked. What method would i use? Also, if you see anything that would kill performance in the interpreter, i would love to know, as this is called every frame.

My current code is a class with static methods called StringInterpreter, with the below code:

Code:
package Utils
{
public class ScriptInterpreter
{

[code]...

View 6 Replies

ActionScript 2.0 :: Improving Smoothness On Site?

Nov 5, 2002

Notice the animated "I"s in the top right... this is an MC with different instances of an I with a code in each one that animates it then resets it at a random size and alpha.If you scroll over the main menu buttons of the site and watch the animation sometimes it pauses for a bit. I have even removed many of the "I"s I had origonally and it still slows up a bit. This became more noticable when I added sound to the menu buttons.

View 5 Replies

Professional :: AS3 - Improving Printing Quality Of Pages

Aug 21, 2010

I am making a flip book in flash. I am using swf files as individual pages. User have the option to print pages. I am converting the swf into a btimap using bitmap data but when I print the test is not clear and all pixelated. Is there any way to improve the printing quality of pages?

View 8 Replies

Professional :: Improving Script Processing And Ensuring Completion?

Jan 7, 2011

I have a program in which I am running a number of for loops which are doing a number of different things.I pull in data from an xml file and then step through that data to dynamically create arrays, populate the arrays, and create and modify movie clips.

The program I'm building is similar in scope to one I developed in Director many years ago, and in that environment we had to actually put breaks in using timers to ensure that the data would be processed and that the system wouldn't choke.

What I'm seeing with this flash version of the application is similar and I suspect the same.  Basically, when navigating from the frame where the scripts are processed to the frame where the movie clips are displayed, there are times when it works perfectly and times when things are out of whack.  I put in a 5 second delay (arbitrarily) to see if this would resolve the issue and on my system at least it does.  But I need some advice on coming up with a real solution.

View 25 Replies

Flex :: Coding Tools Do You Use For Improving Effectivness Of Programming?

Nov 6, 2011

What coding tools do you use for improving effectivness of programming in FLEX?I found Tr.ace() AS3 Debugging Utility whichme a lot with working in a team of programmersframeworks like RobotLegs and others.

View 3 Replies

ActionScript 3.0 :: Drag And Drop Multiple Objects / Improving Code Suggestion

Feb 25, 2010

i want to improve my code for drag drop seven different or multiple objects to be moved in any three of target places then target value will be search by category or feature wise,[code]

View 3 Replies

Rendering Flash In The Server?

Oct 26, 2009

I am trying to find a way to render a Flash object, more specifically a Open Flash Chart, in the server, and save a screenshot of it to a temp file to embed it in on a PDF report.

I've found some solutions that use Javascript to generate a temp file in the browser, and then send it to the server (like here). However I need to generate reports automatically and send them as e-mail attachments, so I cannot render it using a browser.

View 1 Replies

Rendering Div Contents In A Flash Movie?

Jul 2, 2009

I have a webpage containing 2 DIV containers hidden using CSS. The site has a Flash Movie embedded. I want to render the content of these hidden DIV containers from within the Flash movie.I'm using CS4?  
 
HTML
<div id="sectionone">content</div>
<div id="sectiontwo">content</div>
  
CSS
hide sectionone div and sectiontwo div
 
FLASH
Display sectionone within flash movie when requested

View 2 Replies

Php :: Rendering Fonts From Flash To Image?

Oct 25, 2010

I am trying to render an image with text and images that are on a .swf file. What i am doing is saving all the objects and their properties in an XML and then using imagemagick to render all that. the problem i am facing is that imagemagick treats fonts very different than Flash, so i don't get a perfect copy of what i see in the flash to what i see on the rendered image.

how to match font sizes between flash an imagemagick?

View 1 Replies

ActionScript 3 :: Stop Rendering In Flash

Apr 15, 2011

Here's my problem: I have a few display objects that are modified by a loop, and I would like flash to render exactly one frame at the end of each loop. Duration of a loop may vary unpredictably, thus a constant frame-rate won't do it.

I found a hack-ish way to render one frame at the end of each loop, using updateAfterEvent with a 0ms timer. Now I want to prevent Flash from rendering frames in the middle of the loop: this is a waste of time and ressources, and produces strange blinking effects. Setting the frame rate to 0 would be an easy solution, but stage.frameRate has a minimum value of 0.01.

Question 1: Is there a way to properly stop the standard rendering loop? A workaround will not be regarded as a valid answer, because what I'm currently doing is a pretty good workaround (1 frame every 100 seconds is bearable). Question 2: Is there a better way than updateAfterEvent to force rendering?

View 2 Replies

Flash 9 :: PNGs Not Rendering As Transparent?

Sep 3, 2008

Has anyone ever encountered this weird, unique error I am gettingWhen I export my program to a SWF all the imported PNGs with alpha transparency (ie; soft edges) render totally wrong - no transparency, very blocky and pixelated. See the attached image for an example;this is out of the blue. Has exported fine recently.

View 1 Replies

Flash 9 :: HTML Rendering Of Images In TF?

Nov 20, 2008

I want to use small icons to play videos from within an HTML (CSS-styled) text field in AS3. I placed the image after the text, as you normally would. But it keeps getting bumped down to the next line. I'm worried that this is just another part of Flash's busted HTML rendering.

[code]...

View 0 Replies

RSS Reader - HTML Tag Rendering In Flash

Jan 3, 2010

I'm making a simple RSS reader in flash. I test the swf in Flash, it works perfectly. I publish the swf with html through Flash, and it works perfectly. However, when I incorporate the swf into a web site that I am currently developing, using swfobj 2.0 (dynamic) procedures (followed both by google code and lee's video tutorial on using swfobj 2.0), the html rendering does not work. I've tried copying the html code that comes from the Flash-published html, and paste that into the website I'm developing, but that straight out just doesnt work. I'm going to attach the AS3 code here. I pull the RSS xml info into flash, do a bit of string analysis to replace inactive links with active and cut out another snippet of the string, apply a style using an external css, and finally render as html.

Code: Select allvar loader:URLLoader = new URLLoader();
loader.load(new URLRequest("[URL]"));
var xml:XML;
function onDataComplete(e:Event):void {
xml = new XML(e.target.data);
var il:XMLList = xml.channel.item;
[Code] .....
Latest version of FF is used in both pics. Also, an image to illustrate what happens:

View 3 Replies

ActionScript 3.0 :: Flash Rendering Benchmarks?

Jul 12, 2011

This should be of interest to some of you, certainly those of you who are interested in the games/motion graphics side of things.eople generally accept copyPixels as the standard for "blitting" but in some cases it gets absolutely blitzed by BMFill, namely when alpha isn't involved

View 2 Replies

Professional :: Text Rendering In Flash Authoring Tool And In Flash Player?

Apr 15, 2010

i have found that:

1. There has a subtle difference between a static text field in flash authoring tool which has been set to use the device font when it's got focus(state that user can type character in) and lose focus;

2. There also has a subtle difference between when it is being rendered in flash player and in flash authoring tool.(Note that the key factor here is setting the text field to use device font.)

View 5 Replies

ActionScript 2.0 :: Rendering Html Tags In Flash From XML?

Oct 21, 2009

I have XML written using PHP taken from a database, which flash then uses to print out iinto a flash file dynamic text box. It all works fine as required, apart from not rendering html tags properly within the textfield, such as <p> and <b>. Below is my php, wrapped in the CDATA tags:

[Code]......

the textfield (mytext) is obviously within movie clip - theMovie - movies. As i mentioned the text is getting printed out fine from the database, but it ends up being just one block of text without formatting, and the tags that should be html are being taken and written literally.

Is there anything glaringly obvious that I'm not including to make sure that <p> tags and <b> tags etc. are rendered correctly, rather than just writing them out as "<p>" in the textfield?

View 5 Replies

Html :: Flash - Rendering Swf Files With/Without Swfobject?

Aug 3, 2009

Without including swfobject.js can only swf files be loaded through html.And if so is there a common tag for all the browsers.

<object id="myMovieName" classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000">
<param value="movie.swf" name="movie">
<param value="high" name="quality">

[code]...

View 7 Replies







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