I just made something like this, here is the part of my code, hopes help you
out.
after setup the image and slider, use zoomChange() function to change the
image height and width,
remember to disable the verticalScrollPolicy and horizontalScrollPolicy.
public function zoomChange():void{
myImage.height=uint(fixedImageHeight*hSlider.value/100);
myImage.width=uint(fixedImageWidth*hSlider.value/100);
}
<mx:Image id="myImage" x="0" y="0" source="image.jpg"
creationComplete="imageWidth=myImage.width;
imageHeight=myImage.height;
getSize(event);
myPBar.visible=false;"
/>
<mx:VSlider id="hSlider" right="10" bottom="115" width="100"
height="200"
minimum="10" maximum="150" value="70"
change="zoomChange()"
labels="['zoom : 10%','zoom : 150%']"
styleName="myHSlider"
allowTrackClick="true"
liveDragging="true"
mouseOver="scaleVbox.alpha=.5"
mouseOut="scaleVbox.alpha=.0"
alpha="1" tickLength="10" tickColor="#000000"
showTrackHighlight="true" trackColors="#ff0000,#ccff33"
/>
On 12/21/06, ecpmaz <[EMAIL PROTECTED]> wrote:
Basically I want to do someting like the 'Navigator' view box in yahoo
maps (http://maps.yahoo.com/ top right corner).
This view would be generated from a Canvas wich contains various
graphic Components...
Do you have any directions to do that :
- zoom in a canvas (do I have to manually change the widths of every
components ???)
- get the user visible portion of the canvas
- global snapshot of the canvas, to re insert it in a preview box ??
Any clue would be very appreciated !!!
Mathieu LEMAIRE
--
Willy
----------------------------------------------------------------------
maybe today is a good day to write some code,
hold on, late me take a nap first ... Zzzz
----------------------------------------------------------------------