Thanks for your help so far: Where is the documentation on this kind of class extension, where do I find the constructor for dragProxy in order for me to know how to add the image in the createChilren function?
Do I just add: var image1 = createClassObject(mx.controls.image, something, something, something???????? Thanks Iain --- In [email protected], Manish Jethani <[EMAIL PROTECTED]> wrote: > On 5/26/05, digital_eyezed <[EMAIL PROTECTED]> wrote: > > > I have a fully functioning drag and drop operation going on. All I > > want to do is add an image using the drag proxy functionality to the > > application. > > > > Here is the tree I drag from: > > > > <mx:Tree id="tree1" dataProvider="{MyService.result}" width="100%" > > height="100%" dragEnabled="true"/> > [...] > > You can do it by making your own drag proxy. See example below. > > <?xml version="1.0"?> > <mx:Application xmlns:mx="http://www.macromedia.com/2003/mxml" > xmlns="*" backgroundColor="white"> > <MyTree dragEnabled="true"> > <dataProvider> > <mx:Array> > <mx:Object label="foo" /> > <mx:Object label="bar" /> > </mx:Array> > </dataProvider> > </MyTree> > </mx:Application> > > // MyTree.as > class MyTree extends mx.controls.Tree > { > function get dragImage() > { > return MyDragProxy; > } > } > > //MyDragProxy.as > class MyDragProxy extends mx.controls.listclasses.DragProxy > { > public function createChildren():Void > { > super.createChildren(); > > var label = createClassObject(mx.controls.Label, "", > getNextHighestDepth(), {text: "Watch me move"}); > label.y += 20; > } > } > > You can put your image in createChildren() Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

