scrollRect just provides clipping, it does not add scrollbars, etc. For that, I'd recommend just putting your image component inside of a Canvas component.
Troy. On 9/10/07, Matthew Ganz <[EMAIL PROTECTED]> wrote: > > hi. > > i'm loading an image at runtime into an image component. i want the > component to have horizontal and vertical scrollbars. the image is 300x300 > and the image i'm loading in is 500x500. i thought i could simply define a > rectangle for the 'scrollRect' property of the image but it doesn't appear > to be working. > > am i correct in thinking that i can do this? > > here's the code (init() is called on creationComplete): > > [Bindable] > private var viewPort:Rectangle; > > private function init():void{ > viewPort = new Rectangle(0, 0, 500, 500); > } > > <mx:Image > width="300" > height="300" > showBusyCursor="true" > source="{myRuntimeImage}" > scrollRect="{viewPort}"/> > > any tips are appreciated. - thank you. -- matt. > >