Re: Help - ActionScripting
Quote:
Originally posted by krisinyork
Me again,
Tried every possible combination but the right one for this. Basically, whenever the specified player called "hacker" MC object touches the MC called "laser", it should bring a new MC to the middle of the screen. This is done using the function "hack".
Here's the script for the Laser:
onClipEvent (load) {
if (this.hitTest( _root.hacker ) ){
hack();
}
}
Here's the script for the function:
onClipEvent (load) {
function hack(){
this._x=117;
this._y=68.5;
this.gotoAndStop(1);
}
}
Problem is, "hacker" can run over "laser" repeatedly without the function going on.
Anyone help?
change onClipEvent (load) to onClipEvent(enterFrame)
load = do only once its loaded.
enterFrame = on every frame enter.
otherwise your code looks correct, if it still dotn work post I'll look more into it.