I think you have to construct the transform matrix box_area-to-thumbnail,
then apply the scale thumbnail-to-big-picture.

> m = new matrix;
> m.translate(-area.x,-area.y);
> s = slider.value/100;
> m.scale(s,s);
>
s = big.width/thumbnail.width;
> m.scale(s,s);
> big.transform.matrix = m;
>

thomas
---
http://www.web-attitude.fr/
msn : [email protected]
softphone : sip:[email protected] <sip%[email protected]>
téléphone portable : +33601 822 056


2009/8/21 grimmwerks <[email protected]>

>
>
> Argh. Sorry about that. Changed to the real link rather than dev.
>
>
>
> On Aug 21, 2009, at 1:25 PM, Wesley Acheson wrote:
>
>
>
> Just FYI we can't view that without a username / password
>
> On Fri, Aug 21, 2009 at 7:03 PM, grimmwerks <[email protected]> wrote:
>
>>
>>
>> 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