on 29/5/2002 11:52 pm, mb at modage /at/ attbi D.O.T com wrote:
> Eric I moved the thumbs into an external cast and things are running far > faster and with less memory loss (haven't tested thoroughly, but its > definitely better). Now I have to figure out why 6000 2k thumbs make a > 215 meg external cast.... man o man Director is a ... sometimes =) > > I still haven't tried putting this in Valentina because I expect the > memory leak problem to continue as Valentina makes cast members at > runtime (this is how it works right?). Also access should be a bit > slower than having it all in an external cast right?
I've done something similar to this before. Rather than creating bitmap cast members, simply have a bunch of them (as many as you ever need to see at one time) as placeholders and overwrite their image data with images from Valentina. It's very fast, and doesn't seem to have any leakage I've noticed, and the number of cast members doesn't vary at all. You should also learn a vital technique - use a bitmap cast member with no pixels as a placeholder. This has some great advantages: you don't need to move it off-screen to stop it getting mouse events; you don't ever need to use sprite.visible, which means you will never run into old-fashioned puppetSprite leftovers, and you can place it on the stage where it will retain position without code. Simply make a bitmap member, name it, then edit it, select all and delete. I normally keep a cast member around called "nothing" that's like this - it has to have a name or it will disappear!
I had a database that used about 800 thumbs and it was less than 8Mb with a whole load of other data in there too.
Marcus -- Marcus Bointon Synchromedia Limited: Putting you in the picture
marcus@synchromedia.co.uk | http://www.synchromedia.co.uk ©2002 Marcus Bointon |