Hi Mike

Check out the Panel.as class for the standard way of dragging things in
Flex. Don't use startDrag() and stopDrag().

You will see addEventListener() to the systemManager and stage. in the
sm.MOUSE_MOVE is where your actual instance logic goes.

As far as your scroll bars question;

Put the SWFLoader in a canvas and you should get the desired effect as you
pan.

but... as I think about this more, there is something missing. Let me know
what this info does for you.

Peace, Mike

On 2/4/07, Mike Anderson <[EMAIL PROTECTED]> wrote:

  Hello All,

I have a Box Component, that contains a SWFLoader.

When the SWFLoader's Content grows beyond the bounds of the Box
Container, I have the Scrollbars automatically appear.

This particular content that the SWFLoader houses, is always going to be
a Map. Obviously, when viewing Maps, Panning and Zooming are
commonplace - and I want to provide the users the ability to drag the
Map Content around within the Box Component.

Since I come from the Flash World, startDrag() and stopDrag() are very
familiar commands to me, and of course those were the first Methods that
came to mind, when making my Maps drag-able within my Flex App.

Is startDrag() and stopDrag() still the preferred methods of moving
content around on the screen, when it comes to Flex Apps?

Now, I know there is the DragManager.as Class that comes bundled with
Flex - but isn't that more for the purpose of Dragging one Component's
Content, into another one? And then keeping track of any Data that
should get sent along, whenever the Drop Event takes place?

In this particular case, I just want to be able to Pan the Maps around.

Will startDrag() and stopDrag() suffice in this instance?

Also, is there a way where the Scrollbars on the Box Container, can
sense the Content is being moved around, and to update the Scrollbar
positions accordingly?

How would I go about doing something like that?

Thanks in advance, for any help you can offer.

Mike



--
Teoti Graphix
http://www.teotigraphix.com

Blog - Flex2Components
http://www.flex2components.com

You can find more by solving the problem then by 'asking the question'.

Reply via email to