I'm building a sort of image zoomer/viewer -- you've seen it all before -- one large image that scales with a smaller image showing the full image. As you zoom into the large image, the smaller 'viewer' shows a square showing the area that is being viewed in the larger view. Dig?

Ok -- so I've got the smallbox scaling down while the larger scales up - and the views coincide, working perfectly.

But when I have the drag able small area move around - the larger view does NOT display the same area.

I've tried more extravagant ways of trying this - creating a new matrix, scaling to the large image, then translating the smaller rects negative of the x and y of the smaller view - but nothing works.

I've tried this simple example - and in this case the 'test' is a canvas I'm using to just make sure that the smaller matrix is sound:

        private function boxMouseDrag(e:MouseEvent):void{
                                borderBox.transform = box.transform;
                                var smM:Matrix = 
borderBox.transform.matrix.clone();
                                smM.invert();
                                //logit("small: " +smM.toString());
                                //logit("big: " + 
big.transform.matrix.toString());
                                big.transform.matrix=smM;
                                
                                smM.invert();
                                test.transform.matrix = smM;
                        }


But the larger one is way off.

An example can be seen at 
http://grimmwerks.com/player/creativity-online.com/player.html

I'd really appreciate any help you can offer; I don't know why it's off. I'm guessing that I have to scale the larger matrix even *more*.


Reply via email to