Skip to main content
Participant
May 27, 2008
Question

weird: site takes hundreds of MB on RAM. 600MB?!?

  • May 27, 2008
  • 2 replies
  • 580 views
hello,

i'm working on a website where i have about about 30 seconds of video divided in 7 videos in a hi-res.
i'm using AS3 within flash CS3.

i found out a problem that i havent been able to solve so far.

i place every video (encoded FLV or image sequences) by code with addChild and i remove them with removeChildAt(0). since i only have one MC on stage everytime i can remove it this way.

well 800x600 resolution videos can make a big SWF file for sure, but when i click on each button and remove one movie and add another the RAM just blows up. it reaches 1GB of RAM of used memory by flash when i run the project.

it happens when i removeChild and add a new one, which is just a movieclip made of a sequence of images or a encoded flv MC.

has anyone had any problem like this? this is some huge memory leak, and i can't see the problem

thanks in advance,
This topic has been closed for replies.

2 replies

murdervAuthor
Participant
May 27, 2008
coocen,

well i've just tried that now and yes the memory it consumes is normal.
applying translations on your project did not break on slower machines ?
moving movies with that kind of resolution could be slow, is it not ?

i've seen that AS3 has alot of problems and isnt really the best thing to work with for now.

i will go with your method and see if things work out.

did you used AS3 in your project? how about setting event listeners?
im thinking you did not export anything from the library and just assigned a name to every container on stage and worked out from there ...

thanks
May 27, 2008
I've come across a similar situation... we had to build a 1920x1200 (which is higher than hi-def) flash project - with hardcore transparent series of pngs. lots of adjustements had to be made for it not to "red-box" but one thing we learned is not to add/remove child. Just build your sprite container, have the container contain everything, and offset the x and y - don't add and remove - we got our ram up to 1.3 gig doing that (and constantly growing). Essentially, have everything already on the stage, just move the position of the container to display different content pieces :)
murdervAuthor
Participant
May 28, 2008
coonen,

well i have tried to use your method and i placed everything on the stage, gave it a name and based actions on offseting the various movieclips.
well it still consumes alot of memory on the movieclips that include image sequences.

i place here a test so you can check what i mean.

PREVIEW_SITE

this version includes everything on the stage.
i've removed half the animations and menus, so you see, if i add them all, memory will grow up to 800MB or so now.

i still control everything with ActionScript 3, i just dont add/remove Childs or i dont even new anything. i just work with the MC on the stage.

any ideas ?