Re: [flexcoders] Re: finding out if a child is in view with the current scroll location of a Canvas

2008-11-02 Thread Aaron Miller
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,

Re: [flexcoders] Re: finding out if a child is in view with the current scroll location of a Canvas

2008-11-01 Thread Aaron Miller
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

[flexcoders] Re: finding out if a child is in view with the current scroll location of a Canvas

2008-11-01 Thread Tim Hoff
Something along these lines: var hiddenArea:int = myCanvasChild.height - (myCanvas.height - myCanvasChild.x); if (hiddenArea 0) myCanvas.veticalScrollPosition += hiddenArea; -TH --- In flexcoders@yahoogroups.com, Aaron Miller [EMAIL PROTECTED] wrote: A good suggestion, but I'm not sure if

[flexcoders] Re: finding out if a child is in view with the current scroll location of a Canvas

2008-11-01 Thread Tim Hoff
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] Re: finding out if a child is in view with the current scroll location of a Canvas

2008-11-01 Thread Tim Hoff
Of course, looking at y values would certainly make more sense for vertical scrolling. :( -TH --- In flexcoders@yahoogroups.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

[flexcoders] Re: finding out if a child is in view with the current scroll location of a Canvas

2008-10-31 Thread Aaron Miller
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

[flexcoders] Re: finding out if a child is in view with the current scroll location of a Canvas

2008-10-31 Thread Tim Hoff
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, Aaron Miller [EMAIL PROTECTED] wrote: Is it to early to bump? I'm sure