Changing the location of some actionscript

Right, in the neverending tale of my problems, I have another one which I can’t seem to solve.

I have this actionscript

[AS]onClipEvent (enterFrame) {

currentlocx = this._x;
currentlocy = this._y;
differencex = newX - currentlocx;
differencey = newY- currentlocy;
accelx = differencex/accelFactor;
accely = differencey/accelFactor;
this._x = this._x + accelx;
this._y = this._y + accely;
if (Math.round(this._y) == Math.round(newY) && Math.round(this._x) == Math.round(newX) ) {
    newX = Math.round(Math.random()*640);
    newY = Math.round(Math.random()*480);
    accelFactor = Math.ceil(Math.random()*4) + 2;
}

}
onClipEvent (load) {
newX = Math.round(Math.random()*640);
newY = Math.round(Math.random()*480);
accelFactor = Math.ceil(Math.random()*4) + 2;
}[/AS]

nestled inside a movieclip instance. Not contained in a frame of the movieclip’s timeline, but the actions for the movieclip (which are displayed when you single click on the movieclip when its in the timeline). I Didn’t mean to make that sound patronising, but just so you know which part I am on about. :stuck_out_tongue:

Anyway, what I want to do is put the above code into a frame on my ‘Actions’ layer on the main timeline and somehow replace that code (which is in my movieclip) with something far simpler. I.e.

[AS]onClipEvent(enterFrame){
move();
}[/AS]

Or something to that effect. My movieclip will be called ‘spore’+i (where ‘i’ is incrementing values starting at 1).

:book: