GoFuckYourself.com - Adult Webmaster Forum

GoFuckYourself.com - Adult Webmaster Forum (https://gfy.com/index.php)
-   Fucking Around & Business Discussion (https://gfy.com/forumdisplay.php?f=26)
-   -   FLEX guru in here ? (https://gfy.com/showthread.php?t=982071)

qw12er 08-11-2010 05:39 PM

FLEX guru in here ?
 
Here a fairly simple question yet I can't find an awnser anywhere.
I'm droping an object on one of my component which is HBox based and everything works fine execept for the fact that I can only do the drop when I'm on the HBox border or one of the objects it contains. Do I need to set something so the HBox background accepts the drop ... ?


Code:

                // Check if drag proxy has format ...
                        private function doDragEnter(event:DragEvent):void{
                                if(event.dragSource.hasFormat('treeItems'))
                                        DragManager.acceptDragDrop(IUIComponent(event.target));
                        }
               
                // Performs the drop op.
                        private function doDragDrop(event:DragEvent):void{
                                var items:Object = event.dragSource.dataForFormat("treeItems");
                               
                                for (var i:int=0; i<items.length; i++)
                                        Object(dataBox.getChildAt(i))._value.text = '#ref('+items[i].@id+':'+items[i].localName()+')';
                        }

and in Init() I add the two event listners.
Code:

this.addEventListener(DragEvent.DRAG_ENTER, doDragEnter);
this.addEventListener(DragEvent.DRAG_DROP, doDragDrop);

thanks for your help.

fatfoo 08-11-2010 09:42 PM

Good luck, qw12er.
You posted the stoned smiley.
Quit using printed paper with your codes as rolling paper.
This might help you.


All times are GMT -7. The time now is 06:13 AM.

Powered by vBulletin® Version 3.8.8
Copyright ©2000 - 2026, vBulletin Solutions, Inc.
©2000-, AI Media Network Inc123