Use the integration kit or implement IUIComponent on your own.

 

________________________________

From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of quiet.mountain
Sent: Thursday, December 13, 2007 12:18 AM
To: [email protected]
Subject: [flexcoders] Re: How to use DragManager.acceptDragDrop() when
target is a MovieClip?

 

Sorry,

I should have mentioned that my MovieClips are being created in Flash 
CS3 and I am not currently using the Adobe Flash Workflow Integration 
Kit.

So I am talking about using the DragManager with 
flash.display.MovieClip.

The suggested solution for Flex 3 is to use UIMovieClip:
http://livedocs.adobe.com/labs/flex/3/langref/mx/flash/UIMovieClip.htm
<http://livedocs.adobe.com/labs/flex/3/langref/mx/flash/UIMovieClip.htm>

l

I have two questions:

1) Will this work with Flex 2.01?
2) If I publish the FLA as a SWF will the MovieClips be of type 
UIMovieClip (I don't want to use SWCs)?

Many thanks, Rich

--- In [email protected] <mailto:flexcoders%40yahoogroups.com>
, "quiet.mountain" 
<[EMAIL PROTECTED]> wrote:
>
> Evening all,
> 
> Simple one here I hope..
> 
> I have a bunch of Movieclips that I want to color in using drag and 
> drop of little colored tiles from a TileList.
> 
> The MovieClips obviously do not implement IUIcomponent, so how do I 
> use DragManager.acceptDragDrop(target:IUIComponent) to accept the 
> drag once over the MovieClip?
> 
> Here's my code:
> 
> /*
> * Function to handle dragEnter over MovieClip rug shape
> */
> public function dragEnterHandler(event:DragEvent): void
> { 
> // Get the drop target component from the event object
> var dropTarget:MovieClip = MovieClip(event.currentTarget);
> 
> // Accept the drag only if the user is dragging data 
> // identified by the 'items' format value.
> if (event.dragSource.hasFormat('items')) 
> {
> DragManager.acceptDragDrop(dropTarget);
> }
> }
> 
> 
> As ever, many thanks for your time,
> Rich
>

 

Reply via email to