I've coded a little game, but now I realized that I should include all the actions to frame on layer called "actions". This far I've written my code to movieclip. Any help on transforming this to frame?
onClipEvent (load) {
yspeed = 0;
lastx = 0;
gravity = 0.2;
speed = 5;
}
onClipEvent (enterFrame) {
yspeed += gravity;
if (_root.flake.hitTest(_root.cloud._x, _root.cloud._y, true)) {
yspeed = -9;
}
_root.cloud._x += (_root._xmouse-lastx+10)/speed;
lastx = _root.cloud._x;
_root.cloud._y += yspeed;
function asd() {
this._x += 2;
}
_root.flake.duplicateMovieClip("flake1",1,{_x:50, _y:350});
_root.flake1.onEnterFrame = asd;
}
Hope you understood. So no those onClipEvents, just a frame where I write all actions.
Also, I'm a beginner so any advice could be nice!
Thanks in advance, Martti Laine