kingyiren / flex-object-handles

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

how to get partculier object in getChildren array #22

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
public function getNewWidthHeight(e:ObjectHandleEvent):void{
var children:Array = generic.getChildren();
var n:int = children.length;
for (var i:int = 0; i < n; i++)
    {
        var child:DisplayObject = DisplayObject(children[i]);
    //trace(child.x, child.y, child.width, child.height);
    //Alert.show(" width "+child.width+" height "+child.height);
    }

// var newWidth:Number =  (e.currentTarget as ObjectHandles).width;
// var newHeight:Number =  (e.currentTarget as ObjectHandles).height;
//Alert.show(" width "+newWidth+" height "+newHeight);

} 

Original issue reported on code.google.com by abidr...@gmail.com on 17 Sep 2009 at 5:12

GoogleCodeExporter commented 8 years ago
var totalHeight:Number;
var totalWidth:Number;

var children:Array = generic.getChildren();
var n:int = children.length;

for (var i:int = 0; i < n; i++)
{
   var child:objectHandles = children[i] as objectHandles;
   if(child != null)
   {
     totalWidth += child.width;
     totalHeight += child.height;
   }
}

Original comment by mail.Bha...@gmail.com on 17 Sep 2009 at 5:35

GoogleCodeExporter commented 8 years ago
I believe your question was answered, closing this issue.

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

GoogleCodeExporter commented 8 years ago
Issue 21 has been merged into this issue.

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