solved... private function centerThreeSixty():Void { var midX:Number = Stage.width/2; var midY:Number = Stage.height/2;
if (originX == null && origMidX == null) { origMidX = midX; origMidY = midY; originX = targetThreeSixty._x; originY = targetThreeSixty._y; } var diffX:Number = (midX - origMidX); var diffY:Number = (midY - origMidY); targetThreeSixty._x = originX + diffX; targetThreeSixty._y = originY + diffY; } only works if the stage is bigger than the clip tho :| MaTT On 2/10/06, w03 <[EMAIL PROTECTED]> wrote: > > This can be more complicated than it seems... if, like I was, you are > using the imported MC height and width to find center position. These > values change as the offstage mcs move around or march onto stage. > > If set the center position once, and import the mc there, it'll stay put. > If call centering routine a lot, (say on a resize function), the mc will > jump around depending on the current width,height. > > If you use origional centering data (i.e. save the position) and then use > that in your resize function (calculate new mc position based on old mc > position, not on mc width/height) then you may be able to stop the behavior. > > If you wrote the Q you may understand this answer, otherwise, don't > bother! > > Wendy > > > //Assign a mask from the main SWF on the receiving movieclip > > //mc_clip_loader.setMask(mc_Mask);//Everything outside the stage's > //demensions of an external SWF is visible inside the receiver SWF... > > > //Matt Muller wrote: > > > >>Im building a microsite, that is aligned to the center of the stage. I > am > >>loading in animations that are swfs that are meant to run in the > viewable > >>area in the microsite. > >>The animation fla's are exported as swfs with a mask, and I am also > trying > >>to setMask in the shell, the animators tweens and shapes that are > outside of > >>the mask > >>are affecting the size of my shell and when onResize() is called the > site > >>jumps all over the show. > >> > >>Does anyone have any ideas, bar going into the animations and cleaning > up > >>everything that is outside the mask to get a perfect rectangle bounding > box, > >>surely > >>there must be a way to do this, I have draw regions on and can see > >>everything going on outide the mask. > >> > >>Quick fixes? > >> > >>Thanks > >> > >>MaTT > >>_______________________________________________ > >> > > > _______________________________________________ > Flashcoders@chattyfig.figleaf.com > 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 > _______________________________________________ Flashcoders@chattyfig.figleaf.com 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