Hi list... I'm trying to test if something is within view of the scrollpane component it's sitting in. My logic isn't quite right, and I thought someone might have an opinion. It half works...
Thanks! - Michael M. var pt:Point = new Point(objInScrollPane.x, objInScrollPane.y); var realPt:Point = localToGlobal(pt); // withinViewTester is a rectangular shape hidden on the stage to test against var withinView:Boolean = withinViewTester.hitTestPoint(realPt.x, realPt.y); if(withinView == false) TweenLite.to(sp, .3, {verticalScrollPosition:(border.parent.y/spSource.height) * sp.maxVerticalScrollPosition}); // will scroll but it's being tested on the static shape on the stage, so not entirely accurate _______________________________________________ Flashcoders mailing list Flashcoders@chattyfig.figleaf.com http://chattyfig.figleaf.com/mailman/listinfo/flashcoders