Something along these lines: var hiddenArea:int = myCanvasChild.height - (myCanvas.height - myCanvasChild.x);
if (hiddenArea > 0) myCanvas.veticalScrollPosition += hiddenArea; -TH --- In [email protected], "Aaron Miller" <[EMAIL PROTECTED]> wrote: > > A good suggestion, but I'm not sure if this will work for my purposes. I do > have a reference to the child object in question, but I first need to > determine if it even needs to be scrolled. All I need to do is scroll it > enough so the child object is in view. So for instance, if there is 100px > hidden, I need to scroll down 100px. How would I find the amount I need to > scroll by to get a child object in view? > Thanks for the help! > ~Aaron > > On Fri, Oct 31, 2008 at 10:02 AM, Tim Hoff [EMAIL PROTECTED] wrote: > > > Hi Aaron, > > > > If you kow the index of the canvas child that you want to scroll to, > > something like this will work: > > > > myCanvas.verticalScrollPosition = myCanvas.getChildAt(myChildIndex).y; > > > > -TH > > > > --- In [email protected], "Aaron Miller" amiller@ wrote: > > > > > > Is it to early to bump? I'm sure this is a common procedure, I'm just > > kind > > > of new to display level programming. How would one go about pragmatically > > > scrolling a Canvas until one of it's children is in view? I know how to > > do > > > the rest, I just don't know how to find when the child is in view. > > > > > > Thanks for your time! > > > ~Aaron > > > > > > On Wed, Oct 29, 2008 at 7:14 PM, Aaron Miller < > > > amiller@ wrote: > > > > > > > Hello, > > > > I am trying to figure out which portion of a Canvas is in view (as in > > the > > > > scrolled to location), then figure out if one of it's children is in > > that > > > > area. In other words, I want to find out if a child object is in view, > > and > > > > if not, scroll the Canvas until it is. I was looking over the Canvas > > methods > > > > in the docs, but nothing jumps out at me. What's the standard practice > > for > > > > this? > > > > > > > > > > > > Thanks! > > > > ~Aaron > > > > > > > > > > > > > > > > > -- > Aaron Miller > Chief Technology Officer > Open Base Interactive, LLC. > [EMAIL PROTECTED] > http://www.openbaseinteractive.com >

