View Full Version : 1 layer of 3 playing in an MC
mbuna
06-02-2007, 05:40 AM
I have an MC that plays an animation that's triggered by actionscript. It consists of an action layer with 2 stop points, and 3 layers each with movie clips that fade in and out. When I trigger it to play, only the second layer (the first with an mc on it) plays it's tweens. the others sit there and laugh at me.
Basically it's a traveling rollover effect that teleports over to whatever item you're currently on in an XML based menu. It then transforms itself to encompass the width of the current item (they're words, so the width is dynamic), then fades in with frame tweening. Damndest thing, only the first graphic of the three will perform it's assigned animation, the others act as though they're still on frame 1, despite the fact they all reside on layers within the same MC, and timeline. :o
Rossman
06-02-2007, 02:20 PM
Double-check your instance names maybe?
mbuna
06-02-2007, 06:32 PM
just for funsies I double checked, they're all different instance names.
I duplicated it and swapped some symbols to make a similar MC, the one that would sit on the currently selected page. It is at least animating all 3 layers to the same stop frame (a fade in), but even that one looks like two of the three are stopping like one frame earlier, so that you can tell they're not quite 100% opacity. I guess I should mention that they're bitmaps. 24 bit PNG's. I guess I'll try all the old tricks, 99% alpha etc.
Might as well show you guys what I'm talking about:
http://smartz.smartz.com
If you click around, you can see the current page tab (orange tab) is loading the middle and right segments at a less-than-100% opacity, but the left segment is coming all the way through. All three of those segments are within the same MC on different layers, but with the same fade tweening applied. The middle segment is set to stretch horizontally to match the width of the menu item.
mbuna
06-03-2007, 08:03 PM
Just an update, replaced the the expanding hover button mc with all vector parts, it's doing the same thing, so it's not a bitmap issue. And evidently you can't tween 3 MC's on the same layer.
mbuna
06-03-2007, 08:14 PM
Also, maybe it has something to do with how I'm triggering the animation. I've attached a rollover event to each menu item using script:
curr_item.onRollOver = curr_item.onDragOver = function(){
_root.rolOvr(this._x, this._y, this._width);
};
Which triggers this function:
rolOvr = function(currX, currY, currWidth){
rolOvrBtn._x = Math.round(currX)+5;
rolOvrBtn._y = Math.round(currY)-3;
rolOvrBtn.selRight._x = Math.floor(currWidth)+6;
rolOvrBtn.selMid._width = currWidth-8;
rolOvrBtn.gotoAndPlay(2);
};
Which sizes the rollover graphic to match the menu item's width, then tells the rollover graphic to begin playing.
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.