Re: [Flashcoders] RE: Images stay on memory forever?

2006-09-05 Thread Dimitrios Bendilas

Hi Dave,

I had already replied you a few days ago, but I think the message went under 
a digest title,

so you must have missed it.

So again, thanks!
I downloaded your example and played around with it.
I don't know for flash 4, but with flash 8 it was the fact that the images
were loaded and not attached that caused the memory to free.

So I experimented a lot and I now know that Flash will not free memory
of images that were attached via attachMovie, even if you removeMovieClip,
or you send its timeline it to an empty frame or pray all night long.

If anyone does not agree with this, please let me know what you know,
I've been working on this 12h/day for the past week, but this still
doesn't make sense to me, so I could probably be missing something.

Dave, thanks again!

Regards,

Dimitrios




- Original Message - 
From: dave matthews [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Sunday, September 03, 2006 8:04 PM
Subject: [Flashcoders] RE: Images stay on memory forever?



here ya go Dimitrios,

 Posted a working example - Flash 4 .fla included - we do mobile.
 http://www.davidmatthews.com/dad/mem_usage_example.zip ---watch the
word wrap in the URL---

 Tested in player 9 and works correctly.

good luck,
Dave Matthews
--snip---

Do you have an working example you can shared maybe?
Thanks a million!
Dimitrios

- Original Message -
From: dave matthews davidmatthews_com at hotmail.com
To: flashcoders at chattyfig.figleaf.com
Sent: Friday, September 01, 2006 4:14 PM
Subject: [Flashcoders] RE: Images stay on memory forever?

hi Dimitrios,

 Try using hard coded symbol_clips instead of the dynamically attached 
movies, because frame 2+ is going to contain whatever exists on keyframe 
one of the code created attached movie.


 For example, using an IDE target_clip symbol with the first occupied 
keyframe and the target in frame 5 will  require the command 
target_clip, goto (key)frame5 and loadmovie content.jpg into 
replacable_target_movieclip_symbol actually exists only on frame5.  The 
loaded content.jpg can be eliminated from the player by sending the 
target_clip/timeline to empty keyframe1, which is a known to be an empty 
keyframe...  thus no 'load_target' no content that replaced the 
'load_target.


 Placing attached movieclips on different levels is more complex since we 
have no way to create truly empty keyframes on dynamic timelines... i 
think... :)


we'll get it working,
Dave Matthews




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] RE: Images stay on memory forever?

2006-09-01 Thread Dimitrios Bendilas

Hi Dave,

Thank you for your reply!

I tried everything you described here. Unfortunately, I still got the same 
problem.

I guess I'm not doing something right here...

This is my code now:

_root.attachMovie(p1, p1, 10);
_root.attachMovie(p2, p2, 20);

n = 1;

btn.onRelease = function():Void {
_root[p+n].gotoAndStop(2); // frame 2 is empty
_root[p+n].removeMovieClip();
n++;
}

I even tried removing the movie clip on the next frame, after calling 
gotoAndStop(2).

Still the same.

Any thoughts?

Dimitrios



- Original Message - 
From: dave matthews [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Thursday, August 31, 2006 11:02 PM
Subject: [Flashcoders] RE: Images stay on memory forever?



hi Dimitrios,

re: Anyone got any idea?

 We had problems last year with something similar, loading 6 layers of 
tiles in a 10 x 10 grid from the terraserver: 
http://www.davidmatthews.com/dad/07-03-05-maplicator.swf  press n 
slide/pan, double click n hold slide to zoom.



 Turns out .jpg's decompress to over 3 times their size to render in the 
player.


 The solution we used to get rid of the memory bloat is to use loadmovie 
into target clips, which throws the previous .jpg's out of the clip and 
player - replacing it with the new content.


 For a greater number of loaded movies, when we change layers in the 
maplicator for example, we actually move to a blank frame in the target 
clip's timeline.


 By moving to a frame where the target clips no longer exist we force the 
player to abandon the previously loaded .jpg's along with their holder 
clips which also frees memory because those targets and their content are 
no longer anywhere in the timeline or player.


 Because the .jpg's are still in the browser cache (but not in the 
player), when the user zooms out and we move back to the empty target 
clips in their timeline, reloading those .jpg's is instantaneous, as they 
are not reoaded from the server.


hth,
Dave_Matthews


p.s. Martin, is this true? - does the player really NOT render things 
placed way off stage?


 Im not sure if this is still the case in fp8 but i know that in previous
versions i would also move a clip to -1,-1 to stop the renderer 
from

including it.

martin



--

Message: 8
Date: Thu, 31 Aug 2006 18:53:31 +0200
From: Martin Wood [EMAIL PROTECTED]
Subject: Re: [FlashCoders] Images stay on memory forever?
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=ISO-8859-7; format=flowed

Sounds perfectly normal to me, making something invisble in flash doesnt 
mean it
will unload the content from memory, in fact it doesnt necessarily mean it 
wont

get rendered.

Im not sure if this is still the case in fp8 but i know that in previous
versions i would also move a clip to -1,-1 to stop the renderer 
from

including it.

martin

Dimitrios Bendilas wrote:

Sorry for posting again,

Anyone got any idea? 



___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


Re: [Flashcoders] RE: Images stay on memory forever?

2006-09-01 Thread Dimitrios Bendilas

Hello Dave,

Thanks for helping out with this, man.

Originally my code was:
n = 1;
btn.onRelease = function():Void {
_root[p+n].gotoAndStop(2);
_root[p+n].removeMovieClip();
n++;
}
No dynamically attached symbols. Didn't work...

Can you please download the .FLA and run a little test for yourself
if it's not much trouble?
It's at http://www.zefxis.gr/files/ImageIssue.fla

I'm not sure if I understand correctly what you are saying here.
The first frame of the movieclips has to be blank, their content
must start from frame let's say 2, and before removing them
moving their timeline to frame 1, which is blank? Is that it?
I tried this and still doesn't work.

Do you have an working example you can shared maybe?

Thanks a million!

Dimitrios


- Original Message - 
From: dave matthews [EMAIL PROTECTED]

To: flashcoders@chattyfig.figleaf.com
Sent: Friday, September 01, 2006 4:14 PM
Subject: [Flashcoders] RE: Images stay on memory forever?



hi Dimitrios,

 Try using hard coded symbol_clips instead of the dynamically attached 
movies, because frame 2+ is going to contain whatever exists on keyframe 
one of the code created attached movie.


 For example, using an IDE target_clip symbol with the first occupied 
keyframe and the target in frame 5 will  require the command target_clip, 
goto (key)frame5 and loadmovie content.jpg into 
replacable_target_movieclip_symbol actually exists only on frame5.  The 
loaded content.jpg can be eliminated from the player by sending the 
target_clip/timeline to empty keyframe1, which is a known to be an empty 
keyframe...  thus no 'load_target' no content that replaced the 
'load_target.


 Placing attached movieclips on different levels is more complex since we 
have no way to create truly empty keyframes on dynamic timelines... i 
think... :)


we'll get it working,
Dave Matthews


--

Message: 8
Date: Fri, 1 Sep 2006 11:25:13 +0300
From: Dimitrios Bendilas [EMAIL PROTECTED]
Subject: Re: [Flashcoders] RE: Images stay on memory forever?
To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; format=flowed; charset=iso-8859-7;
reply-type=response

Hi Dave,

Thank you for your reply!

I tried everything you described here. Unfortunately, I still got the same
problem.
I guess I'm not doing something right here...

This is my code now:

_root.attachMovie(p1, p1, 10);
_root.attachMovie(p2, p2, 20);

n = 1;

btn.onRelease = function():Void {
_root[p+n].gotoAndStop(2); // frame 2 is empty
_root[p+n].removeMovieClip();
n++;
}

I even tried removing the movie clip on the next frame, after calling
gotoAndStop(2).
Still the same.

Any thoughts?

Dimitrios



- Original Message -
From: dave matthews [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Thursday, August 31, 2006 11:02 PM
Subject: [Flashcoders] RE: Images stay on memory forever?



hi Dimitrios,

re: Anyone got any idea?

 We had problems last year with something similar, loading 6 layers of 
tiles in a 10 x 10 grid from the terraserver: 
http://www.davidmatthews.com/dad/07-03-05-maplicator.swf  press n 
slide/pan, double click n hold slide to zoom.



 Turns out .jpg's decompress to over 3 times their size to render in the 
player.


 The solution we used to get rid of the memory bloat is to use loadmovie 
into target clips, which throws the previous .jpg's out of the clip and 
player - replacing it with the new content.


 For a greater number of loaded movies, when we change layers in the 
maplicator for example, we actually move to a blank frame in the target 
clip's timeline.


 By moving to a frame where the target clips no longer exist we force the 
player to abandon the previously loaded .jpg's along with their holder 
clips which also frees memory because those targets and their content are 
no longer anywhere in the timeline or player.


 Because the .jpg's are still in the browser cache (but not in the 
player), when the user zooms out and we move back to the empty target 
clips in their timeline, reloading those .jpg's is instantaneous, as they 
are not reoaded from the server.


hth,
Dave_Matthews




___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com





___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


RE: [Flashcoders] RE: Images stay on memory forever?

2006-09-01 Thread Toby
Here's a nbie suggestion, but can you not use 'delete'?

 -Original Message-
 From: [EMAIL PROTECTED] [mailto:flashcoders-
 [EMAIL PROTECTED] On Behalf Of Dimitrios Bendilas
 Sent: 01 September 2006 14:53
 To: Flashcoders mailing list
 Subject: Re: [Flashcoders] RE: Images stay on memory forever?
 
 Hello Dave,
 
 Thanks for helping out with this, man.
 
 Originally my code was:
 n = 1;
 btn.onRelease = function():Void {
  _root[p+n].gotoAndStop(2);
  _root[p+n].removeMovieClip();
  n++;
 }
 No dynamically attached symbols. Didn't work...
 
 Can you please download the .FLA and run a little test for yourself
 if it's not much trouble?
 It's at http://www.zefxis.gr/files/ImageIssue.fla
 
 I'm not sure if I understand correctly what you are saying here.
 The first frame of the movieclips has to be blank, their content
 must start from frame let's say 2, and before removing them
 moving their timeline to frame 1, which is blank? Is that it?
 I tried this and still doesn't work.
 
 Do you have an working example you can shared maybe?
 
 Thanks a million!
 
 Dimitrios
 
 
 - Original Message -
 From: dave matthews [EMAIL PROTECTED]
 To: flashcoders@chattyfig.figleaf.com
 Sent: Friday, September 01, 2006 4:14 PM
 Subject: [Flashcoders] RE: Images stay on memory forever?
 
 
  hi Dimitrios,
 
   Try using hard coded symbol_clips instead of the dynamically attached
  movies, because frame 2+ is going to contain whatever exists on keyframe
  one of the code created attached movie.
 
   For example, using an IDE target_clip symbol with the first occupied
  keyframe and the target in frame 5 will  require the command
 target_clip,
  goto (key)frame5 and loadmovie content.jpg into
  replacable_target_movieclip_symbol actually exists only on frame5.  The
  loaded content.jpg can be eliminated from the player by sending the
  target_clip/timeline to empty keyframe1, which is a known to be an empty
  keyframe...  thus no 'load_target' no content that replaced the
  'load_target.
 
   Placing attached movieclips on different levels is more complex since
 we
  have no way to create truly empty keyframes on dynamic timelines... i
  think... :)
 
  we'll get it working,
  Dave Matthews
 
 
  --
 
  Message: 8
  Date: Fri, 1 Sep 2006 11:25:13 +0300
  From: Dimitrios Bendilas [EMAIL PROTECTED]
  Subject: Re: [Flashcoders] RE: Images stay on memory forever?
  To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
  Message-ID: [EMAIL PROTECTED]
  Content-Type: text/plain; format=flowed; charset=iso-8859-7;
  reply-type=response
 
  Hi Dave,
 
  Thank you for your reply!
 
  I tried everything you described here. Unfortunately, I still got the
 same
  problem.
  I guess I'm not doing something right here...
 
  This is my code now:
 
  _root.attachMovie(p1, p1, 10);
  _root.attachMovie(p2, p2, 20);
 
  n = 1;
 
  btn.onRelease = function():Void {
  _root[p+n].gotoAndStop(2); // frame 2 is empty
  _root[p+n].removeMovieClip();
  n++;
  }
 
  I even tried removing the movie clip on the next frame, after calling
  gotoAndStop(2).
  Still the same.
 
  Any thoughts?
 
  Dimitrios
 
 
 
  - Original Message -
  From: dave matthews [EMAIL PROTECTED]
  To: flashcoders@chattyfig.figleaf.com
  Sent: Thursday, August 31, 2006 11:02 PM
  Subject: [Flashcoders] RE: Images stay on memory forever?
 
 
 hi Dimitrios,
 
 re: Anyone got any idea?
 
   We had problems last year with something similar, loading 6 layers of
  tiles in a 10 x 10 grid from the terraserver:
  http://www.davidmatthews.com/dad/07-03-05-maplicator.swf  press n
  slide/pan, double click n hold slide to zoom.
 
 
   Turns out .jpg's decompress to over 3 times their size to render in
 the
  player.
 
   The solution we used to get rid of the memory bloat is to use
 loadmovie
  into target clips, which throws the previous .jpg's out of the clip and
  player - replacing it with the new content.
 
   For a greater number of loaded movies, when we change layers in the
  maplicator for example, we actually move to a blank frame in the target
  clip's timeline.
 
   By moving to a frame where the target clips no longer exist we force
 the
  player to abandon the previously loaded .jpg's along with their holder
  clips which also frees memory because those targets and their content
 are
  no longer anywhere in the timeline or player.
 
   Because the .jpg's are still in the browser cache (but not in the
  player), when the user zooms out and we move back to the empty target
  clips in their timeline, reloading those .jpg's is instantaneous, as
 they
  are not reoaded from the server.
 
 hth,
 Dave_Matthews
 
 
 
  ___
  Flashcoders@chattyfig.figleaf.com
  To change your subscription options or search the archive:
  http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
 
  Brought to you by Fig Leaf Software
  Premier Authorized Adobe Consulting and Training
  http

Re: [Flashcoders] RE: Images stay on memory forever?

2006-09-01 Thread Dimitrios Bendilas

You cannot delete a movieclip, just a reference to it.

e.g.
var mc = _root.ball;
delete mc;

the movieclip stays put and you just don't have an mc variable anymore.

Dimitrios

- Original Message - 
From: Toby [EMAIL PROTECTED]

To: 'Flashcoders mailing list' flashcoders@chattyfig.figleaf.com
Sent: Friday, September 01, 2006 5:55 PM
Subject: RE: [Flashcoders] RE: Images stay on memory forever?



Here's a nbie suggestion, but can you not use 'delete'?


-Original Message-
From: [EMAIL PROTECTED] [mailto:flashcoders-
[EMAIL PROTECTED] On Behalf Of Dimitrios Bendilas
Sent: 01 September 2006 14:53
To: Flashcoders mailing list
Subject: Re: [Flashcoders] RE: Images stay on memory forever?

Hello Dave,

Thanks for helping out with this, man.

Originally my code was:
n = 1;
btn.onRelease = function():Void {
 _root[p+n].gotoAndStop(2);
 _root[p+n].removeMovieClip();
 n++;
}
No dynamically attached symbols. Didn't work...

Can you please download the .FLA and run a little test for yourself
if it's not much trouble?
It's at http://www.zefxis.gr/files/ImageIssue.fla

I'm not sure if I understand correctly what you are saying here.
The first frame of the movieclips has to be blank, their content
must start from frame let's say 2, and before removing them
moving their timeline to frame 1, which is blank? Is that it?
I tried this and still doesn't work.

Do you have an working example you can shared maybe?

Thanks a million!

Dimitrios


- Original Message -
From: dave matthews [EMAIL PROTECTED]
To: flashcoders@chattyfig.figleaf.com
Sent: Friday, September 01, 2006 4:14 PM
Subject: [Flashcoders] RE: Images stay on memory forever?


 hi Dimitrios,

  Try using hard coded symbol_clips instead of the dynamically attached
 movies, because frame 2+ is going to contain whatever exists on 
 keyframe

 one of the code created attached movie.

  For example, using an IDE target_clip symbol with the first occupied
 keyframe and the target in frame 5 will  require the command
target_clip,
 goto (key)frame5 and loadmovie content.jpg into
 replacable_target_movieclip_symbol actually exists only on frame5.  The
 loaded content.jpg can be eliminated from the player by sending the
 target_clip/timeline to empty keyframe1, which is a known to be an 
 empty

 keyframe...  thus no 'load_target' no content that replaced the
 'load_target.

  Placing attached movieclips on different levels is more complex since
we
 have no way to create truly empty keyframes on dynamic timelines... i
 think... :)

 we'll get it working,
 Dave Matthews


 --

 Message: 8
 Date: Fri, 1 Sep 2006 11:25:13 +0300
 From: Dimitrios Bendilas [EMAIL PROTECTED]
 Subject: Re: [Flashcoders] RE: Images stay on memory forever?
 To: Flashcoders mailing list flashcoders@chattyfig.figleaf.com
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; format=flowed; charset=iso-8859-7;
 reply-type=response

 Hi Dave,

 Thank you for your reply!

 I tried everything you described here. Unfortunately, I still got the
same
 problem.
 I guess I'm not doing something right here...

 This is my code now:

 _root.attachMovie(p1, p1, 10);
 _root.attachMovie(p2, p2, 20);

 n = 1;

 btn.onRelease = function():Void {
 _root[p+n].gotoAndStop(2); // frame 2 is empty
 _root[p+n].removeMovieClip();
 n++;
 }

 I even tried removing the movie clip on the next frame, after calling
 gotoAndStop(2).
 Still the same.

 Any thoughts?

 Dimitrios



 - Original Message -
 From: dave matthews [EMAIL PROTECTED]
 To: flashcoders@chattyfig.figleaf.com
 Sent: Thursday, August 31, 2006 11:02 PM
 Subject: [Flashcoders] RE: Images stay on memory forever?


hi Dimitrios,

re: Anyone got any idea?

  We had problems last year with something similar, loading 6 layers of
 tiles in a 10 x 10 grid from the terraserver:
 http://www.davidmatthews.com/dad/07-03-05-maplicator.swf  press n
 slide/pan, double click n hold slide to zoom.


  Turns out .jpg's decompress to over 3 times their size to render in
the
 player.

  The solution we used to get rid of the memory bloat is to use
loadmovie
 into target clips, which throws the previous .jpg's out of the clip 
 and

 player - replacing it with the new content.

  For a greater number of loaded movies, when we change layers in the
 maplicator for example, we actually move to a blank frame in the 
 target

 clip's timeline.

  By moving to a frame where the target clips no longer exist we force
the
 player to abandon the previously loaded .jpg's along with their holder
 clips which also frees memory because those targets and their content
are
 no longer anywhere in the timeline or player.

  Because the .jpg's are still in the browser cache (but not in the
 player), when the user zooms out and we move back to the empty target
 clips in their timeline, reloading those .jpg's is instantaneous, as
they
 are not reoaded from the server.

hth,
Dave_Matthews

Re: [Flashcoders] RE: Images stay on memory forever?

2006-08-31 Thread Martin Wood
p.s. Martin, is this true? - does the player really NOT render things 
placed way off stage?


 Im not sure if this is still the case in fp8 but i know that in previous
versions i would also move a clip to -1,-1 to stop the renderer 
from

including it.


im sure it *was* true back in the mists of time but i dont think it is with 
fp8...i dont know if it was with fp7..my memory isnt so good these days ;)


In fact i remember another interesting artifact of _visible = false was when you 
used a non 32-bit colour depth you could still 'see' the object..well, it made 
the colours go a bit off.


I just did a quick, fairly unscientific test in f8 and _visible = false seems to 
be fine in fp8.


so, thats something i can now forget about. :)
___
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com