[FLASH MX 2004 PRO or 8] - Troubles passing component properties to variables

Howdy All,
I know it’s been forever and a week since I posted or anything, so I guess I should say it’s nice to be back!

Here’s my trouble:

I’m trying to build a small map viewing app (with components… eew…) that basically consists of:

  • a list (or datagrid as is the more likely case now) of locations (label) and associated x and y points (data)
  • a scrollpane (400 x 300 pixels) that holds a graphic of the map (somewhere in the 900 x 500 pixels range)

I want to use the scrollPane properties hPosition and vPosition to center the viewer on specific locations that are in the list. The x and y points can hold either actual _x and _y data, or the more useful hPosition and vPosition values. I know that it is possible to set the scroll positions via scrollPane.hPosition = whatever;.

Also, it is necessary that the scrollPane has the scroll (by dragging) feature.

Is there a way I can bind the list data to the scrollPane and have it move to the selected hPosition and vPosition? If not through binding, then through AS? Declaring x and y vars to hold the <data> from the list (or the x: and y: column data from the data grid)?

Another option I thought of is to use a mc instead of a scrollPane, and just create buttons around the perimeter that when rolled over would move a masked image of the map in the desired direction. Still, to do the list selection, I would need to pass the data from the list (or datagrid) to the mc somehow… is this possible??

Thanks for listening,
Seethru

P.S - If you need anything clarified, just ask. Thanks!