Yeah actually that was the one i did but if i assign a variable as' ht' and
' wt ' its not dropping the image into canvas...the code i ve used is given
below..do i need to make any changes to get the ' img ' height and width
public function performDrop(event:DragEvent):void
{
var items:Array = event.dragSource.dataForFormat("items") as
Array;
var oh:ObjectHandles = new ObjectHandles();
img= new Image();
img.source=items[0].src;
var ht:int = img.contentHeight;
var wt:int = img.contentWidth;
oh.height=ht;
oh.width =wt;
// oh.x=img.contentMouseX;
// oh.y=img.contentMouseY;
oh.resizeHandleImage = resize_handle;
oh.addChild(img);
oh.allowRotate = false;
img.percentHeight = 100;
img.percentWidth = 100;
img.maintainAspectRatio = false;
cvs.addChild(oh);
}
On Fri, Nov 28, 2008 at 6:58 PM, Vinod M. Jacob <[EMAIL PROTECTED]> wrote:
> Store the value into some variable intially....
> Is this what you meant ?
>
>
> On Fri, Nov 28, 2008 at 6:42 PM, vishnu <[EMAIL PROTECTED]> wrote:
>
>>
>> Hi friends ,
>>
>> How can i find the height,width,x and y position of an image that i am
>> dragging and dropping into canvas.i am using object handles for
>> dragging and resizing the image inside the canvas.In that i am
>> restricting the height and width as oh.height=100;oh.width=100..
>>
>> But i need the original height and width of the Image i am dropping
>> in..
>>
>>
>>
>>
>
> >
>
--
Regards,
Vissanth..
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---