[flexcoders] Drag and Drop question

2010-09-05 Thread Christophe
Hello, How to Drag an Image A on the Image B. The image A replace the image B. And the image B come to replace the image A automatically. (There is a swapping). I use DragDropHandler and dragEnterHandler. Thank you, Christophe,

RE: [flexcoders] Drag and Drop question

2008-09-16 Thread Tracy Spratt
[mailto:[EMAIL PROTECTED] On Behalf Of Pan Troglodytes Sent: Tuesday, September 16, 2008 11:20 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Drag and Drop question I believe you're going to need to handle the drop events yourself and not use the dropEnabled=true setting. Whe

Re: [flexcoders] Drag and Drop question

2008-09-16 Thread Pan Troglodytes
I believe you're going to need to handle the drop events yourself and not use the dropEnabled=true setting. When you do that, by default drop is denied and you have to tell it to allow it, like in the dragEnter event. For example: private function dragEnterHandler(e:DragEvent):void { DragManage

[flexcoders] Drag and Drop question

2008-09-16 Thread zootpeet
I am trying to implement drag and drop onto a tree. In the dropDrop handler, I want to be able to deny the drop from happening, based on which element of the tree is being dropped on. // r is the visible index in the tree var dropTarget:Tree = Tree(event.currentTarget); var r:int = dropTarg

Re: [flexcoders] Drag and Drop question

2008-05-01 Thread Josh McDonald
drop_8.html > > Tracy > > > -- > > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On > Behalf Of *Josh McDonald > *Sent:* Thursday, May 01, 2008 5:05 PM > > *To:* flexcoders@yahoogroups.com > *Subject:* Re: [flexcoders] D

RE: [flexcoders] Drag and Drop question

2008-05-01 Thread Tracy Spratt
@yahoogroups.com Subject: Re: [flexcoders] Drag and Drop question How do you mark a drag/drop operation as having a certain type (ie Move)? -J On Fri, May 2, 2008 at 5:32 AM, Tracy Spratt <[EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> > wrote: Actually I am pretty sure the list-based compo

Re: [flexcoders] Drag and Drop question

2008-05-01 Thread Josh McDonald
scribe this. Are the XML > structures the same? > > > > Tracy > > > -- > > *From:* flexcoders@yahoogroups.com [mailto:[EMAIL PROTECTED] *On > Behalf Of *Josh McDonald > *Sent:* Thursday, May 01, 2008 2:46 AM > *To:* flexcoders@yah

RE: [flexcoders] Drag and Drop question

2008-05-01 Thread Tracy Spratt
Josh McDonald Sent: Thursday, May 01, 2008 2:46 AM To: flexcoders@yahoogroups.com Subject: Re: [flexcoders] Drag and Drop question I'm fairly certain that there's no voodoo to automatically delete nodes from your XML, you need to do that yourself in your drop handler. -J On Thu, May 1,

Re: [flexcoders] Drag and Drop question

2008-04-30 Thread Josh McDonald
I'm fairly certain that there's no voodoo to automatically delete nodes from your XML, you need to do that yourself in your drop handler. -J On Thu, May 1, 2008 at 4:36 PM, Rafael Faria <[EMAIL PROTECTED]> wrote: > If i'm dragging an element from one tree to another. How do i get the > updated

[flexcoders] Drag and Drop question

2008-04-30 Thread Rafael Faria
If i'm dragging an element from one tree to another. How do i get the updated xml of the tree i'm dragging off? For instance TREE 1 - Element 1 - Element 2 TREE 2 if i get the xml from tree 1 it would be something like but if i drag the Element 1 into the TREE 2 i want to get th

RE: [flexcoders] Drag And Drop Question: List within list...

2007-12-17 Thread Alex Harui
07 12:03 PM To: 'flexcoders@yahoogroups.com' Subject: RE: [flexcoders] Drag And Drop Question: List within list... Tree is buggy in Flex 2. If you can, get on the beta for Flex 3 and see if you still have problems there. From: flexcoders@yahoogro

RE: [flexcoders] Drag And Drop Question: List within list...

2007-12-17 Thread Alex Harui
Subject: [flexcoders] Drag And Drop Question: List within list... Hi everyone, I'm a beginning Flex Developer, but I've had a couple of years experience w/ scripting. here's my problem: my current app basically deals with folders and files, such that a folder has files and a

[flexcoders] Drag And Drop Question: List within list...

2007-12-06 Thread Boson Au
Hi everyone, I'm a beginning Flex Developer, but I've had a couple of years experience w/ scripting. here's my problem: my current app basically deals with folders and files, such that a folder has files and a folder can have another folder (that has files or other folders... you get the idea)

Re: [flexcoders] Drag and drop question

2007-11-12 Thread Daniel Freiman
Which line is is breaking on? What's the stack trace look like? - Dan Freiman On Nov 12, 2007 3:48 PM, Mirko Sabljić <[EMAIL PROTECTED]> wrote: > > Definitely not, width and height of the image is under 1000px so i guess > that's not the problem? > > > Daniel Freiman wrote: > > > > Are you tryi

Re: [flexcoders] Drag and drop question

2007-11-12 Thread Mirko Sabljić
Definitely not, width and height of the image is under 1000px so i guess that's not the problem? Daniel Freiman wrote: > > Are you trying to instantiate a bitmap that has a width or hight greater > than 2880? > > - Dan Freiman > > On Nov 12, 2007 1:23 PM, Mirko Sabljić <[EMAIL PROTECTED]> wro

Re: [flexcoders] Drag and drop question

2007-11-12 Thread Daniel Freiman
Are you trying to instantiate a bitmap that has a width or hight greater than 2880? - Dan Freiman On Nov 12, 2007 1:23 PM, Mirko Sabljić <[EMAIL PROTECTED]> wrote: > > I just tried your code and i keep getting the same error: > > > ArgumentError: Error #2015: Invalid BitmapData. > at flash.displ

Re: [flexcoders] Drag and drop question

2007-11-12 Thread Mirko Sabljić
I just tried your code and i keep getting the same error: ArgumentError: Error #2015: Invalid BitmapData. at flash.display::BitmapData$iinit() so i am really confused now :-/ thank you very much for your time and help Daniel Freiman wrote: > > var target:UIComponent = event.curentTarget as

Re: [flexcoders] Drag and drop question

2007-11-12 Thread Daniel Freiman
var target:UIComponent = event.curentTarget as UIComponent; var dragProxy:UIComponent = new UIComponent(); var w:Number = Math.round(target.width / target.scaleX); // will throw error if greater than 2880 var h:Number = Math.round(target.height / target.scaleY) // will throw error if greater than

Re: [flexcoders] Drag and drop question

2007-11-12 Thread Mirko Sabljić
Still doesn't work, would it be too much to ask you to post that code to draw bitmap data onto UIComponent? I tried to implment that idea with following code: public function dragItMain(event:MouseEvent):void{ // Get the drag initiator component fr

Re: [flexcoders] Drag and drop question

2007-11-12 Thread Daniel Freiman
Sorry, try BitmapAsset instead of Bitmap, which extends Bitmap and implements IFlexDisplayObject. If that doesn't work, I have code to draw the bitmap data onto a UIComponent. - Dan Freiman On Nov 12, 2007 7:13 AM, Mirko Sabljić <[EMAIL PROTECTED]> wrote: > > I followed your advice Dan and used

Re: [flexcoders] Drag and drop question

2007-11-12 Thread Mirko Sabljić
I followed your advice Dan and used this code: public function dragItSubs(event:MouseEvent):void{ // Get the drag initiator component from the event object. var dragInitiator:UIComponent = event.currentTarget as UIComponent; / var target:U

Re: [flexcoders] Drag and drop question

2007-11-12 Thread Mirko Sabljić
Thank you very much for your help, i'll try that and let you know how did it go. best regards Daniel Freiman wrote: > > Use a bitmap of the target instead of the original target. > > /// > var target:UIComponent = event.currentTarget as UIComponent;

Re: [flexcoders] Drag and drop question

2007-11-11 Thread Daniel Freiman
Use a bitmap of the target instead of the original target. /// var target:UIComponent = event.currentTarget as UIComponent; var dragProxy:Bitmap; var myBitmapData:BitmapData = new BitmapData(target.width, target.height); myBitmapData.draw(target); // dra

[flexcoders] Drag and drop question

2007-11-11 Thread msabljic
Hi, I am trying to drag an UIComponent instance over an Image object and drag and drop work fine but i am having problem with dragProxy image. I would like to use my original drag source UIComponent as dragProxy image but if i do the following: public function dragItSubs(event:MouseEvent):v

Re: [flexcoders] Drag-and-drop question

2005-02-12 Thread Manish Jethani
Pilby wrote: Does Flex's drag-and-drop support dropping of mx:Button or mx:Text objects into a container like a mx:VBox? Or am I limited to dragging only items from a Tree, a List, or a datagrid? You can drag-drop anything. var dragItems = event.dragSource.dataForFormat("items"); and dragItems is