kingyiren / flex-object-handles

Automatically exported from code.google.com/p/flex-object-handles
0 stars 0 forks source link

how to get multipal object height & width #20

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
public function getNewWidthHeight(e:ObjectHandleEvent):void
{
  var newWidth:Number =  (e.currentTarget as ObjectHandles).width;
  var newHeight:Number =  (e.currentTarget as ObjectHandles).height;

  Alert.show(" width "+newWidth+" height "+newHeight);
}

private function hit(event:MouseEvent):void
{
  var dd:String = event.currentTarget.id;
  var oh1:ObjectHandles = new ObjectHandles();

oh1.addEventListener(ObjectHandleEvent.OBJECT_SELECTED,OnObjectHandlesSelected);
oh1.allowRotate=false;
oh1.x=158; 
oh1.y=94;
oh1.height=47; 
oh1.width=168;
val(oh1.id)

oh1.addEventListener(ObjectHandleEvent.OBJECT_DESELECTED,getNewWidthHeight);

    var txt:TextArea = new TextArea();
    txt.text="Click here and type your text2"
    txt.horizontalScrollPolicy = "off";
    txt.verticalScrollPolicy = "off";
    txt.percentWidth=100;
    txt.percentHeight=100;
    txt.setStyle("backgroundAlpha","0") 
    txt.setStyle("fontSize","14");  
    txt.setStyle("color","#000000");
    txt.setStyle("fontFamily","Verdana");
    txt.setStyle("fontWeight","bold");
    txt.setStyle("textAlign","center");
    txt.setStyle("length","0");
    txt.setStyle("borderStyle","none");
    txt.condenseWhite=true;
    txt.addEventListener(MouseEvent.CLICK , clickDis);
    if(dd=="test")
    {
         oh1.allowHMove=true;
         oh1.allowHResize=true;
        oh1.allowVMove=true;
        oh1.allowVResize=true;
        oh1.allowRotate=false;
        oh1.mouseChildren=true;
        txt.selectable=true;
        txt.editable=true;
        oh1.addChild(txt);
       }
generic.addChild(oh1);

} 

Original issue reported on code.google.com by abidr...@gmail.com on 16 Sep 2009 at 10:20

GoogleCodeExporter commented 8 years ago
I'm unsure what this issue is asking.

Original comment by marc.hug...@gmail.com on 22 Dec 2009 at 3:47