Hey!... the first problem have been resolved now. :} with some help from my internet friend. Still, the MC stuck on the top left of the screen is annoying. Anyone knows how to fixed it?
This is the code that created MC and removed it after its amount = 0 :
You can see that I use ...Code:function ballRun(){ this._x+=this.spdX; this._y+=this.spdY; for(i=1;i<=numTarget;i++){ tar=_root["t"+i]; if(this.hitTest(tar)){ if(tar._currentframe==1){ score2++; txtScore2.text=score2; tar.play(); this.removeMovieClip(); } } } } mcBall2.onPress=function(){ isDrag=true; mcBall2.startDrag(false); } mcBall2.onRelease=mcBall2.onReleaseOutside=function(){ isDrag=false; mcBall2.stopDrag(); cur++; me=_root.attachMovie("mcBall2","b"+cur,cur); me._x=mcBall2._x; me._y=mcBall2._y; me.spdX=(cenX-mcBall2._x)/2; me.spdY=(cenY-mcBall2._y)/2; me.onEnterFrame=ballRun;} } _root.onEnterFrame=function(){ if(!isDrag){ mcBall2.spring(cenX,cenY,myInertia,myK); } empGraphic.clear(); empGraphic.lineStyle(8,0xFF0000); empGraphic.moveTo(empL._x,empL._y); empGraphic.lineTo(mcBall2._x,mcBall2._y); empGraphic.lineTo(empR._x,empR._y);Code:amB--; amBall.text=amB; if(amB<=0){ me=delete _root.attachMovie("mcBall2","b"+cur,cur); mcBall2._visible=false;
to remove the bullet.(ball)Code:amB--; amBall.text=amB; if(amB<=0){ me=delete _root.attachMovie("mcBall2","b"+cur,cur); mcBall2._visible=false;
but every time when it is removed from the screen then it will reappear on the top left of the screen.
Itried so many ways, many codes. I tried changed the position of empthyGraphic(MC) it dosen't work too.




Reply With Quote
