Hello Michael!
 
You hit the nail right on the head - this is exactly what I am looking
for.
 
In fact, this scenario closely resembles how I wrote my existing version
with Flash.
 
I will scour your post a few times over, and research every aspect of it
- then hopefully I will be able to put together a game plan in my head,
on how to start the conversion process.  The cool part too, is that I
can port most of my AS 2.0 code over, as it relates to all the GPS
Conversion logic, and all other math logic / coordinate conversion
functions that I had to slave countless hours over figuring out.
 
Again, thank you Michael - you provided several key pieces of
information, and I have a pretty good feel as to what to do next.  I may
still e-mail you off-list however, with some other questions.
 
Take care,
 
Mike

________________________________

From: flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] On
Behalf Of Michael Schmalle
Sent: Saturday, February 03, 2007 8:56 AM
To: flexcoders@yahoogroups.com
Subject: Re: [flexcoders] Re: Can Flex directly replace Flash????


> is how to handle all the Drag/Drop logic with the
Icons,

Sounds interesting. :)

I would make a component, MapViewer extends UIComponent.

Composite 2 components into this component.

- MapLoader extends SWFLoader
- MapAssets extends Canvas

MapViewer will be the control into positioning the icons as your drop
them INTO the MapAssets aka the map assets instance is position 0,0 with
the MapLoader right on top. MapView sizes and positions the MapLoader
and MapAssrts instances. 

Once you have this base set up, set your tool bar

- drag off the tool bar, create a dragData object with a new instance of
the said icon, 
- user drops icon onto MapViewer
- MapViewer konws how to accept dragDrop, then processes the x,y
position converts coords, takes that new instance you created from the
tool bar factory and addChild() into the MapAssets component precisely
where the user dropped it. 

Now that the icon is perfectly placed INSIDE the MapAssets instance as
the user pans the map around, them icon follows because the MapViewer is
positioning the MapLoader along with the MapViewer.

May or may not make sense but from what you described I could easily get
that scenario going. 

Peace, Mike




On 2/3/07, lostinrecursion <[EMAIL PROTECTED]> wrote: 

        I agree. AS3 actually has the most incredible drag and drop
support
        and it is also very easy to implement via Flex. In fact, all
List
        based components have this functionality native to them.
        
        But adding it to a non list base component isn't awfully hard
either.
        Look in the docs for drag and drop and look for "Image to a
Canvas"
        examples on drag/drop - I believe that ought to answer many of
your
        questions.
        
        Good luck with the app. Sounds heavy.
        -Kenny
        
        

        




-- 
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