After some trial and error, it seems that it's caused because of rescaling and repositioning code: When the button is scaled down, I'm scaling the icon down so that it's new dimensions match the old dimensions, and repositioning it to match its last location. Moving the iconContainer into a parent movieClip and changing the parent's properties on the stage solves this problem, but that leaves another - the repositioning code no longer works.
public function resizeListener(e:Event):void { switch (resizeMode) { case "noscale": scaleX = 1 / e.target.scaleX; scaleY = 1 / e.target.scaleY; This rescales the iconContainer to the right dimensions but what would be the formula for repositioning it? Bearing in mind that e.target is parent.parent? It should be moved back proportionally to the scale, but I can't figure out the maths. Karina > -----Original Message----- > From: flashcoders-boun...@chattyfig.figleaf.com [mailto:flashcoders- > boun...@chattyfig.figleaf.com] On Behalf Of Karina Steffens > Sent: 09 April 2010 2:36 > To: 'Flash Coders List' > Subject: [Flashcoders] MC properties not changing on a keyframe > > Hi list, > > On a custom IDE button component (AS3 CS4) I have a number of > keyframes for > up/over/down etc. Each of these keyframes has a textfield and an icon > (labelText and iconContainer). Mouse event listeners control the > movement > between the keyframes. > iconContainer has linkage to a class that loads internal or external > assets > into a target mc inside it. > > Everything works fine, except that if I change the movieclip properties > such > as position or tint of the iconContainer on the various keyframes, > after > publishing I can't see the changes. By contrast, similar changes are > visible > on the labelText and other movieclips placed on the button's stage. I > tried > this with normal keyframe on the icon's layer and the new CS4 motion > tween, > with the same results. All the loaded assets are children of > iconContainer, > they don't replace it. Of course, I could make all the changes with > code. > But I'm trying to make it flexible enough to work either way. Any > ideas? > > Thanks, > Karina > > _______________________________________________ > Flashcoders mailing list > Flashcoders@chattyfig.figleaf.com > http://chattyfig.figleaf.com/mailman/listinfo/flashcoders _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders