ActionScript 3.0 :: Double Buffer Program Is Slowing Down?
Sep 22, 2010
I have a small Dancing Lines program like an old Windows screensaver program and it appears to slow down after about 30 seconds to a minute.I "clear" my buffer by copying a screen sized black symbol to the buffer. If anyone has any ideas about how to make this more efficient and most importantly stop the slow down.
// Variablesvar x0:int;var y0:int;var x1:int;var y1:int;var x2:int;var y2:int;var x3:int;var y3:int;var dx0:int;var dy0:int;var dx1:int;var dy1:int;var dx2:int;var dy2:int;var dx3:int;var dy3:int;var counter:int = 0;var clearBuffer:Buffer = new Buffer();var[code].....
P.S. - Is there a way I can post my code in a smaller box with a scrollbar?
View 7 Replies
Similar Posts:
Apr 16, 2009
I have helped write a program in AS3 that uses classes. We have 2 frames in our movieclip that consists of an ant moving. We have a class of ants and can create 15 instances of them and the program runs fine with the ants walking around looking for food and going back to a corner that is their nest and going back out again. The ants also respond to mouse movement if the mouse pointer is near an ant.
If we create more than 15 ants, then the program starts to slow down. If we have 30 ants on the screen, then there is noticable stuttering of the ant movement. The CPU usage on a P4 2.5Ghz Pentium is around 50%.
View 13 Replies
Mar 5, 2012
I know already that Double click event is not available for iOS(iPhone, iPad).But for example google map or other drawing applications have function of double click to scale up.
I have found sample program at Web. But I cannot found the ActionScript3 program to implement double lick event for Air for iOS.
View 2 Replies
Nov 4, 2008
Im trying to add an exit button onto my program so when its clicked it exits the program completely.. I've tried some of the suggestions on the forums but they arnt working. what I have been using and its not working..
// CLICK to Exit
exit_Btn.addEventListener("mouseUp", goExit);
function goExit(evt:MouseEvent) {
fscommand("quit");
};
View 9 Replies
Sep 29, 2010
Is there a way to start an unrelated program (such as Window's media player) from inside of a flash program?
View 2 Replies
Mar 24, 2003
I need to program a timer for a typing tutorial program. It needs to go to 5 minutes. When the timer gets to 5 minutes the movie has to go to frame 13 which displays the results of the typing test.
View 1 Replies
Oct 26, 2010
i have the following code ]
[Code]...
but no connection established what is the reason behind not know help required and one more thing XAMPP is installed in D: drive.
View 1 Replies
May 20, 2008
I've got a bug in my code, where a button has to be double clicked to work.Just wondering what is the standard distinction for the difference between single and double click.
my code
ActionScript Code:
ns.seek(0);
subtitles._visible = true;[code].....
the idea is that it runs a function only when the above button is pressed, but it doesn't seem to work the first time you press the button ?
View 5 Replies
Oct 13, 2009
i have this slider effect and would like to reduce the transition speed between images, thus the circles take longer time to pass, anyone can help me out?here is the link for downloading the flash file[URL]
View 1 Replies
Nov 27, 2008
I have a problem with the camera slowing down in my project.I thought it could be because of the complexity and memory consumtion of this work, so I created a completely new movie, typed such code:
quote:
var camera:Camera = Camera.getCamera();
var video = new Video(camera.width, camera.height);
video.attachCamera(camera);
addChild(video);
[code]....
And... this time the camera's fps stayed 25fps all the time. To be honest - I really don't know why :| I mean, I'm happy the fps stayed stabily at the level, but I don't know what to do in the mentioned, complex, project to make the fps faster. I can't just add the trace line.
View 5 Replies
Jul 11, 2009
I have a slideshow on the opening page of my website and about a minute and a half in, it starts to slow way way down. It looks choppy and really bad - I had the slide in its own file and it was fine - then I made it into a single movie clip and cut and paste it into the website on the first frame so it would play automatically right away - then it started doing the slow thing when I previewed it
View 1 Replies
Nov 24, 2009
I have a gallery flash that loads a pictures from xml. The pic slides on from the right. When btnNext is clicked it slides off to the left and the next pic slides on from the right. There is also a btnBack which slides on the previous pic. There are around 200 pictures.
I have now spent weeks on and off trying to figure out why it slows down and starts to chug! I figured out, with the help of individuals on this forum, how to remove the pictures when they are off stage. It definitely helped but its not yet resolved.
This flash is quite processor intensive with the amount of graphics. But the thing is, when the flash start off it goes fine but after so many pictures it starts to chug. Which seems to me that there is somehting it is not GCing or something of the sort!
[Code]...
View 2 Replies
Aug 20, 2009
I'm currently creating a rewind function that makes a video go to a certain frame number when a button is clicked. The issue is that the code is shooting through the frames too quickly. Is there any way to slow this down?
Code:
stop ();
slider.minimum = 1;
slider.maximum = target.totalFrames;
slider.liveDragging = true;
[Code].....
View 3 Replies
Mar 24, 2012
I created a very simple application that increments a counter and displays said counter on the stage. At around 18,000-20,000 iterations, I noticed a serious drop in FPS. Here's is the entire [code]...
View 2 Replies
May 20, 2005
Is there a way in AS to double the number of frames instead of manually going back into the movie and adding more frames or slowing down the frame rate? I need to slow this movie down, but I don't want to sacrifice quality
View 9 Replies
Aug 20, 2009
I'm currently creating a rewind function that makes a video go to a certain frame number when a button is clicked. The issue is that the code is shooting through the frames too quickly. Is there any way to slow this down?[code]
View 1 Replies
Nov 24, 2009
I have a gallery flash that loads a pictures from xml. The pic slides on from the right. When btnNext is clicked it slides off to the left and the next pic slides on from the right. There is also a btnBack which slides on the previous pic. There are around 200 pictures.
how to remove the pictures when they are off stage. It definitely helped but its not yet resolved.
This flash is quite processor intensive with the amount of graphics. But the thing is, when the flash start off it goes fine but after so many pictures it starts to chug. Which seems to me that there is somehting it is not GCing or something of the sort!
View 4 Replies
Sep 14, 2003
I have a problem with my movie clips slowing down when another movieClip is being played. I have the interface and transition completed, but everytime u click a button, the transition element moves extremely slow, because my buttons themselves contain movieClips. Is there anyway to have the movieClips move at proper speed, even if they overlap one another, and play at the same time
View 2 Replies
Apr 20, 2009
I imported Embaded Movie to Flash (that won't be on my TimeLine to save space), and i m using the FLVPlayBack to run it.
My problem is that the player plays the movie too fast for displaying.
Is there a way i can slow down the movie?
View 1 Replies
Nov 30, 2009
I editted it from a template and I find that the scroll seems to be too fast. Is there a way to slow it down or make it clickable instead? The website isI dont have a css file, it is all done within an fla
View 1 Replies
Jul 13, 2010
I have a tileList that I'm loading swfs into. One of my swfs has a particle system in it and every time it is loaded into the tilelist the particle system slows down. Every time the swfs are loaded I use tileList.removeAll() to clear it and then tileList.addItem() to repopulate the tileList. My guess is that this isn't actually unloading the swfs completely so they are building up in memory. What do I have to do to unload the swfs completely to prevent them from slowing down?
View 1 Replies
Mar 3, 2011
I am using the ENTER_FRAME function with Math.random to animate / simulate a random number range, as you might see in a digital voltmeter for instance.
the range goes from 12.0 to 12.9 and works good, but my problem is that i need to slow down the rate at which the numbers change.... A LOT.
Is there anyway to do this without slowing down the whole timeline???
Currently my AS is confined to the digital volt movieclip.
This is what i have:
addEventListener(Event.ENTER_FRAME, fl_EnterFrameHandler_1); function fl_EnterFrameHandler_1(event:Event):void{ var newVal:Number = 12 + (int(Math.random()*10)/10); volt.text = newVal.toString();}
View 2 Replies
Mar 28, 2011
I work on a PC and use flash CS3 and am truly struggling to slow down this entire file someone kindly made for me. I can move all the end key frames from 40 frames to 600 frames but it is working out how to do the others accurately plus the key frames on the arc start line which is the 3rd line down.
View 1 Replies
Mar 20, 2011
To cut a long story short, i'm learning flash in order to get a job in 2d interface design. I had some basic knowledge of the software prior to this, but i needed to further my animation to compliment my design skills, so bear in mind that this is my first major flash project. So far, everything was going well, and i was managing to achieve my vision so to speak, but i have hit a brick wall with this problem. The interface starts with three menu options, single player, multiplayer & settings; each staggered behind and to the right of the last. However the transition i have made between them (basic motion tween with blur filters changing slightly) stutters everytime.
I have uploaded the animation here so you can see for yourself. Also, here is a screenshot of the timeline for the first transition: It does it a little bit in the scaled down version, but if you view it full screen it really slows down. Also, if anyone can be bothered to wait through the slow stuff to see the animation that works
View 7 Replies
Nov 22, 2009
I have a main movie in which I load two types of external movies, pages and themes. My main swf slows down which each click of one of the menu items. I've tried doing and unloadAndStop for the external swf's but that does even put a dent in the flash player memory usage as shown by System.totalMemory trace.
A theme will load in an empty movie clip(acting as a container) on the stage, then a page will load in another empty movie clip on the stage. For example, pageContiainer movie clip will receive page1.swf. themeContainer will receive themeNeutral.swf.
I'm thinking this should not be an issue, as each movie clip simply receives an external swf, which is then replaced by another external swf upon a given load command. But I can't seem to get the looaded SWF(s) out of memory and the System.totalMemory just keeps going up and up.
[Code]...
View 0 Replies
Jul 1, 2011
I have an Image gallery built where the images scroll on a loop from right to left. When you rollover the centre of the gallery it stops so that you can pause to see the image. When you roll off it then starts scrolling through the images again. how to get a motion tween on this using as2. I want it to slow gradually to a stop and then start moving gradually when you roll off.
View 8 Replies
May 1, 2006
here's my code:
Code:
var foodArray = new Array();
var loopCounter = 0;
var newNum;
[Code].....
But I get this problem in flash when I test or view the external .swf:
"A script in this movie is causing Flash Player to run slowly. If it continues to run, your computer may become unresponsive. Do you want to abort the script?" Then two buttons, "Yes" and "No".
When I click "Yes" the swf plays and my numbers in my array trace out non-repeating, the way I want, but the rest of my movie behaves funky.
View 1 Replies
Mar 2, 2009
I'm making a tile based platformer game in AS3. I started it in CS3, but just installed CS4. It works great for a minute, but then it starts slowly losing frame rate..
View 1 Replies
Apr 20, 2009
I imported Embaded Movie to Flash (that won't be on my TimeLine to save space), and i m using the FLVPlayBack to run it. My problem is that the player plays the movie too fast for displaying. Is there a way i can slow down the movie?
View 2 Replies
Apr 29, 2009
I have a nice, small animation in a header I've made for a website that looks very crisp and clean in flash, but when I upload it onto my website or preview it in a browser the framerate is lower than how I designed it.
View 7 Replies