Please help me, my script below is not working perfectly, Need any correction to my script below, What i want in this animation is Everytime ObjC3 hit ObjCat, then ObjC3 change to other shape, and if ObjC3 _y position less than 0 than this shape change to previous shape :
wRx=128;
hRx=429;
TopRx=0
BtmRx=TopRx+hRx;
LRx=0;
RRx=LRx+wRx;
//Object Propylene (C3)
for(i=5;i<=15;i++){
ObjC3=Rx.forC3inRx.attachMovie("id_c3","id_c3"+i,i);
ObjC3._x=random(wRx);
ObjC3._y=random(hRx);
ObjC3._alpha=0;
ObjC3.xSpeed=0;
ObjC3.ySpeed=0;
ObjC3.LSpeed=2;
ObjC3.HSpeed=10;
ObjC3.Speed=5;
ObjC3.shape=0
ObjC3.onEnterFrame=function(){
//Movement Down>>Up
this._y -=random(this.Speed);
if(this._y<=TopRx){this._y=BtmRx}
//Alpha
this._alpha +=random(2);}
}
//Object Catalyst
for(c=25;c<=35;c++){
ObjCat=Rx.forCatinRx.attachMovie("id_cat","id_cat"+c,c);
ObjCat._x=random(wRx);//xPos;
ObjCat._y=random(hRx);//yPos;
ObjCat._alpha=0;
ObjCat.xSpeed=0;
ObjCat.ySpeed=0;
ObjCat.LSpeed=2;
ObjCat.HSpeed=10;
ObjCat.Speed=4;
//
ObjCat.onEnterFrame=function(){
//Movement Up>>Down
this._y +=random(this.Speed);
if(this._y>=BtmRx){this._y=TopRx}
this._alpha +=random(2);}
}
//Test Hit
if(ObjC3.hitTest(ObjCat)){
ObjC3.gotoAndStop(2);
ObjC3.shape=1;}
if(ObjC3.shape==1 && ObjC3._y<=0){
ObjC3.gotoAndStop(1);
ObjC3.shape=0;}