Código ActionScript :
Px=0
Py=0
idnum=0
i=1
id=0
poliProf = 100
polid = "polig"+id
wd = Stage.width;
hg = Stage.height;
//id = 0
//var id:Array = new Array(12);
selec =""
btn_00.onPress =function()
{creaFig();}
onEnterFrame=function()
{
tex.text=rand
tex1.text=selec
//if(polig13._x<wd-332){btn_00.onPress =function(){creaFig();}}
_root[polid].onPress=function(){startDrag(this,false);selec =0}
MovieClip(polig0).onRelease=function(){stopDrag()}
MovieClip(polig1).onPress=function(){startDrag(this,false);selec =1}
MovieClip(polig1).onRelease=function(){stopDrag()}
MovieClip(polig2).onPress=function(){startDrag(this,false);selec =2}
MovieClip(polig2).onRelease=function(){stopDrag()}
MovieClip(polig3).onPress=function(){startDrag(this,false);selec =3}
MovieClip(polig3).onRelease=function(){stopDrag()}
MovieClip(polig4).onPress=function(){startDrag(this,false);selec =4}
MovieClip(polig4).onRelease=function(){stopDrag()}
MovieClip(polig5).onPress=function(){startDrag(this,false);selec =5}
MovieClip(polig5).onRelease=function(){stopDrag()}
MovieClip(polig6).onPress=function(){startDrag(this,false);selec =6}
MovieClip(polig6).onRelease=function(){stopDrag()}
MovieClip(polig7).onPress=function(){startDrag(this,false);selec =7}
MovieClip(polig7).onRelease=function(){stopDrag()}
MovieClip(polig8).onPress=function(){startDrag(this,false);selec =8}
MovieClip(polig8).onRelease=function(){stopDrag()}
MovieClip(polig9).onPress=function(){startDrag(this,false);selec =9}
MovieClip(polig9).onRelease=function(){stopDrag()}
MovieClip(polig10).onPress=function(){startDrag(this,false);selec =10}
MovieClip(polig10).onRelease=function(){stopDrag()}
MovieClip(polig11).onPress=function(){startDrag(this,false);selec =11}
MovieClip(polig11).onRelease=function(){stopDrag()}
MovieClip(polig12).onPress=function(){startDrag(this,false);selec =12}
MovieClip(polig12).onRelease=function(){stopDrag()}
MovieClip(polig13).onPress=function(){startDrag(this,false);selec =13}
MovieClip(polig13).onRelease=function(){stopDrag()}
}
function creaFig()
{
rand= random(3)
polo= attachMovie("fig"+rand,"polig"+id, this.getNextHighestDepth());
Py+=64
id++
polo._x= Px+32
polo._y= Py
if(polo._y >hg-256){Px+=64;Py=0}
if(polig13._x >wd-332){btn_00.onPress=null;}
//polo._rotation=random(361)
}
btn_02.onPress=function() {
polnum = "polig"+selec
_root[polnum]._rotation+=90
}
btn_03.onPress=function() {
polnum = "polig"+selec
_root[polnum]._rotation-=90
}
lo que quiro simplificar son los onPress creo que tiene qque haver una manera de hacerlo mass simple
ademas asi me delimito mi idea es que aunke cree 100 polig con una funcion pueda saber a cual es cual y darle un id
gracias de antemano
