Vaibhav, I see what the problem is... The code is not entering the dragEnterHandler function this is my immediation feedback when I debug...
Go to check where and why it is not entering... And quick recommendation on this... Thanks, Vamsi. Nagavalli On May 12, 3:07 pm, "Vaibhav/Steve" <[email protected]> wrote: > most praobably red cross means that > > if( event.dragSource.hasFormat("canvas")) > { > DragManager.acceptDragDrop(this(event.currentTarget)); > } > > condition is failing, > try to debug here what > if( event.dragSource.hasFormat("canvas")) > is returning true or false. > > I mean that you will have certain object that you will be dragging > that is the draginiator, and you will be dropping it on a certian > object, that is, your drop target or the container on which you want > to drop it or on which you have put the drop handler. > > On May 12, 3:38 pm, Vamsi Nagavalli <[email protected]> wrote: > > > Vaibhav, > > > I have noted the changes that you recommended.. I have tried it on my > > end... and for some reason I get an arrow with red cross when I drag > > the canvas... > > > What exactly did you mean by this... the area on which you are > > dropping have the scrollbar > > > Thanks, > > Vamsi. Nagavalli > > > On May 12, 2:05 pm, "Vaibhav/Steve" <[email protected]> wrote: > > > > first make ds:DragSource as public. > > > > private function dragDropHandler(event:DragEvent):void > > > { > > > // Canvas(event.currentTarget).x= this > > > (event.currentTarget).mouseX; > > > // Canvas(event.currentTarget).y= this > > > (event.currentTarget).mouseY; > > > ds.dataForFormat("canvas").x = 50; // or wahatever you want to > > > assign > > > ds.dataForFormat("canvas").y = 50; // or wahatever you want to > > > assign > > > } > > > > Or the area on which you are dropping have the scrollbars ??? > > > > Thanks, > > > Vaibhav. > > > > On May 12, 2:31 pm, Vamsi Nagavalli <[email protected]> wrote: > > > > > Hi guys, > > > > > I am new this group and have been with flex for only 2 months.... > > > > > This journey was very exiting and could do most of the work with less > > > > help.... > > > > > Earlier I have tried to drag and drop an Map Marker( ESRI) to a > > > > different location on the Map and was successful..... > > > > > But now when I am trying to drag and drop a Canvas to a new position > > > > on the screen.... I was unsuccessful.. Can any one help me out with > > > > this task.... > > > > > Here is a my code snippet that I have tried now..... > > > > > private function enableMove(event:MouseEvent):void > > > > { > > > > var dragInitiator:Canvas= > > > > Canvas(event.currentTarget); > > > > var ds:DragSource= new DragSource(); > > > > ds.addData(dragInitiator,"canvas"); > > > > > > > > > DragManager.doDrag(dragInitiator,ds,event); > > > > } > > > > > private function > > > > dragEnterHandler(event:DragEvent):void > > > > { > > > > if( > > > > event.dragSource.hasFormat("canvas")) > > > > { > > > > > > > > DragManager.acceptDragDrop(this(event.currentTarget)); > > > > } > > > > } > > > > > private function > > > > dragDropHandler(event:DragEvent):void > > > > { > > > > Canvas(event.currentTarget).x= > > > > this(event.currentTarget).mouseX; > > > > Canvas(event.currentTarget).y= > > > > this(event.currentTarget).mouseY; > > > > }- Hide quoted text - > > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Flex India Community" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/flex_india?hl=en -~----------~----~----~----~------~----~------~--~---

