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


Similar Posts:


ActionScript 3.0 :: Clarification Of Sprite.clear() Usage?

Aug 13, 2009

My understanding is that calling clear() on a sprite object will wipe the screen clear of previous drawings for the next draw. But my code below renders nothing to the screen when there is a clear() called.

Code:
var sp:Sprite = new Sprite();
addChild(sp);
var g:Graphics = sp.graphics;

[Code].....

View 3 Replies

ActionScript 3.0 :: Event Listener / Garbage Collection Clarification?

Aug 6, 2009

Does anyone know if we have to specifically remove event listeners that are added in a custom class that *only* listen to events dispatched from within the very same same class?

For instance, if I have a parent class that instantiates a child class that builds a simple UI which contains a few buttons that are only listened for in that child class, do I have to worry about removing them before removing the child from the display list & setting to null (on the parent-level)?

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

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 :: 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 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

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







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