Argh -- still struggling. What am I missing?

On Jun 19, 2009, at 5:03 PM, grimmwerks wrote:



But I need that to get the current state of the large transform matrix.

What I'm having problems with is this idea that the smaller area maps to the larger area; in Director there was an actual map() function that doesn't seem to be in flash.

It'd be great if the adobe guys could weigh in on this; ie I can't be the only person having trouble with Matrices / Transforms otherwise I'd be getting a lot more responses.

I'll try it as you say Thomas; thanks for responding.

On Jun 19, 2009, at 4:28 PM, thomas parquier wrote:



I think you should move
var bigM:Matrix = big.transform.matrix.clone();
out of your box move handler, because box.x and box.y are positive even when moving to left or top.

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


2009/6/19 grimmwerks <[email protected]>


I've got a little app that is the same old small viewer / large image type thing we all know and love.


I've got a slider that sets the scale - ie when the user zooms up, the large image zooms up and the 'box' canvas does the invert so that it shows what view the user is seeing -- dig?

Now I'm trying to allow the user to move the small box around and see that same view with the large image; I've tried the following which ALMOST works --when the user moves the box to the right (ie x+ + and y++) the large image goes to the left; but when the user moves it BACK the large image doesn't move back to the right.

private function boxMouseDrag(e:MouseEvent):void{
                                borderBox.transform = box.transform;
                                var bigM:Matrix = big.transform.matrix.clone();
                                var boxM:Matrix = new Matrix();
                                boxM.translate(box.x, box.y);
                                boxM.invert();
                                bigM.concat(boxM);
                                big.transform.matrix = bigM;
                                //big.transform.matrix.translate(box.x, box.y);
                                out.text = "dragging " + box.transform.matrix;
                        }


You can see an example here:

http://grimmwerks.com/examples/matrix/

**next up how to make the small view box locked to the viewer area in the startDrag...








Reply via email to