Open GoogleCodeExporter opened 8 years ago
Hai Naresh ...!!! Try This one
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"
minWidth="955" minHeight="600"
xmlns:objecthandles="com.roguedevelopment.objecthandles.*">
<mx:Script>
<![CDATA[
import mx.controls.Alert;
import mx.events.MoveEvent;
protected function objecthandles1_moveHandler(event:Event):void
{
can.x
var canvasW:Number=can.width;
var canvasH:Number=can.height;
if(obj.x+obj.width>canvasW)
{
obj.x=canvasW-obj.width;
}
if(obj.x<0)
{
obj.x=0;
}
if(obj.y+obj.height>canvasH)
{
obj.y=canvasH-obj.height;
}
if(obj.y<0)
{
obj.y=0;
}
}
protected function obj_clickHandler(event:MouseEvent):void
{
obj.select()
}
]]>
</mx:Script>
<mx:Canvas id="can" x="50" y="50" width="600" height="500" borderStyle="solid" toolTip="{can.x,can.y}" horizontalScrollPolicy="off" verticalScrollPolicy="off">
<objecthandles:ObjectHandles id="obj" height="100" width="100" move="objecthandles1_moveHandler(event)"
click="obj_clickHandler(event)" toolTip="{obj.x,obj.y}" >
<mx:Image source="Desktopb.jpg" maintainAspectRatio="false" height="100%" width="100%">
</mx:Image>
</objecthandles:ObjectHandles>
</mx:Canvas>
</mx:Application>
Original comment by b.vijayv...@gmail.com
on 13 Jul 2011 at 2:26
Original issue reported on code.google.com by
naresh....@gmail.com
on 22 Dec 2009 at 4:14