Anthony Lee wrote:

At any rate - when i create my thumbnails, all works fine the first time, but after they have been wiped out, and I recall my method to re-draw the thumbnails, for some reason my buttons are not working. Now I did a bunch of tracing tests to see if:
Hi dnk,

This may not be a proper answer to your question, but when faced with this kind of headache I stick all the problem buttons, thumbnails etc in a single movieclip, delete that clip to clear them, and redraw the whole thing from scratch. Bad for the processor, good for my sanity.

Tony
Well that is essentially what I am doing..... Although my code writes a bunch of empty MC's and then removes them after - and then tries to recreate it.


create (simplified):

for (var i:Number = 0; i < 35; i++) {
//create empty MC's to hold reg. buttons (non components)
this._targetMc.slidemenu.createEmptyMovieClip("btn_mc" + i, this._targetMc.slidemenu.getNextHighestDepth());
//create loaders for thumbnails.
this._targetMc.slidemenu.createObject("Loader", "theThumb" + i, this._targetMc.slidemenu.getNextHighestDepth());
//create the actual btns from my library into the empty MC's
this._targetMc.slidemenu["btn_mc" + i].createObject("HitDk", "theHit" + i, this._targetMc.slidemenu["btn_mc" + i].getNextHighestDepth());
//add content to loaders
this._targetMc.slidemenu["theThumb" + i].contentPath = this.baseURL + myThumb;
}

remove (simplified):

for (var i:Number = 0; i < 35; i++) {
//remove the loader components
this._targetMc.slidemenu.destroyObject("theThumb" + i);
//unload the MC's containing my non-component btns
this._targetMc.slidemenu["btn_mc" + i].unloadMovie();
}

Now like i said - the 2nd time it runs the create portion, everything is messed up - which makes no sense to me. I mean if it worked the first time, why not a second? The only thing I can think of is it by chance the objects are not actually removed (even though a visual test says they are).

ideas?


Thanks.

d



_______________________________________________
[email protected]
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

Reply via email to