PDA

View Full Version : Scrollpane, zooming and anchors


bsprout
04-21-2005, 10:21 PM
Hi all,

Iíve attached the .swf of the file Iím talking about so you can better see what Iím trying to do. So far I have a tennis draw that can be zoomed in and out by the click of a button. When zoomed in, a portion of the draw can be seen through a scrollpane.

Iíve created another set of buttons below the zoom buttons ; each button corresponds to one of the seven rounds of the tournament. Ideally clicking on one of these buttons should allow the user to go directly to the corresponding round (hence zooming and scrolling automatically so that the portion displayed in the upper left corner of the scrollpane is the round the button is named after). The problem is, I donít know how to do it.

The stuff Iím trying to do looks a bit like what anchors (very simply) allow you to do in HTML: scroll directly to the desired portion of a page by the click of a link. However I learned that in Flash, anchors can only be assigned to a frame, not to a specific area of a map. I then thought about using coordinates, but couldnít figure out a way to make it work. Does anyone know which kind of action I should assign to these buttons to have them working ?

Thanks a bunch,

Brussels sprout

PS: while Iím at it, there are two other things in this file I canít figure out how to fix:
- First, Iíd like to make the vertical scrollbar of the scrollpane sensitive to the mouse wheel ; is that possible to do in AS ?
- Second, as you can see if you look at the file, the content of the scrollpane is draggable [Iíve used setDragContent(true)], but only after you moved both scrollbars. Does anyone know why ? Is it possible to drag the content of the scrollpane without first having to use each scrollbar?