ActionScript 2.0 :: Drawing Heart-rate App Is Killing The CPU?

Mar 1, 2005

When i run this swf for a while, the CPU reaches 100% and my computer get locked. I guess it has to do with enterFrame, but are not sure.

code on MC:
onClipEvent (enterFrame) {
this._x = this._x-0.5;
}

code inside MC:

_root.createEmptyMovieClip("triangle", 1);
z = Math.sin(x)/Math.tan(y);
x = x+3;

[code]....

View 2 Replies


Similar Posts:


Memory :: Heart-rate Monitor With The Drawing API?

Jan 19, 2011

I've got a movieclip which monitors and graphs the level of activity coming in, like a heart-rate monitor at the hospital. The graph scrolls the data off the screen, but the movieclip is never cleared, and the off-screen data builds up indefinitely. The longer the user stays on the page, the more memory the un-seen part of the graph takes. What's the best way to clean up the unseen part of the movieclip?The code is as follows:

this.stage.addEventListener(flash.events.Event.ENTER_FRAME,
function(event){
var dif = md.getDifferences();

[code].....

View 1 Replies

Actionscript 3 :: Image Partly Off Screen Killing Frame Rate On IOS

Sep 7, 2011

I'm developing a game in as3 for iPhone, and I've gotten it running reasonably well (consistanty 24fps on iPhone 3G), but I've noticed that when the "character" goes partly off the screen, the frame rate drops to 10-12fps. Does anyone know why this is and what I can do to remedy it?

Update - Been through the code pretty thoroughly, even made a new project just to test animations. Started a image offscreen and moved it across the screen and back off. Any time the image is offscreen, even partially, the frame rates are terrible. Once the image is fully on the screen, things pick back up to a solid 24fps. I'm using cacheAsBitmap, I've tried masking the stage, I've tried placing the image in a movieclip and using scrollRect. I would keep objects from going off the screen, except that the nature of the game I'm working on has objects dropping from the top down (yes, I'm using object pooling. No, I'm not scaling anything. Striclt x,y translations).

View 1 Replies

ActionScript 2.0 :: Drawing Heartrate App Is Killing CPU

Mar 1, 2005

When i run this swf for a while, the CPU reaches 100% and my computer get locked. I guess it has to do with enterFrame, but are not sure.

[Code]...

View 2 Replies

ActionScript 3.0 :: Implement Tween Simulting The Heart Beating

Jan 28, 2009

How can I implement a tween simulting the heart beating.[code]this is almost what I want. But I would like the object to come back to initial dimensions. Should I use other 2 tweens ?

View 0 Replies

Media Server :: Webcam Frame Rate, NetStream Frame Rate, Flv Framerate?

Apr 25, 2010

I'm recording Webcam to FMS 3.5 but when I play the recorded video from FMS it's choppy. I have set the camera.fps to 30 but when I trace out the currentFPS for camera it's variable and usually falls between 20 and 30. However when I play the recorded video, netStream's currentFPS returns a lower value, something closer to 10. So my question is, 1) why currentFPS of netStream is not the same as Camera's? 2) What's the actual frame rate of the recorded video (not the netStream, but FLV's)?

View 2 Replies

ActionScript 2.0 :: Set The Frame Rate Of An Externally Loaded Movie To A Different Frame Rate?

Sep 21, 2004

set the frame rate of an externally loaded movie to a different frame rate than the movie it is embedded within.

I basically have a flash site that loads flash movies using loadMovie command, however, the frame is lost within these movies and simply adopts the main site frame rate.

View 2 Replies

ActionScript 2.0 :: PLEASE Help Me Out!!! This Is Killing Me!!!

Jul 5, 2005

i have buttons in my library.url...into it when i edit it from the library but it always says "current selections can't have actions applied to it". How do i get to it so i can have a link pop up when i click the button? does the "getURL" also work for files on my computer? for instance i want to click a button and have a movie pop up from one of my folders on the c drive.

View 8 Replies

ActionScript 2.0 :: Clarification On Doing A Killing?

Jan 23, 2009

deleting, killing objects and functions. There seem to be a few different ways to achieve to completely get rid of unwanted objects and functions(which are in turn objects as well, no?)

Just to refresh:
objects:
Code:
object = undefined // does the job
object = null // does the job

exception: if the object is referenced anywhere else in the application, the object is still in memory, unless the object's reference is killed as above. also: if you attempt to try cleaning up and object , which has objects itself, (e.g. object.subObject = new Object()), then those subObjects are still alive.

To properly clean up the object with subObjects, the subObjects have to be killed off seperately.

[Code]...

View 1 Replies

ActionScript 3.0 :: TextField Killing MOUSE_OVER?

Sep 2, 2009

I have an MC(named "mouseTip") that gets added to the stage and follows my mouse on MOUSE_OVER. On MOUSE_OUT it gets removed. I just created a dynamic text field inside mouseTip so I can display type when mouseTip is present. For some reason, when that happens the mouse gets blocked by the textfield inside mouseTip and the MOUSE_OUT gets triggered.Once mouseTip is removed, the MOUSE_OVER gets triggered since the mouse is still over the button and my mouseTip MC just flickers rapidly.

View 5 Replies

ActionScript 2.0 :: Killing Button Over State?

Oct 18, 2004

i have some drop downs that i am trying to create but when i add some actionscript on (rollover) {stuff} it kills the over state of the button.I can add actionscript to a button and still have its over state show

View 3 Replies

ActionScript 2.0 :: Set The Frame Rate Of An Externally Loaded Movie To A Different Frame Rate Than The Movie It Is Embedded Within?

Sep 21, 2004

it possible to set the frame rate of an externally loaded movie to a different frame rate than the movie it is embedded within. I basically have a flash site that loads flash movies using loadMovie command, however, the frame is lost within these movies and simply adopts the main site frame rate.

View 2 Replies

ActionScript 3.0 :: Adding / Killing Instances Of Children

Mar 21, 2009

I've attached the FLA.I'm trying to make a game where the guy kills rats that appear randomly as the scenery moves down, however every time I shoot the rat and remove the rat child, it throws an error that my actionscript is pointing to an inexistent rat. Hence my problem... is there a way to add many instances of the same class with AS3 at random intervals and remove them when it's shot with the bullet???

View 10 Replies

ActionScript 3.0 :: Killing Child On Loading New Swfs?

May 15, 2010

I'm confused on the parent/child thing. Seems like the "child" statement would refer to the file I'm loading, not the file I'm in? I want the file I'm IN to kill ITSELF when it loads the next swf (it's child?)And then there are other times when I want them to stack one on top of the other. I've added comments above each set of button code to explain./This code is in home swf. Handles portfolio buttons. I do not want to unload Home.swf, so this works fine.

scene1.addEventListener(MouseEvent.CLICK, myRequest);
scene2.addEventListener(MouseEvent.CLICK, myRequest);
scene3.addEventListener(MouseEvent.CLICK, myRequest);[code]...............................................

View 1 Replies

Flash :: Disable Chrome From Timing Out / Killing A Tab?

Mar 1, 2011

A user is reporting that a certain screen of our Flex app times out in Google Chrome and IE. I can reproduce this problem, but I don't know what is causing it. I cannot reproduce it with Firefox.

I was wondering if there is a way to temporarily disable this feature in Chrome because I know that in Firefox(at least in v3.6) when a Flex/Flash app executes for too long I get a stack trace from the Flash runtime pointing me to the problem. example:

Error: Error #1502: A script has executed for longer than the default timeout period of 15 seconds.
at TimeoutTest/___TimeoutTest_Button1_click()[/TimeoutTest/src/TimeoutTest.mxml:5]

I think that Chrome is hijacking this process and denying me that information, so I would prefer to prevent this behavior for now to see if the runtime will detect the timeout and provide a similar trace.

View 2 Replies

ActionScript 3.0 :: Adding/Killing Instances Of Children?

Feb 19, 2009

I'm trying to make a game where the guy kills rats that appear randomly as the scenery moves down, however every time I shoot the rat and remove the rat child, it throws an error that my actionscript is pointing to an inexistent rat. Hence my problem... is there a way to add many instances of the same class with AS3 at random intervals and remove them when it's shot with the bullet?

View 1 Replies

ActionScript 2.0 :: Killing Right-click Menu Completely?

Oct 20, 2005

I am designing a game. In one chapter, I want the user to

right click and keep > to zoom in middle click > to reset the view This code works fine.

HTML Code://my movie fps=80 and my_mc is placed on the main stage import mx.transitions.Tween; import

[Code]...

View 3 Replies

ActionScript 2.0 :: Unload The .png Files W/o Killing The Loader?

Jan 7, 2007

I have several thumbnails in my portfolio that dynamically load a .png file into the Loader component called myLoader.Followed the tutorial from Kirupa. Simple enough.

Code:
on(release){
myLoader.contentPath = "1-0.png";
}

When I (user) goes to click on a different client to view different work, artwork from the current client is still loaded, or being shown. I have the same myLoader Loader spread through the frames.I tried to put this

Code:
on(press){
unloadMovie("myLoader");
}
on each client button to clear the Loader before you go to each section, but that makes it disappear all together, than when you go to click a thumbnail, nothing happens because the Loader is gone.Is there a way to unload the .png files w/o killing the loader? Should I use a separate loader for each client? or will that just get messy.

View 2 Replies

ActionScript 3.0 :: Killing Timer Of A Child Object?

Sep 20, 2010

I've got several objects on a stage, each is an instance of a different class. Inside each of those classes is a timer, set to loop (basically refresh) every 5 seconds.Even after removing the instance from the stage and setting it to null, the timers continue in the background. Is there some way I can stop and remove all the timers with an object when I null it, or do I have to do that manually before removing the object?

View 7 Replies

ActionScript 3.0 :: Off Stage Content Killing Frame Rates For IOS?

Sep 14, 2011

I'm working on an iPhone game using AS3 and I've got it working pretty well on the iPhone 3G. I intend to compile it with AIR 2.7 (or 3.0 when it drops), but for testing purposes, I do everything on my 3G. Here's the problem,I get a solid consistant 24fps until one of my objects moves offscreen - even partially. If my "character" even goes a few pixels past the edge, frame rates drop tp 9-10 fps. I've had a few people already suggest not allowing anything to move offscreen, but that's not feasible. I've gone through my code to make sure there isn't a programmatic reason this happens, and I've created a seperate project specifically to test this - with no game logic, simply moving an image across the screen, frame rates bottom out once content goes over the screen edge. I've tried using masks, I've tried using scrollRect, I'm using cacheAsBitmap, and there is no scaling, only x,y translation.

View 2 Replies

Actionscript 3 :: Prevent The Browser From Killing The Flash Plugin While Debugging?

Nov 25, 2011

When I am debugging broken code, after a while the browser announces that the Flash plugin has crashed, and I can't continue debugging my code. Can I prevent the browser from killing Flash?

View 3 Replies

ActionScript 3.0 :: Removing / Killing Particle Effect Upon Button Event

Jul 23, 2009

I'm trying to kill a particle effect I've made for this animation upon a button event. Here's my script as it appears at the keyframe before the animation moves on:[code]When either of the buttons are pressed and the animation moves on, I want to remove the smoke children I've created at the top.

View 2 Replies

ActionScript 3.0 :: Pencil Tool - Drawing Above A Image But The Drawing Is Below The Picture

Nov 9, 2010

i've tried to simulate a pencil tool, for drawing above a imagem, but the drawing is below the picture. How fix it?

[Code]....

View 3 Replies

ActionScript 3.0 :: Generate Drawing API Data From Drawing Object?

Jul 22, 2009

Basically I've got a reasonably complex drawing object in a fla and I want to reproduce it in a class definition using the drawing api. However obviously this is a tedious task, so is there some trick or automated method of doing this?

Last time I needed to do this it was a drawing of an arrow and I ended up writing down x,y,width,height values for everything but this one has curves in it which I don't have experience with drawing anyway.

View 2 Replies

ActionScript 2.0 :: Enabling Drawing Only When Drawing = True

Sep 28, 2009

I cannot get this to work. Without the "var drawing", "var drawing being true or false" and the "if statement", it works fine. But I need to add the "var drawing" so that you can only draw if you turn it on by pressing the "draw_btn" button. Note, I do not get an error, the script "apparently" contains no errors. Here is the code:

ActionScript Code:
var drawing = false
_root.createEmptyMovieClip("myLine", 0);

[Code].....

View 3 Replies

ActionScript 3.0 :: Drawing Over A Movieclip In A Custom Drawing App?

Jan 13, 2012

I've created a drawing tool which allows the user to draw on the canvas, the problem is that if I try to draw over a movieclip nothing happens. Is there a way I can allow for the user to draw over movieclips? For example if I had a background of paper?

Here's the code I'm using for it:

// This code is for drawing the lines on the page
//1.
var drawingLine:MovieClip = new MovieClip();
addChildAt(drawingLine,0);

[code]....

View 8 Replies

Media Server :: Killing Clients Stream From Server Side?

Nov 6, 2009

Why can't (or better yet) you kill client stream from server side - I seen some code that FME may call on server side like  s= stream.get(streamOBJ.name); s.play(false); delete s; application.gc(); // over kill but still did not work

View 2 Replies

ActionScript 3.0 :: Drawing Api Drawing 40,000 Objects

Feb 18, 2009

I need to draw on stage about 40,000 4x4 squares each a different color. The color is determined by an xml file. I have this working in as2 and have converted it to as3 the problem is the amount of time it takes to draw is causing cs4 to time out. I have extended the script time out to 60 seconds. In cs3 as2 it would draw the squares in about 15 seconds. I was hoping as3 cs4 would improve performance but seems to be the opposite. I have tried several methods such as adding children and various drawing variations. the bellow seems to work the best, but is still causing flash to crash.

ActionScript Code:
import flash.display.DisplayObject;
import flash.display.Graphics;
import flash.display.Shape;

[Code]...

View 9 Replies

Inserting Old Swf Into New Fla With Different Frame Rate?

Oct 24, 2009

I'm trying to insert an old banner ad into a new Flash site  The problem is, the banner I made at 20 frames per second, and the Flash site is set to 41, so it literally plays the banner twice as fast.

View 2 Replies

ActionScript :: Set Frame Rate In It?

Nov 8, 2010

Is it possible to set the frame rate of a movie through ActionScript 2? Is it possible to check it?

I've found many ways to check the rate at which it is playing, but I want, ideally, to be able to set the frame rate dynamically at runtime. I'm making a timer that uses flashing dots to show each unit of time, and I'd like to create a user interface so that someone playing the swf can set the time intervals without having to open the fla to change the frame rate.

View 2 Replies







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