I can't stop for loop mc and I don't know why my mc always be at the top left corner.
Hi all,
I really in a frustrated mood. I tried to figure it out all day long to finished my game. I'm making a game which has 2 levels; 3 scenes. And I ran into 2 problems. First, I can't stop my MCs which I attach to make them looping with this code
I found they come back again and again in that very first scene until I go to the second scene. I tried so many code and put them in so many place for all day now. What I want is to remove them after the time is up which I use the Interval code.
still...didn't work! I tries even make a fake scene before the real first scene. :P But nothing.
What can I do any more? Where am I missing? or Where should I put the code on?-- I put it right in the Interval code.
----------------------------------------
And another issue...
Have anyone ever got thing like this: when use removeMovieClip(); and however you tried these MCs( which is a bullet in my game and another is that looping mc) will just appear at the top left corner. How can you get rid of it???
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 :
to remove the bullet.(ball)
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.
There is almost no reason to use the delete function in AS2.
One case you may wish to use it, is if you wanted to completely remove an handler on the MC ie. an onPress.
Though I could be wrong about that my knowledge of the delete function is minimal as I don't use it.
When using the attachMovie function you want to use removeMovieClip.
So.
Actionscript Code:
me=_root.attachMovie("mcBall2","b"+cur,cur); //Your current attachment type
ok... butif I don't use it, so what should I use? me=delete _root.attachMovie("mcBall2","b"+cur,cur); //Current remove code me=mcBall2.removeMovieClip();
There is almost no reason to use the delete function in AS2.
One case you may wish to use it, is if you wanted to completely remove an handler on the MC ie. an onPress.
Though I could be wrong about that my knowledge of the delete function is minimal as I don't use it.