Hi Dolldivine,
I wonder what your project will be like. is it some kind of paint program? With so many colour palettes?
With the new information going back to your original question. Is it better to create each panel in a seperate frame or having them all in one frame and working with visible = true/false or similar means (like animating panels out of sight).
I would definately say it is better to stay in one frame. I'm not so deep into technical memory management matters, but I'm convinced that spreading it over multiple frames doesn't help. It won't be like when the playhead jumps from i.e. frame 1 to frame 2, that everything in frame 1 can be discarded from memory. And the permanent need of gotoAndStop() when interacting with panels won't help either.
Now about the eventListeners. Considering your numbers, you could end up with 2000+ interactive touchspots. I presume your are not seriously contemplating to provide each one of them with an eventListener, are you? Anyway because of opening vs closing panels (visible or any other method) you will have a hierachy of objects like your panels are movieClips containing all other stuff like touchspots and colour palettes). What I would do is give each panel one eventListener and one eventFunction and code something like
panel1.addEventListener(MouseEvent.CLICK, clickHandlerPanel1);
function clickHandlerPanel1(evt: MouseEvent) {
switch (evt.target.name) {
case "spot1":
bringOnPanel("panel1");
break;
case "spot2":
//do something when spot2 is pressed
break;
case "spot3":
//do something when spot3 is pressed
break;
//.. and so forth
}
}
This way it would be enough to have 10 - 15 eventHandlers. Easier to manage like removeEventListener(). And we utilize evt.target to detect which touchspot in particular has been pressed.
- evt.currentTarget = woudl be in our scenario panel1, the object with the attached eventListener
- evt.target = the object that actually received the click
Now about your colour palettes. It seems that this section costitutes the largest group of interactive touchspots. "..additional ~70 buttons per colour palette. Possibly as many as 3 colour palettes per panel." - If this is about some kind of colour picking like using color swatches, you could instead of having so many vector swatch buttons design bitmap colour swatches and utilize the bitmapData class with methods like getPixel() or getPixel32() to detect and set colour values.
I hope this helps a bit
Klaus