A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: [F8] I need help with a scoreboard...

  1. #1
    Junior Member
    Join Date
    Aug 2008
    Posts
    7

    [F8] I need help with a scoreboard...

    I have been trying to make a scoreboard (this will be easy for experts but i am a beginner and every tutorial i read or that people tell me doesnt work)...

    tell me what i have to do if you know to make a basic text score board.
    The file is too big so i have to say what i did like this:

    There's only 1 frame and 1 layer. 2 Items- a crosshair as the cursor and a target to shoot at scrolling across the screen (5 at a time in random positions)

    On frame 1:
    for(i=1;i<=5;i++)
    {
    _root["face_mc"].duplicateMovieClip("face_mc"+i,i+1000,face_mc);
    var speed = 30
    }

    On the crosshair (movie clip):
    onClipEvent (load)
    {
    startDrag(this, true);
    Mouse.hide();
    this.swapDepths(9999);
    }
    onClipEvent(mouseDown)
    {
    playsounds = new Sound();
    playsounds.attachSound("shot");
    playsounds.start(0, 1);
    for(i=1;i<=5;i++)
    {
    if(this.hitTest(_root["face_mc"+i])&&_root["face_mc"+i].dead==0)
    {
    _root["face_mc"+i].gotoAndPlay(2);
    }
    }
    }
    On the target (button)(named face_mc):
    onClipEvent(load)
    {
    function reset()
    {
    if(this._name=="face_mc")
    {
    this._visible=false;
    }
    else
    {
    this._visible=true;
    }
    this.dead=0;
    this.speed=random(4)+5;
    this._x=600;
    this._y=random(400);
    }
    this.reset();



    }
    onClipEvent(enterFrame)
    {
    this._x-=this.speed;
    if(this._x<-40)
    {
    this.reset();
    }
    }
    On frame 1 of the target:
    stop();
    On frame 4 of the target:
    this.reset();




    That is all- hope someone knows

  2. #2
    Junior Member
    Join Date
    Aug 2008
    Posts
    7
    Also i forgot to mention i have sound fx and stuff but they dont have anything to do with the scoreboard.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center