Re: [flexcoders] dragProxy as image dosen't show image
Thank you Tim, you solve my problem. On 26 Mar 2007 06:18:13 -0700, Tim Walling <[EMAIL PROTECTED]> wrote: Instead of loading the image for a second time you could just copy the raw bitmap data of the loaded image using something like this: http://www.flex2components.com/f2cblog/2006/05/18/flex2-dnd-bitmap-copy/ I follow this approach when creating drag proxies in order to get a "copy" of the item being dragged. Tim On 26 Mar 2007 03:59:26 -0700, Paolo Bernardini < [EMAIL PROTECTED]> wrote: > >Hi > > I was following the last example on http://www.adobe.com/devnet/flex/quickstart/adding_drag_and_drop/ > > > I'm having a problem when I replace embedded images with dynamic URLs. > > this is the part of the code that I'm having problem with: > > // Create a copy of the coin image to use as a drag proxy. > var dragProxy:Image = new Image(); > dragProxy.source = event.currentTarget.source; > > if the source is embedded like in the example ([Embed("assets/5c.png")]) > it works fine, but when replaced with a dynamic image, I can't see the proxy > image been dragged. > > Has anyone else found this problem? any solution? > > by Paolo > > -- Tim timwalling.com
Re: [flexcoders] dragProxy as image dosen't show image
Instead of loading the image for a second time you could just copy the raw bitmap data of the loaded image using something like this: http://www.flex2components.com/f2cblog/2006/05/18/flex2-dnd-bitmap-copy/ I follow this approach when creating drag proxies in order to get a "copy" of the item being dragged. Tim On 26 Mar 2007 03:59:26 -0700, Paolo Bernardini <[EMAIL PROTECTED]> wrote: Hi I was following the last example on http://www.adobe.com/devnet/flex/quickstart/adding_drag_and_drop/ I'm having a problem when I replace embedded images with dynamic URLs. this is the part of the code that I'm having problem with: // Create a copy of the coin image to use as a drag proxy. var dragProxy:Image = new Image(); dragProxy.source = event.currentTarget.source; if the source is embedded like in the example ([Embed("assets/5c.png")]) it works fine, but when replaced with a dynamic image, I can't see the proxy image been dragged. Has anyone else found this problem? any solution? by Paolo -- Tim timwalling.com
[flexcoders] dragProxy as image dosen't show image
Hi I was following the last example on http://www.adobe.com/devnet/flex/quickstart/adding_drag_and_drop/ I'm having a problem when I replace embedded images with dynamic URLs. this is the part of the code that I'm having problem with: // Create a copy of the coin image to use as a drag proxy. var dragProxy:Image = new Image(); dragProxy.source = event.currentTarget.source; if the source is embedded like in the example ([Embed("assets/5c.png")]) it works fine, but when replaced with a dynamic image, I can't see the proxy image been dragged. Has anyone else found this problem? any solution? by Paolo