just make a mvc to the left of your stage… you know you will make it 12 frames long and on the last key frame put an add AS:
_root.num += 1
and then on that movie clip put the:
onClipEvent(EnterFrame) {
if (_root.num == 12) {
goto and play(number)
}
}
Note: thats a rough example dont copy the code.
i cant do that becuase I need to acess code outside of the movie clip and I dont think that will work… Unless I’m meiss understanding what you are saying
or simply wrap the code you want delayed with this:
waitV=setInterval(function(){
clearInterval(waitV)
...
the code you want delayed
...
},x) //where x is the number of milliseconds you want it delayed for
ill wrap it around your code so you can see what i mean and ill make it wait for 5 secs:
waitV=setInterval(function(){
clearInterval(waitV)
_root.randomnumber=(random(20))
if (_root.randomnumber<=8){_root.commentbox="Hit!"}
if (_root.randomnumber<=8){_root.enemyhp-=15, nextFrame()
}
else {_root.commentbox="Miss!"
}
},5000)