OK, great thanks! I guess I was making it more complicated then it needed to
be.
> Of course, looking at y values would certainly make more sense for
> vertical scrolling. :(

Heh, it's ok. I have to do it in both directions, so either one is relevant.


Thanks for the help!
~Aaron

On Sat, Nov 1, 2008 at 6:09 PM, Tim Hoff <[EMAIL PROTECTED]> wrote:

>
> Of course, looking at y values would certainly make more sense for
> vertical scrolling. :(
>
>
> -TH
>
> --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>, "Tim
> Hoff" <[EMAIL PROTECTED]> wrote:
> >
> >
> > In thinking about this more, you're going to have to find the
> > localToContent point x value for myCanvasChild; to see if it's in the
> > viewable area of the canvas. If it is, then do something like the last
> > post; replacing myCanvasChild.x with the derived x value.
> >
> > -TH
> >
> > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>, "Tim
> Hoff" TimHoff@ wrote:
> > >
> > >
> > > Something along these lines:
> > >
> > > var hiddenArea:int = myCanvasChild.height - (myCanvas.height -
> > > myCanvasChild.x);
> > >
> > > if (hiddenArea > 0) myCanvas.veticalScrollPosition += hiddenArea;
> > >
> > > -TH
> > >
> > > --- In flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>,
> "Aaron Miller" amiller@ 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 TimHoff@ 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 flexcoders@yahoogroups.com <flexcoders%40yahoogroups.com>,
> "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.
> > > > amiller@
> > > > http://www.openbaseinteractive.com
> > > >
> > >
> >
>
>  
>



-- 
Aaron Miller
Chief Technology Officer
Open Base Interactive, LLC.
[EMAIL PROTECTED]
http://www.openbaseinteractive.com

Reply via email to