Random appearance

i want that a MC appears randomly on the stage but with the time…like 1 second, and then after 1 second, it randomly appears somewhere else on the stage (800x600).\r\rThank you.

onClipEvent(enterFrame){\rif(!zSetTime){\rnStartTime = getTimer();\rzSetTime = true;\r_x = Math.random()*800;\r_y = Math.random()*600;\r}\rif(getTimer()-nStartTime>=1000){\rzSetTime = false;\r}\r}\r\r:) \rjeremy


Hey! Thanks again for this but i have one more thing. When you are “chasing” that movie clip , is there any way that there is a timer and when you click the MC (button inside), it takes you to other frame (button takes you to frame 2, when you click it) and there is a box, eg. dynamic text that shows you how much time elapsed until you clicked on the button. :slight_smile: \r\rThanks!! Oh yeah!! 1000 is too slow and 0900 and 0800 are same as 1000 but 0700 is too fast, as so 0750 also is. What’s the point? I wanna make easy…1000, medium…don’t know which, hard…don’t know which and impossible…0750 \r:) \r\rTHANKS!!!

if you want to see how long it takes to hit it, just put this:\ronClipEvent (mouseDown) {\rif (this.hitTest(_root._xmouse, _root._ymouse, false)) {\rtrace (getTimer()-nStartTime);\r}\r}\r\rthat way you can see the actual latency.\r\rif you wanted to make the movie clip stop when you click on it, just put the load and enterFrame actions in the movie’s timeline and make loops where appropriate.\r:) \rjeremy

Hmmm…well…you see…When I click on that movie clip it shows me the time in debbuger but not in the exported file. I think this could be done with dynamic text. When i click the button in MC it shows me the time in dynamic text which i have on the stage…eg…in the corner. How?

onClipEvent (mouseDown) {\rif (this.hitTest(_root._xmouse, _root._ymouse, false)) {\r_root.nLatency = (getTimer()-nStartTime);\r}\r}\rand put a dynamic text field named ‘nLatency’ on the stage (at the _root).\r:) \rjeremy