ActionScript 3.0 :: Get Memory Free Up With Remove Clip?

Dec 9, 2008

I have a very simple movie clip in my library with a linkage id of view. with a bmp in it 2000x760.I have a text field to which i'm outputting System.totalMemory via EnterFrame event.and two buttons one to attach the view and the other to remove it. Everything works fine and I am doing everything i know how to clean up after myself as far as the linked view goes when removing it which isn't much just removeChild and setting the ref to it to null.Now the issue is that when i run the swf either in ide or stand alone i get a memory jump when the clip is attached which is fine and great but when i remove the clip memory never gets freed >< I know this has to do with a greater CS issue with gc and all that, but How can i get memory free up with i remove the clip?Lastly I am runing System.gc() when i remove the clip (this can't be the answer? / its not doing anything)

View 1 Replies


Similar Posts:


Flash - Remove AS3 Class Itself And Free Up Memory

Oct 21, 2011

I have as3 class like this
package {
import Global;
import flash.display.MovieClip;
import flash.events.*;
public class Alert extends MovieClip {
[Code] .....
I use function Close() to remove class itself but i noticed it doesn't frees memory. Is there any way to remove it completely and free used memory?

View 5 Replies

ActionScript 3.0 :: Remove A Movie Clip From Memory?

Jan 3, 2010

I've seen a lot about removing movie clips and I finally want to settle this. What is the proper way to remove a Movie Clip from memory? Right now what I'm doing is: Code: removeEventListener(Event.ENTER_FRAME, step); this.parent.removeChild(this); This is for an instance with 2 private variables and 2 methods (one of which is step). I saw some things about using something = null; and delete something; as well.

View 1 Replies

ActionScript 3.0 :: Free Memory During Slideshow?

Mar 15, 2012

I've got this simple script (I left all original comments) that create a slideshow with timer (this is only part of the whole script), it manages the slides loading in the containers on the stage.The problem is that after each loaded slide the ram of the pc increase by 10 Mb! I tried to solve the problem using:

Code:
slideLoader.removeEventListener(Event.ENTER_FRAME, fadeSlideIn);
slideLoader=null;

in the fadeSlideIn function or the same applied to the currentContainer, but without success.

Code:
// reference to the current slider container
var currentContainer:Sprite;
// slides holder[code].......

View 1 Replies

ActionScript 3.0 :: Free RAM Memory During Slideshow?

Mar 21, 2012

the slideshow loads high resolution images (300-500 Kb) from folder with xml. Every time each slide is loaded and shown, the PC ram increase by 10 Mb!I used the commented lines and it works, the memory does not increase, but there are 2 other problem:

- the fade transition between the 2 images: the image in background is lost so that the transition is between white background and the image loaded at the top level (awful effect)

- in the image folder there is a swf too, before the commented code is was correctly loaded and shown.

Code:
function init():void {
slideTimer = new Timer(TIMER_DELAY);
slideTimer.addEventListener(TimerEvent.TIMER, switchSlide);

[code]...

View 5 Replies

ActionScript 3.0 :: Free Memory From Arrays?

May 31, 2010

I am making a game. Whenever a level is created, a few large arrays are filled up with numbers. The memory usage is around 3mb. When I want to load a new level, I want to remove these arrays from memory and repopulate them with the data from a new level. But, no matter what I do, the game keeps on using up an extra ~3mb of memory each time I reload a level.

The arrays are not being removed from memory. I have tried setting every element of every array to null, I have tried setting the arrays themselves to null, I have tried using myarray.splice(0) to remove the elements from the array, but the memory is still not being freed.

Why would this be happening? The memory usage is not from movieclips, it is just arrays with numbers in them. And it seems to me like it is impossible to delete them.

Why would this be happening? How do I force flash to remove the arrays from memory

View 14 Replies

ActionScript 3 :: How To Clear / Free Up Memory In Flash

May 4, 2011

I have a question how can I clear/free memory in flash? For example I am finishing game and I want to start from beginning and if I will just jump to the first frame all the objects there are still in this memory, is any possibility to force cleaning memory? Can I free memory for an object? for example I removeChild(something) - and I want to free memory for an object as I will reuse it? How the engine works?

View 3 Replies

ActionScript 3.0 :: Image Refresh Doesn't Free Memory?

May 14, 2008

[URL]

The movie loads in an external image and refreshes it every second. What happens, though, is the previous image seems to stay in memory. Eventually the browser will hang, because the memory footprint of the flash movie is so large. Even while testing outside the browser, I can see the memory increase by a couple hundred KB every second. You can see it at [URL]

The code I'm using is below (don't make fun, I don't claim to be a programmer).

Code:
function refresh_url(event:TimerEvent){
var url:String = "http://www.live-photo.com/asheville-east.jpg?ID="+getTimer();
var request:URLRequest = new URLRequest(url);

[Code]....

View 2 Replies

ActionScript 3.0 :: Unload External SWF To Free Up Flash Player Memory

Apr 29, 2009

I'm having real problems with unloading external SWFs, I've spent 2 days looking for a solution and looking at this forum and using the code supplied and Flash help files and much much reading and trying, I still cannot achieve the desired results.I have a Menu.swf which hosts many buttons which loads External SWFs ... simple enough and fairly common.These External SWFs are the same size as the menu and so loads completely over the top of Menu.swf which is exactly what I want to happen.I have a button on these External SWFs which I want to, delete the External SWF from the Flash player's memory and remove all event listeners (which I guess will happen if the External SWF is deleted from memory)The reason why I want it to remove the movie completely from memory is that I have 18 items and by the time it loads the 18th item, the player is going slower then trying to swim in hummous.[code]

View 2 Replies

ActionScript 3.0 :: Read Image Pixel, System Memory(ram) And Free Disk Space In Flex?

Dec 13, 2010

i am writing a program that need to load photoshowever, there is limitation in flex that users cannot load photos with pixel above 4069 x 4069 into a bitmapdata.how can i check photos pixel before running to error? since some pictures are big nowadays, i would llike to check the user`s system memory and free harddisk space. See if the computer have enough space to load the photos.

View 2 Replies

ActionScript 3.0 :: Remove Objects From Memory?

Feb 10, 2010

I have a class "Ball" which display graphical circle ball in random x&y axis and Ifade out it with Event.ENTER_FRAME and specify removeEventListener if it reach alpha<=0 .Now I made multiple object from "Ball" class. Now, In my stage it works nice but when I see my Computer Memory status. my current flash.exe is increasing memory rapidly. Is how to remove my unusual object from my Memory. So that it would not get hang.

View 2 Replies

Flash :: Away3d Remove From Memory?

Mar 1, 2010

I am building a website which loads some collada objects for each area. But I couldn't manage to clean the memory. It seems impossible to kill the objects.

I've found some samples implementing destroy() methods for away3d internal classes, but they're not working as well.

View 2 Replies

ActionScript 3.0 :: Remove Sound From Memory

Jan 10, 2010

how o remove sound from the memory?I'm using an Object for this right now and I want to know if I am doing the right thing... or there's another alternative.[code]

View 2 Replies

ActionScript 3.0 :: Remove The Calendar From Stage And Memory?

Mar 2, 2009

I have a Calendar class (extends Sprite) that when called constructs a calendar. It does so by adding several Day (extends Sprite) objects to itself. I tested this class with a driver class, CalendarTest - the Document Class, that adds a Calendar object to
its stage. It worked great. Then I added a "Next" button to build a new Calendar for the next month. It didn't work so great.

After clicking Next button, the first calendar remained on stage. removeChild did not remove the first Calendar object. So, I wrote destroy methods within the Calendar and Day classes that remove their various components and clear graphics.

The Next button now works great, for the next calendar object. But the next, next calendar object, same problem as the first problem before implementing destroy methods.

I even put trace statements before removeChild calls and set the child to null after removeChild calls. It traces such and such Day is removed, set to null, and finally Calendar is removed, set to null. And yet, the second Calendar with all its Day objects remains on stage!So, how do I remove the Calendar from stage and memory?

View 3 Replies

ActionScript 3.0 :: Remove Instance Of Loaded SWF From Memory?

Mar 4, 2010

I am loading an SWF file into another parent SWF. I remove the loaded SWF using the unloadAndStop() method and set the loader to null. But the instance of the loaded SWF still remains there in the memory.

View 2 Replies

Professional :: Way To Totally Remove A Movieclip From Memory?

Mar 23, 2010

I have a .fla that contains five movieclips, and have a couple of questions regarding removing movieclips and swf size.If all the movieclips are displayed, my resulting swf is about 50k.If, in frame 1, I code conditionals that decide which of the movieclips will be displayed, will the resulting swf size become smaller if some of the clips aren't displayed?If so, what is the correct way to totally remove a movieclip from memory? Say I have a main movieclip that contains 5 other mcs, and the as code is within the main movieclip.If not, is there a way to make the swf size smaller if less than all clips are displayed (using conditionals).

View 10 Replies

ActionScript 3.0 :: How To Remove Previous Object From Memory

Jun 9, 2010

I am getting problem of memory of having repeating object. Below is my code.

import flash.system.System;
var counter:Number=0;
var systemMemory:TextField=new TextField();
systemMemory.x=200;
stage.addEventListener(Event.ENTER_FRAME,showNext);
function showNext(event:Event){
[Code] .....

Above code does repeat textField Object continuously. Now I want to destroy previous created textField Object. So that my memory will not be hang. I got some where in the blog that with System.gc() could clear garbage collection. But currently I am not working with system.gc any more I want to clear previous object in programatically way. Is there any way that I could destroy previous created object?

View 2 Replies

ActionScript 3.0 :: Remove External Swf Completely From Memory?

Dec 10, 2011

I have read many many post and I don't find the answer of how to remove completely a swf load external.Every time I load and unload I see the windows memory task manager and see that the memory increase and don't reduce when remove child.

this is my code:
var oneLoader=new Loader();
bt1.addEventListener(MouseEvent.CLICK, swf1);

[code]......

View 7 Replies

Actionscript 3 :: Remove Simple Objects From Memory?

Sep 9, 2010

I'm trying to remove simple objects from memory, but when I call removeChildren memory usage rose :/ And I don't why ? And how can I remove objects ?

[Code]...

View 2 Replies

Actionscript 3 :: Remove To Save The Memory - Use Several Tweenlite?

Oct 16, 2011

can we know what "eat" the most of memory in a swf ? is it possible with monster debugger? (i've just downloaded it)

my project works fine, but if i re-launch the swf when it is already launched (cmd+enter -> the swf is launched, then cmd+enter), this seems to give me an example of how it would be if i was on a very very slow computer, and this is "very" slow.So is there any possiblity to know what i can remove to save the memory?i use several tweenlite, no sound, and i load all my pages (5) that contains a very basic content, at the beginning, so during the preloading...

View 2 Replies

ActionScript 3.0 :: Remove Something From The Stage Without Removing It From The Memory?

Sep 29, 2009

its possible to remove something from the stage without removing it from the memory. Ie not using removieChild(); Reason being: I want to replace an image inside a movieclip rather than add another image on top or remove the image and movieclip entirely.

View 2 Replies

ActionScript 3.0 :: Remove Objects From Memory By Reference?

Dec 2, 2009

I am creating a generic button that will remove items created dynamically in a movie clip container from memory (not just from the display list).

To track which item the user has selected for deletion, I have a click function that stores the name of the clicked object in a variable called objName. I then store a reference to the object itself in another variable called targetObj. I can then easily remove the object from the stage like this[code]...

View 3 Replies

ActionScript 3.0 :: Remove A Linked Movieclip From Memory?

Jan 11, 2011

I've seen people explain how to remove a script created movieclip or shape from memory but what about when you link to a movieclip in the library?

Do you remove that from memory in the same way?

For example would the code below remove this clip from memory?

Code:
// I want this out of memory when the button is pushed.
var my_clip:my_clip_link = new my_clip_link();
addChild(my_clip);

[Code].....

When I test it, it does not show it out of memory on my computer but I read that the GC cleans up when it wants to, so I put in System.gc() to force GC, but I don't see any memory change in the debugger.

Also if I put a stream sound in the timeline of my linked movieclip it keeps playing the sound. If it's not in memory anymore how is it playing the sound? Did I open a portal to another dimension?

View 2 Replies

ActionScript 2.0 :: Free Transform On A Movie Clip At Runtime?

Apr 10, 2007

Basically, the scenario is this, when a user clicks on an movie clip instance at runtime, I want to be able to display free transform points that the user can click on and drag to transform the objects scale, i.e. Just like the Flash's free transform tool. Does anybody know how I can go about doing this? Is there a class in actionscript?

View 1 Replies

ActionScript 3.0 :: Remove External Swfs Completely From Memory?

Jan 14, 2011

I have developed a touchscreen application that works perfectly fine except for the memory issue. Basically, the touchscreen app works kinda like a website with navgation on the side and content displaying next to it. I separeate each section into external swfs, and load each one up when it is needed, thinking it would reduce memory used on the pc. But unlike actionscript 2, AS 3 would not remove the external swfs from the memory. You can remove it from the stage and you won't see it, but the swf will still stay in the memory! So... as you navigate through the app, loading up all these external swf, even I do loader.unloadAndStop();, the swf is still there, and they just keep piling up in the memory as you navigate from the app. After leaving the touchscreen for a day or 2, having all these users naviage through it,  all the external swfs will just completely consume all the resources and freeze the pc.

View 1 Replies

Actionscript 3.0 :: Remove External Swfs Completely From Memory

Jan 14, 2011

I have developed a touchscreen application that works perfectly fine except for the memory issue. Basically, the touchscreen app works kinda like a website with navgation on the side and content displaying next to it. I separeate each section into external swfs, and load each one up when it is needed, thinking it would reduce memory used on the pc. But unlike actionscript 2, AS 3 would not remove the external swfs from the memory. You can remove it from the stage and you won't see it, but the swf will still stay in the memory! So... as you navigate through the app, loading up all these external swf, even I do loader.unloadAndStop();, the swf is still there, and they just keep piling up in the memory as you navigate through the app. After leaving the touchscreen for a day or 2, having all these users naviage through it, all the external swfs will just completely consume all the resources and freeze the pc.Also, is it better to develop touchscreen application with actionscript 2 since it doesn't have this pressing memory issue?

View 1 Replies

ActionScript 3.0 :: Papervision3d Remove Child Memory Leak?

Sep 16, 2009

I have a memory leak problem in papervision - I have a bunch of DAE models loading in Papervision. When I add them I can see the total memory usage for flash (in task manager) go up.

[Code]...

View 6 Replies

ActionScript 3.0 :: Does BitmapData.dispose() Remove Memory Occupied By Its Bitmap

Mar 1, 2010

1: I upload an image

2: Without altering it,I make a copy of it and use it display to users in resized format

note: I won't display the original image.

3:Now when user deletes the resized image,i need to delete the image loaded as bitmap i.e. the original image which i won't be displaying

For that I used bitmap.bitmapData.dispose() method.But,it doesn't free up the memory taken by the bitmap.For instance at initial state the memory usage is 58 Mb and upon loading 3 images the size increases to 87 Mb.And when I delete all the images the size decreases to 81 MB only.

View 6 Replies

ActionScript 3.0 :: BitmapData.dispose() Remove Memory Occupied By Its Bitmap

Jun 6, 2010

This is my scenario

1: I upload an image

2: Without altering it,I make a copy of it and use it display to users in resized format
note: I won't display the original image.

3:Now when user deletes the resized image,i need to delete the image loaded as bitmap i.e. the original image which i won't be displaying

For that I used bitmap.bitmapData.dispose() method.But,it doesn't free up the memory taken by the bitmap.For instance at initial state the memory usage is 58 Mb and upon loading 3 images the size increases to 87 Mb.And when I delete all the images the size decreases to 81 MB only.I feel the loaded bitmap is not completely removed.

View 9 Replies

ActionScript 3.0 :: Remove Object From Display List And Memory Which Added Dynamically

Aug 22, 2010

how do we remove object( sprite which has an external swf as it's child ) from display and more importantly from memory yet we still can use the same variable to add  another object (yes another sprite like the one we removed yet has different content).., "
 
i did tried the removeChildAt thing it did remove all the child from the display list but i still can hear sound from video running.
 
here is small scale code of what i'm doing (sorry that i can only give you chunk code of loading and adding)
 
// var SWFList:XMLList; //used to hold a list of all external swf source,atribute and etc// var totalSWF:int; //hold the total number of external swf there is to be loaded
// var swfLoader:Loader; //instance of loader class used to load the external swf

[Code]....

View 11 Replies







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