cokeman
12-06-2008, 11:56 PM
im trying to make a simple game where orbs fall and u have to catch them and get points, heres what i have for the orbs so far:
onClipEvent (load) {
var speed;
}
onClipEvent (enterFrame) {
_y = _y + speed
if(_y >= 200)
{
this.removeMovieClip()
}
}
onClipEvent (enterFrame)
{ if(_y >= 200)
{
duplicateMovieClip
} }
onClipEvent (load) {
function reset(){
this._y= -20;
this._x=random(400);
speed = random(5)+5;
}
reset();
}
onClipEvent (enterFrame) {
if (_root.bar.scrollStart){
this._x-=Speed+_root.mainGround.groundSpeed;
} else {
this._y+=Speed;
}
if (this._y>=400) {
reset();
}
if (this.hitTest( _root.bar ) ){
_root.gotoAndPlay ( "hit" );
}
}
Im trying to make it when it hits something called "bar" it plays 5 frames i made for the orb movieclip, but i cant get it to play the frames, and i named the first of those clips "hit", and even when i try to get it to gotoAndStop at a frame it wont work,also i try to get more than 1 orb on the thing at a time with this:
numcircle=3;
for (i=2; i<=numcircle; i++){
circle.duplicateMovieClip( "circle", i+100 );
}
but it only creates 2 extra orbs once and those 2 dissapear while they've fallen about half what thier supposed to fall and the other 1 falls all the way
then it preceeds to drop 1 at a time, please help
onClipEvent (load) {
var speed;
}
onClipEvent (enterFrame) {
_y = _y + speed
if(_y >= 200)
{
this.removeMovieClip()
}
}
onClipEvent (enterFrame)
{ if(_y >= 200)
{
duplicateMovieClip
} }
onClipEvent (load) {
function reset(){
this._y= -20;
this._x=random(400);
speed = random(5)+5;
}
reset();
}
onClipEvent (enterFrame) {
if (_root.bar.scrollStart){
this._x-=Speed+_root.mainGround.groundSpeed;
} else {
this._y+=Speed;
}
if (this._y>=400) {
reset();
}
if (this.hitTest( _root.bar ) ){
_root.gotoAndPlay ( "hit" );
}
}
Im trying to make it when it hits something called "bar" it plays 5 frames i made for the orb movieclip, but i cant get it to play the frames, and i named the first of those clips "hit", and even when i try to get it to gotoAndStop at a frame it wont work,also i try to get more than 1 orb on the thing at a time with this:
numcircle=3;
for (i=2; i<=numcircle; i++){
circle.duplicateMovieClip( "circle", i+100 );
}
but it only creates 2 extra orbs once and those 2 dissapear while they've fallen about half what thier supposed to fall and the other 1 falls all the way
then it preceeds to drop 1 at a time, please help