ActionScript 2.0 :: Game Lags When Key Is Pressed?

Feb 23, 2010

I'm working on a "storm the house" game and there is a really annoying bug wich causes the game to lag whenever I press a key on the keyboard.This is a pretty big problem since you reload with Space and swap weapons with the number keys.

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Game Slowly Lags To Death?

Jul 22, 2009

This is an issue that I've run into over and over again, and it just drives me insane. Whenever I make a game which stays on one frame for a while (lots of dynamic objects are made, particle effects, bla bla), the framerate very very slowly starts to drag. After a few minutes, it's at about half what it started at, and it steadily drops until the game is unplayable.I use some variation of the following code to clean up dead movieclips:

Code:
e.currentTarget.visible=false;
e.currentTarget.removeEventListener(Event.ENTER_FRAME, moveThing);
e.currentTarget.parent.removeChild(e.currentTarget);

I guess I should mention that I do contain references to the movieclips in arrays, but I splice them out. Is that ok?I'm almost positive that somehow Flash is still keeping track of my old movie clips, even though I feel like I'm getting rid of them. Is there something wrong? Do I have to do some extra special magic to totally banish them forever? Please help. This has been driving me insane.

View 4 Replies

ActionScript 2.0 :: Make A Box That Fades In When Pressed On The Button And Fade Out When Pressed For The Second Time?

Nov 16, 2004

I have a function on root:

_root.fadeBox_mc.onEnterFrame = function (){
if (fade){
this.nextFrame();[code]....

This causes a mc to fade in and out on rollover/rollout. But what I wanna make is a box that fades in when pressed on the button and fade out when pressed for the second time. But if I say

on (press){
_root.fade = true;
}

the mc fades in, but I cant do another on (press) to fade out. Is this too confusing?

View 2 Replies

Audio Lags In Long SWF?

Oct 23, 2009

when exporting a long SWF (10,000 frames and higher...of course not over 16,000 cause it won't export) the exported audio in the SWF will slowly start to lag behind the animation until it is completely out of sync by a few seconds at the end of the clip. i have all my sounds set to stream and they are all on the main timeline. this is a straight animation with no actionScript.i run at 24fps and export the audio at mp3/128kbs/best.

Flash CS4
windows Vista 64bit
8gb RAM

View 1 Replies

Flash :: IDE - CS3 Lags On Intel Mac

Jul 11, 2007

I have waited FOREVER for a Universal Binary version of Flash to be finally released. Now that I've finally got it, its performance is less than stellar. I'm running it on a 2.16Ghz Intel Core Duo and 2GB RAM, and there is considerable lag when renaming layers, or when dragging the timeline across a simple shape-tween. Not only that, but when I export movies (Apple+Enter), the pop-up window that plays it is EXTREMELY slow, and it's slow regardless of what's going on, even if I'm only animating a circle moving from point A to point B.

What's going on here? I've tried disabling all but the system fonts, closing the help window, and made sure I have no extensions running. Nothing helps. The horizontal scrollbar in the timeline moves from side to side with great fluidity and ease, but dragging the timeline bar is awfully slow. Did Adobe miss something here? I didn't spend $1800 on this Design Suite to be stuck with a piece of software which runs FASTER on my 2.16Ghz AMD-powered PC (which I built over four ears ago). Macs used to be the top-of-the-line in terms of Photoshop + Flash performance when they were on the PowerPC platform. But this whole Intel switch has really taken a hit on Flash.

[Code]....

View 11 Replies

IDE :: Animation Lags At Certain Points?

Jan 24, 2009

I was wondering whether you could help me with a small problem that I am having with my first Flash animation.

I'm using CS4, and when I export the SWF and view it in Firefox, it skips/lags at certain points in the animation (specifically during some of the fast, "zooming out" text tweens - you'll see what I'm talking about if you watch it below). The odd thing is that it appears to work just fine in IE. The animation isn't that complicated, but it does have a fair amount of text tweens./[URL]..

View 4 Replies

IDE :: FLV As Website Background Lags

Dec 4, 2009

I'm currently streaming an FLV as a website background and I'm having some lag issues with it. The streaming works fine however it lags the website to the point where its difficult to use the button rollovers. This is done in AS3. Here's the link to the website: [URL]. At this point only the first 2 buttons have code on them.

Code Button Roll Over:
stop();
var rewind:Boolean = false;
myBT.addEventListener(MouseEvent.ROLL_OVER,growUP) ;
myBT.addEventListener(MouseEvent.ROLL_OUT,growDown );
myBT.addEventListener(MouseEvent.CLICK,gotoSite);
[Code] .....

I also noticed that the smaller the browser window gets, the less lagg I have. Anyone have any idea why the FLV is lagging the website so bad?

View 1 Replies

Flash Animation Lags - Make It Lag?

Oct 9, 2010

I currently made a flash animation. the background is the only one that is animated and scrolls to the right. But my problem is why it lags? Is there any way to not make it lag? here's a link of the swf file you can view: http:[url]......I tried it on a high spec pc and it does not lag when it is in normal screen(640x480) but when I view it in full screen it lags. There are no scripts or anything in this file just animation.

View 1 Replies

Flex :: Key Down Lags Mouse In Flash With FF

Mar 1, 2011

I'm trying to improve the performance of a flash game we did. It's a game very similar to GTA but for flash... This is why its important that Mouse and keyboard can be used at the same time...

But in Firefox (with the last flash version, and the last Firefox version) in some cases if you press a key (WASD) and you move the mouse, the mouse events are dispached after the keyboard events, when you release the keyboard.[code]...

View 5 Replies

ActionScript 2.0 :: Movie Lags While In Fullscreen?

Mar 18, 2007

I am working on a flash desktop application which requires me to have the flash to appear as full screen when run on the computer. I compiled my flash into executable(.exe) file with mdm zinc but I realise that the flash animation is lagging a lot when it is shown in full screen. I then try to display the frame rate on the movie and the movie is actually running at 10fps when full screen and animating. It returns to about 20-25fps when it is not having any movieclips animating while remaining full screen. It is running all well at 30fps when opened with flash player.

View 6 Replies

ActionScript 2.0 :: Large User-Generated Map Lags ?

Dec 28, 2010

I've been working on a top-down shooter.I have it set up so that a map can be generated using an array which is loaded from an external .txt file. This works perfectly fine... Until the map generated reaches a certain size.A map size 1850 pixels by 1000 pixels works perfectly fine. But if you double the size, it becomes nearly unplayable. The map is generated from a determined number of 50 pixel by 50 pixel movieclips (they are plain black), each one is created (using attachMovieClip) where ever the array contains the corresponding value.

I thought at first it was the fact that I was moving the entire _root when the player moved (there has to be a better way, suggestions?), but that was dumb considering that the lag exists before the player even starts moving (bullets lag).

View 3 Replies

Create An Image Which Lags Somewhat Behind The Scroll On A Webpage?

Aug 10, 2009

I am looking for information on how to create an image which lags somewhat behind the scroll on a webpage, very simliar to the candle at the bottom of this page: [URL].. If I only knew the name of this effect, I could search out a tutorial for it myself.

View 3 Replies

ActionScript 2.0 :: Video Lags After Buffer Is Complete?

Jul 2, 2009

I'm using NetStream to show my videos, everything works fine except the annoying lagging that I get after the video has buffered. The video simply skips/ jumps to the point that it had buffered to, stops and waits again for the same amount of it to buffer then plays normally.Me changing the seconds that it takes to buffer doesn't effect it. The action script is as follows:

stop();
ns.play("blank");//stops video playing in the background
var nc:NetConnection = new NetConnection();

[code]........

View 0 Replies

ActionScript 3.0 :: Rectangle Lags Behind Mouse Move?

Sep 12, 2009

2. When the image loads, click the "Crop Image" button on the left side3. Start dragging the corner handles around (the mid handles are not coded for yet)4. If you move the handles fast enough and let go, the rectangle does not stay with the handlesI think the problem has something to do with the rectangle I create and use. Notice that once you get the handles away from the rectangles,Here is the code:

Code:
private function grabberdrag(evt:MouseEvent):void {_grabarray[_i].x = _grabbers.mouseX;//move the current handle to mouseX

[code]....

View 1 Replies

ActionScript 3.0 :: Blood Particle Engine - FPS Lags

Jan 26, 2009

I was working on a little particle engine for blood in a project I am working on and I can see it being versatile enough to be good but when I import it into a test environment it causes a little fps lag.

Code:
package {
import flash.display.Sprite;
import flash.events.Event;
public class mc_Blood extends Sprite{
private var xTarget:Number, yTarget:Number;
[Code] .....

View 14 Replies

ActionScript 3.0 :: Flash Scrollbar Lags When Embedded Into Html?

Sep 1, 2009

I made a smooth scrolling scrollbar in Flash - it works fine except when I upload it to my server/domain the scrollbar lags a bit and is not really smooth. The swf runs very smooth on my desktop but when embedded into html and uploaded, the movie clip that the scrollbar is scrolling doesn't animate smoothly, it jumps. Is there any way to make it go faster?

View 0 Replies

ActionScript 1/2 :: Keys Pressed Or Not Pressed?

Dec 6, 2010

I am struggling a bit with keys on the keyboards controlling a movieclip to happen.Ive got a person moving when pressing right and left, and a movieclip with three frames: First frame is a movieclip with the person standing still, looking bored. The second frame is the person moving right, and the third frame is the person moving left.This is the code that Ive inserted into the persons actions on scene1:

if (Key.isDown(Key.RIGHT)) {_x += speed;this.gotoAndStop(2);_xscale = +scale;} 
if (Key.isDown(Key.LEFT)) {_x -= speed;this.gotoAndStop(3);_xscale = -scale;}
 
this code works alright accept that when the keys are not pressed it doesnt stand still, the legs are still moving, so I tried to include this code aswell:

if (!Key.isDown(KEY.RIGHT)) [code]....this makes the person standing still when not pressed but not moving the legs when turning right and left.

View 3 Replies

Actionscript 3 :: Lots Of Movie Clips Make Flash Lags?

Jul 20, 2011

i created a game that has 96 still movieclips and seven more movieclips that basically move horizontally. The lag starts to rise if i add more and more moving movieclips. The game loop just basically, increment the x coordinate of the movieclips, so i don't think i have problems in the game loop.Is it normal the flash will lag once it has exceeded certain number of movieclips??if it's normal, what do you suggest to increase the game's performance?anyway, this is the update method from the game loop:

public function update():void
{
//cek kondisi untuk melakukan spawn char

[code].....

View 2 Replies

ActionScript 3.0 :: FP 9: Fullbrowser Images Transition From Left To Right Using Scrollrect LAGS?

Mar 11, 2009

hi guys, basically quick rundown is:

1. container1-->bitmap image with bitmapData.
2. container2-->bitmap image with bitmapdata.
3. im using the latest tweenmax
4. have correctly added a 2 seperate scrollrects to container1 and container2 that takes the width and height of the stage.
5. tweenmax is only moving the rectangles.

I get the effect i want, however, it still lags a choppy animation. Anyone know how come?

View 3 Replies

ActionScript 3.0 :: Embedding Subset Font - Small Size But Computer Lags

Jun 1, 2010

I embedded some characters using embed tag in flash CS3(font.swf). 2 separate swf(a.swf,b.swf) loads the font.swf on runtime. These 2 swf are being called from a container(parent) swf. It looks find locally and not time consuming to load. But when I view it from a server, computer lags after a while....(all file sizes are relatively small.around 160kb). What needs to be done in order to prevent computer from lagging? Is it better to load font.swf not in separate swf but directly in container(parent).swf?

View 1 Replies

Media Server :: Fms 3.5.2 - Video / Audio Streaming Application - Audio Stops Or Lags Behind

Aug 25, 2009

I ran a simple live video streaming application for the first time with actual users and ran into a couple of serious performance issues that had not turned up during testing. In this instance there was one video stream from a live web cam and used FMLE at 150 kbps using VP6 and MP3 @22k. There were 16 clients and everything worked pretty good for about 30 minutes. (although some clients said their audio and video were out of sync by up to 3 seconds)

Then individual clients would have either the video freeze or the video would continue and the audio would stop. These clints had to "disconnect" and then "connect" again to the application. This happened to all of the clients at one time or another for several minutes. I stopped and restarted the FMLE with progessively lower bandwidth settings down to 75 kbps but still clients were having the same issue.

I eventually stopped the FMLE and used the applications built in publisher at 45 kbps and that seemed to eliminate the freeze/dropping issue. But of course the video quality was very poor and some clients still reported that the audio was out of sync with the video. The server hosting the FMS application is a quad processor dell with lots of memory and network connectivity. The Flash Media Admin Console performance graph showed the total Bandwidth as 3 Mbps at maximum.

View 8 Replies

Flash 10 :: Flash Full Screen Lags

Jul 29, 2010

I have a game which is 800 x 600. I am running it from the .exe file on a computer which has a resolution of 800x600. When it is in a window it runs fine, when I change it to full screen it lags like crazy. How do I fix this problem?

View 0 Replies

Android :: Cross Platform Game - IOS : Develop A Very Simple Game For Iphone/ipad?

Mar 7, 2012

I am going to develop a very simple game for android and for iphone/ipad I have the option to develop it in cocos2d or in adobe flash air (i am not a developer, but i have 2 developers who are offering me the service)I have a developer that states that cocos2d is better and other one that states that adobe flash air.I want it in cross platform.the cost offered by both developers is the same..i have heard that adobe air has the flaw that it is very slow, is this real? if you had the 2 options which will you use to develop your game and why?

View 1 Replies

ActionScript 3.0 :: Game That Populates User-designed Cards Into The Game Using An External Xml File

Apr 24, 2011

I'm making a game that populates user-designed cards into the game using an external xml file. My main class loads the xml file and then calls to the "Card" class, which wants to use the xml file. I've tried using this.parent and it just gives me a null object reference error. This is what I have so far: Main.as

[Code]...

View 2 Replies

ActionScript 3.0 :: Making Game And Objects Would Spawn At Random And Be Able To Click But When De Game Starts Itself

Jul 4, 2010

currently i making this game and objects would spawn at random and be able to click but when de game starts itself, the spawn is correct but i am unable to make it stop when time goes to 0seconds.

View 1 Replies

ActionScript 3.0 :: Flash - Writing A Simple Game Rule For A Platform Game?

Feb 28, 2011

I'm creating a game at the moment for my university course and it involves the player character jumping on top of boxs twice to break them as opposed to just once.What would be the most efficient/simple way of writing this in Actionscript 3.

View 1 Replies

ActionScript 3.0 :: Mahjong - Levels Of Blocks In Game - Layouts Of The Game Should Be Predefined Or They Should Be Dynamically Created?

Aug 3, 2011

I have recently started working with Mahjong game. But being not so experienced developer. I am just confuse about many aspects of it. So if anyone could throw some light on it. I have to build the game where there could be different number of tiles on screen. 32, 48, 64 , 80, 96, 112 and so on Now I have questions regarding the levels of blocks in this game. I mean the layouts of the game should be predefined or they should be dynamically created? Also I wanted to know how the surface of enable and disable symbols are created?

View 2 Replies

ActionScript 3.0 :: Make A Game, And The Character Inside The Game Could Swim

Jun 13, 2009

I was trying to make a game, and the character inside the game could swim. However, I only wanted him to swim in short bursts that refueled every time he hit the ground.

View 9 Replies

ActionScript 3.0 :: Making A Game Like Pokemon Trading Card Game?

Jul 23, 2010

im trying hard to make a Game like the Pokemon TCG .

View 2 Replies

Flex :: 2d Game Engine For Race Game Built To Webpage?

Nov 19, 2009

I think Flash/Flex is a good aproach for this case.We need to build some like the following

View 2 Replies







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