# Loops and methods

**URL:** <https://forum.kirupa.com/t/loops-and-methods/276984>\
**Category:** Uncategorized\
**Created:** [December 6, 2008, 1:07am UTC](https://forum.kirupa.com/t/loops-and-methods/276984 "2008-12-06T01:07:58Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![brndn](https://avatars.discourse-cdn.com/v4/letter/b/dec6dc/32.png) [@brndn](https://forum.kirupa.com/u/brndn)\
**Post date:** [December 6, 2008, 1:07am UTC](https://forum.kirupa.com/t/loops-and-methods/276984/1 "2008-12-06T01:07:58Z")

</div>

hi there  
I have created a package to handle some 3d bits using papervision.  
I am having the issue whereby I have a few static methods that control the planes and bitmapMaterial.

In a nut shell using static methods dont allow the 3d motions to be assigned individually.

```
 Code:
 function callThumbs():void {
for (var i:Number = 0; i &lt; my_total; i++) {

    var thumb_url = my_images*.@THUMB;

var coneBlackMaterial:BitmapFileMaterial = new BitmapFileMaterial(thumb_url); 
        coneBlack = new Plane( coneBlackMaterial, 250, 200, 3, 3);
        rootNode.addChild(coneBlack);
        Tweener.addTween(coneBlack, { rotationX:0, rotationY:0, z:70, time:1, transition:"easeinoutexpo"});                
}

```

}  
basically could some one show me how to create  
coneBlack+i = new Plane( coneBlackMaterial, 250, 200, 3, 3);

this is tricky as coneBlack1 needs to be private var cone1: Plane; but i am using a good lot of xml to cycle through the loop, and would like to create the private methods in a loop???

does any one know if this is possible.

thanks
