you're welcome.

btw this snippet coming from my libs wasn't cleaned properly before mailing it. The two extra params, offsetX, Y were in my code to excenter the view.x/y. by default the view.x, y centers to the clipping rect. so if you want excenter, just add to this method the missing offsets params

 _view.x = rect.x+(rect.width * .5)+offsetX;
 _view.y = rect.y+(rect.height * .5)+offsetY;

or just clear the 2 extra params.

Fabrice

On Mar 14, 2009, at 4:10 AM, mikesven wrote:


Hi Fabrice,

I used the setNewClipping method that you showed above and everything
is working great now.  Thank you very much!

Thanks,

Michael

On Mar 13, 6:37 pm, Fabrice <[email protected]> wrote:
Hey Michael.
Try set the RectangleClipping.

here is a little method, you can pass a Rectangle to it.
in this case if its large as the swf,

setNewClipping(new Rectangle(0, 340, heightbanner, widthstage));

public function setNewClipping(rect:Rectangle, offsetX:Number = 0,
offsetY:Number = 0):void
                {
var rectC:RectangleClipping = new RectangleClipping({minX:-
(rect.width*.5) ,minY:-(rect.height*.5), maxX:(rect.width*.5), maxY:
(rect.height * .5)});
                        _view.clipping = rectC;
                        _view.x = rect.x+(rect.width * .5);
                        _view.y = rect.y+(rect.height * .5);
                }

of course you can directly set the RectangleClipping, just think
center of the rectangle instead of the Top left.

Hope it helps.

Fabrice

On Mar 13, 2009, at 10:59 PM, mikesven wrote:



Hi Guys,  I have run into a little issue and I was wondering if
anybody has run into something similar before. I have made a group of rotating banners using Away3D 2.3.3 and everything seems to be working
fine when this swf is published.  The problems occurs when I try to
load the banner.swf file into my "shell" .swf file using
flash.display.loader. If the loaded banner swf is placed at 0,0 in my shell.swf file everything is perfect, but as soon as I place it on the
stage where I would like it (x:0 y:340), the banners will not appear
properly unless I physically scale the shell.swf file while viewing
it. Does anybody know what might be causing this, or any way to
correct it?

Thanks for any help that can be offered,

Michael

Reply via email to