| Issue 20: | how to get multipal object height & width | |
| 1 person starred this issue and may be notified of changes. | Back to list |
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);
}
Dec 22, 2009
Project Member
#1
marc.hug...@gmail.com
Status:
Invalid
|