Keep in mind I am using the actual position on the stage instead of the get bounds..... I did this as i was first learning as3
I bought a great book from lynda.com called ActionScript 3.0 for flash CS3 Professional check it out it helped me understand enough to make that scroll bar on my own :)
Re: Scrolling Thumbnail Panel AS3 by Greg Hollowell on Dec 12, 2008 at 4:47:28 pm
Hey all, I tried that same goToAndLearn tutorial to make a scrolling thumbnail panel, and found your posts very helpful. I tried the following (Flash CS4 w/ AS3):
function panelOver(event:MouseEvent):void
{
stage.addEventListener(MouseEvent.MOUSE_MOVE, panelMover);
function panelMover(event:MouseEvent):void {
var b = (mask_mc.getRect(this));
if(event.stageY > b.y && event.stageY < (b.y + b.height) && event.stageX > b.x && event.stageX < (b.x + b.width));
}
}
//I definitely remembered to change the mask instance name to mask_mc, and I got the following error many many times:
TypeError: Error #1034: Type Coercion failed: cannot convert global@e2050f9 to flash.display.DisplayObject.
at MethodInfo-1()
TypeError: Error #1034: Type Coercion failed: cannot convert global@e2050f9 to flash.display.DisplayObject.
at MethodInfo-1()
TypeError: Error #1034: Type Coercion failed: cannot convert global@e2050f9 to flash.display.DisplayObject.
at MethodInfo-1()
I can't figure this one out on my own. Any thoughts? Thanks!