ActionScript 2.0 :: Drawing API Can Quickly Slow Down A Movie

Mar 12, 2010

It seems the drawing API can quickly slow down a movie, just by drawing a bunch of static (unanimated) lines on the screen. In contrast to movieclips, of which it can handle thousands without slowdown. Makes me wonder why it doesn't just handle drawn lines as movieclips? Why does the linedrawing become slow so quickly, and is there any way to prevent this from happening?I written a quick test, and it appears to slow down, while drawing, after just 300 lines, while only after 2000 mc's the fps start to dip slghtly, while placing them. I also tried drawing every line in it's own layer but it remains much the same.

View 0 Replies


Similar Posts:


ActionScript 3.0 :: Line Drawing Is Too Slow

Sep 4, 2011

i'm developing a game for mobile devices where I need to draw many objects and some lines(1~3 just occasionally).
 
my problem in short is: Line drawing is too slow for iPhone4

objects are drawn with bitmap, so it's pretty fast with GPU support. drawing lines are slow.

a end point of a line follows mouse cursor, so it changes every frame.

here's how i did it

initialization step:
var img:Shape = new Shape();
addChild( img );

[Code]....

that gives me 47~48 FPS on my iPhone. +2 FPS but still way too slow for a simple line. 
 
without the line, i can maintain my whole game around 30 FPS. with the line, it goes below 20.

View 3 Replies

ActionScript 3.0 :: Flash Slow Drawing Of Objects

Feb 3, 2011

I've written a small program which detects my mouse movement and draws circles on the x- and y-position of the mouse.

[Code]....

As you can probably see: after drawing a lot of circles the program slows down and the framerate makes the circles be placed with a large gap between them. I would guess that the program draws what is behind the current circle even though the user cannot see it?

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

ActionScript 2.0 :: Quickly Loading And Unloading A Movie In CS3

Apr 23, 2008

I have a custom swf player, in which content is preloaded. Some of the third-party Flash content (from Captivate) I load in the player needs to be unloaded and loaded again in order to completely reset its content (rewinding, going to frame 0, does not work). Does anyone have an example of a good way to do this, as I am rather new to Flash?

View 3 Replies

Creating A Movie With A Swift Flies Quickly Across Screen?

Jul 1, 2009

I'm creating a movie with a swift flies quickly across screen, but in playback it always appears as if there are two or three swifts flying together almost on top of one another, a sort of stuttering effect in the playback.  I've tried altering frame rate/frame number ratio; tried viewing the swf file in the external movie player, but nothing seems to improve it.
 
Is this lack of smoothness a basic problem in Flash with moving objects, or is it something to do with my Flash preferences, or even my computer settings?  What are the standard ways to try and increase smoothness of playback in Flash?.

View 4 Replies

AS2 :: Animation Continues At Odd Point If Movie Is Loaded And Unloaded Quickly?

Feb 2, 2012

I have a flash file that has three main buttons on top. When a button is clicked the timeline moves to a that frame (designated with a label) that loads in a particular external SWF corresponding with the button. Those movies are loaded into the same empty movieclip called "presentation"using:loadMovie("splash.swf","presentation"); In one of the external loaded SWF's there is a tween animation (on first frame using TweenLite), that takes place upon loading the SWF. The issue is that when I click a button and go to another frame (which loads another SWF) mid-way through that animation, and come back to that same page with the animation. The animations starts mid-way as if it was running in the back, such as fading in things that shouldn't be faded in yet, etc..? Any clue as to why? EDIT: Maybe this is the cause? The animation code in the first frame of the loaded SWF:

//Animate the bouquet
var bFadeIn:Tween = new Tween(bouquet,"_alpha",Back.easeInOut,0,100,1,true); //106.95
bFadeIn.onMotionFinished = function() {

[code].....

View 2 Replies

Slow Down My Movie?

Jun 18, 2010

I have created a logo using several objects. And they come one by one on my stage while playing. But these objects (which all are movie clips) coming too fast.

View 9 Replies

Flash Movie Running To Slow On Web?

Jan 28, 2010

is there a way to speed up flash movies playing when put up on the web. I created a web banner and uploaded it, when I open the website on the browser the flash movie pauses for a few minutes and does not play straight away. Is there any actionscript that will ensure the flash movie will play instantly when on the web? Is it the file size that is causeing the swf to run slower? Is it anything to do with the publish settings in the fla file?

View 4 Replies

When I Import Swf To A Flash Movie It Become Slow

Apr 4, 2011

I animate flourish using adobe flash then export it as swf to use it again in another flash movie

when i import it i use these steps:

1- I make a symbol(movie clip)

2- I import the swf to the stage

3-then I back to Scene1 to control its size and position in my movie

BUT when I finish all these steps and play my movie the flurish too slow and not soft as original its cracks!

View 5 Replies

ActionScript 2.0 :: Slow Playing Movie?

May 17, 2002

I'm currently working on my personal site and I noticed if I have more than one mc in my timeline, when i test movie, it seems bogged down. I used vector shapes and tweened them (nothing complicated). Can anyone provide me with some info on how to prevent this or lead me to a site that explains this sort of stuff.

View 2 Replies

ActionScript 2.0 :: Movie Clip Slow To Stop?

May 21, 2009

I have a movie on the stage called wheel_mc that I want to slow down and stop using action script rather than use easing on the tween in the movie. It has 200 frames and when it gets to frame 100 it starts to slow down and by the time its reached frame 200 its completely stopped.

View 10 Replies

ActionScript 2.0 :: Slow Down & Stop Horizontal Movie?

Apr 28, 2011

I wondered if someone might be able to help me with this. I have a horizontal, infinately-scrolling movie. I would like it to slow down and come to a stop when the mouse is not over the movie.

The movie is contained within an HTML page, and if your mouse leaves the movie, it just keeps on scrolling and is very distracting.

View 2 Replies

ActionScript 2.0 :: Script Making Movie Slow?

Sep 26, 2008

I have a movie with this script in the first frame:

Code:
//MOVIE CLIP LOADER FOR EXTERNAL MOVIES
var loadListener:Object = new Object ();

[code].....

View 2 Replies

Actionscript 3 :: Slow Down And Stop A Movie Clip In Flash?

Dec 8, 2011

I need to slow down, then stop a movie clip animation usig AS3.The slowdown will be triggered by clicking a stop button.

View 3 Replies

ActionScript 2.0 :: Make A Movie Clip Slow Down To A Stop?

Apr 12, 2010

I am trying to duplicate this effect here [URL]

In particular how you hover your mouse over a section and a group of images slide left or right, but the move quickly to begin with and then slow down....

This is my movie here [URL]

I have the button areas working correctly..I just want them to slow down when its time to stop?

View 3 Replies

ActionScript 2.0 :: Movie Clip Plays Slow First Time

Nov 19, 2010

I have made a scene with a flv in it. The problem is that when I first run my scene the flv plays slow, then when I have played thru it and starts at the beginning again it plays in the speed I want it to. I would really like it to play in normal speed first time as well.

View 3 Replies

Actionscript 2.0 :: Make A Movie Slow Down Longer It Is Open?

Dec 7, 2009

Does anyone know what would make a movie slow down the longer it is open. Theres nothing that I can think of this is constantly running, but after about 15 minutes of the website being open it slows down almost unresponsive.

View 1 Replies

Professional :: When Opening The Website, The Flash Movie Is So Slow To Upload?

Apr 19, 2010

Why is it that the flash animation is so slow to upload to the site...Is this something I need to do or something to discuss with the server folks at Godaddy?

View 7 Replies

Flash :: Incredibly Slow Performance When Going To Previous Frame Of A SWF Movie?

Aug 5, 2011

In a SWF file, when I am using the following code to move backwards to a previous frame, it is incredibly slow -- Taking around 2 seconds. Where as moving forward to next frame takes 30-40 milli seconds.

[Code]...

View 2 Replies

ActionScript 2.0 :: Loading Complex SWF Into Simple Movie - Slow Performance

Jan 27, 2006

In terms of performance, does loading .swfs into a flash movie have any implications. I've been experimenting with loading complex swfs into a simple movie and the complex .swf seems to perform a lot slower within the .swf than as a standalone. The host movie has no other funcitonality other than as a simple container. Is it in general terms better not to load .swfs into a movie but to code everything inside 1 movie ?

View 2 Replies

ActionScript 2.0 :: Main Animations Slow Down A Huge Bit When Using Internal Movie (several Frames)

Jan 16, 2006

To try to avoid lag in the main animations (few ones, 5 I think), instead of having all the contents load as external movie clips in a movie clip called contentsMC (for instance), I used that contentsMC clip to contain them all, in several frames. There's no great problem in having all in one, since the contents are mainly text. The contentsMC shows up in a masked area inside the main movie clip.

I also have a transition effect, under that masked area.

When I press a button, it uses the command loadContent = #; And sets the transition effect movieclip play ( transitionMC.gotoAndPlay(1); ).

At the mid point of that transition effect (when it covers the actual content), it has the if conditions required to display what was asked.

if (loadContent == 1) {
_parent.contentsMC.gotoAndStop(1);
if (loadContent == 2) {
_parent.conteudos.gotoAndStop(2);

and so on.

However, when the transition effect is ocurring, all the animations in the main page become really slow, until it ends. Also, if I use anything inside the contentsMC, such as a scroll bar, the same lag occurs. That lag happens both with the always running animations (they are 5, I think) and with any other animation triggered during that, for instance by the onRollover effect of a movieclip.

To try to reduce that, I had set the framerate to higher values. First I set it to 50, then 60, and now it's currently at 90 (I only set it to 90 as it displays quite slower on the browser)

View 2 Replies

ActionScript 2.0 :: Drawing Box Within A Movie?

Jan 17, 2007

This code below is from a tutorial on this site, what i want to do is create a drawing box within my movie, rather than having the whole background available to draw on like in this code, I want the user only to be able to draw on a small area of the movie. I am making an interactive movie where the user is allowed to graffiti on a wall, but the wall does not take up the whole scene, and there are other interactive elements in the scene that i don't want the user to be able to draw all over

// 1. SETTING THINGS
_root.createEmptyMovieClip("line",1);
// 2. EVENTS IN _ROOT:
_root.onMouseDown = function(){

[code]....

View 2 Replies

ActionScript 2.0 :: Drawing Lines In Movie?

Oct 8, 2003

I am trying to have a line draw in my movie with actionScript...have made three lines....if I want line 1 to draw.... then..... line 2.... then line 3 do I put the script on three separate frames ?and.... right now... they are just there...how do I make it like an animation... where the line starts at the edge of my movie.... draws line 2... changes direction... draws line 2.... changes direction.... draws line 3.... then stops.

View 11 Replies

ActionScript 3.0 :: Get A Graphic From Movie Clip Without Drawing It

Aug 15, 2009

I've tried hitTestPoint(x,y,true) but then I realized that it works fine only with vector graphics (for my .png image the resault was tha same as hitTestPoint(x,y,false) - so it was unacceptable). Then I tried hitTest function from a BitmapData class like this:[code]is it possible to get a graphic from a movie clip without drawing it (it is not necessary for me to check colission)?Then, having this bitmap (transparent png file) i tried to use hitTest function:[code]

View 1 Replies

ActionScript 2.0 :: Drawing Line Between Two Movie Clips?

Mar 9, 2010

I've got two movie clips; right_hip and left_hip. How can I make it so a line is drawn between the two?And, as a precaution, how can I make one point offset? By that I mean if right_hip was a square, and it's registration point was on the left side, how do I make the line go to the centre of it?

View 7 Replies

CS3 Give Instance Names Quickly?

Jun 3, 2010

I have 100+ of the same movieclips on the stage at the same time, all positioned differently.i'm getting really tired of clicking on one of them, then clicking in the instance name box then typing "i65", then clicking on one of them, then clicking in the instance name box then typing "i66"...

is there anyway flash can fill this information in for you? or a plugin anyone's heard of? this isn't really an actionscript question, I'm not so fussed about selecting the different movieclips based on getChildAt or any of that stuff, I'd just really like a faster way of assigning instance names.

View 1 Replies

ActionScript 2.0 :: Drawing Lines In Movie Clip And Coordinates?

Apr 20, 2004

I am drawing a set of connected lines in a MC that is created using createEmptyMovieClip. The lines start at (0,0) within the MC and move into the negative x values when the lines move left. The problem I am having is when repositioning the MC. When I tell the MC to move to _x=0 and _y=0, it doesn't move to the stage's (0,0), it still hangs off the left side of the stage. The following image shows the MC positioned to (0,0) (note: the green is the stage):shouldn't the MC containing the drawn lines use its left-most point when being repositioned so that it doesn't hang off the left side of the stage?

View 5 Replies

ActionScript 2.0 :: Set Movie Clip Drawing Bounds At Creation

Jan 14, 2009

The following works just fine:

[Code].....

But, What I want is for part of the logo's image to be cut off, while still drawing without squishing. Basically, (from what I've read) I want to crop it's pixel bounds. But, the following doesn't work:

[Code]....

View 0 Replies

ActionScript 2.0 :: Draw Over Swf Movie And Save The Drawing To The Database

Jul 21, 2009

im new to this forum and kinda new to flash and php together...i have this project that would load a swf movie on a drawing board and user could draw something over then swf movie. It should be able to save the drawings to the database, so that the user could just load it for later use. for example if the user draws a zigzag line at frame 5 of swf movie and on frame 10 of the swf movie deletes the zigzag line and draw a circle and then saves it. then loads it later, from frame 1 to 4 of the swf movie the zigzag line should not show but on frame 5 to frame 9 it would show and on frame 10 shows only the circle. or just on the specific frame number of the swf movie it will show. like when user draw on frame 6 then on before or after frame 6 it wont show..the second one might be a bit easier to implement.

how do i save the user drawings over the swf movie? and how do i load it? do i have to save everthing (like x and y coordinates, movieclip names) in a textfile? and use that textfile to recreate the swf file drawn? what ways could i implemnt this? hopefully someone to could point me in the right direction.

View 0 Replies







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