A Flash Developer Resource Site

Results 1 to 9 of 9

Thread: game problems

  1. #1
    Junior Member
    Join Date
    Jan 2005
    Posts
    12

    game problems

    Hi, I want to make a game but I dont know how to do two things. One I want the cursor to look like a cross-heir. Two I want there to be a gunshot explosion every where I click. Thanx

  2. #2
    Senior Member hum's Avatar
    Join Date
    Sep 2003
    Location
    CloudCuckooland
    Posts
    1,714
    Hi
    There are some shootem up flas in the movies section here at flashkit.......
    http://www.flashkit.com/movies/Games...-412/index.php
    check the games forum using the search feature for further help...good luck

  3. #3
    Junior Member
    Join Date
    Jan 2005
    Posts
    12
    k thanx

  4. #4
    Junior Member
    Join Date
    Jan 2005
    Posts
    12
    actually that didnt answer my question, sorry!

  5. #5
    Senior Member hum's Avatar
    Join Date
    Sep 2003
    Location
    CloudCuckooland
    Posts
    1,714
    Hi...
    here is one way of accomplishing this....
    draw a crosshair and convert it to a movieclip.....click into the movieclip....
    and add three other layers ....then label all the layers ..
    actions/button/sound/crosshair....
    now add a keyframe to the actions and sound layers......for the button and crosshair layer just insert frame instead........
    ....on the button layer...draw a square that covers the crosshair and convert it to a button then click into the button and move the first frame to the hit state(this will make the button invisible when you test later...though it remains active....and will appear a light blue color on the stage in edit mode....click back out of the button so you can apply these actions to it.....
    code:
    on (press) {
    gotoAndStop(2);
    }
    on (release) {
    gotoAndStop(1);
    }



    ....now put stop actions in the actions layer keyframes and open the library....
    highlight the second keyframe on the sounds layer.......
    ive used a common library sound whereas as i presume you have a gunshot sound but this will do for now as an example...drag the sound file onto the stage it should show up on the keyframe 2 of sound layer...
    finally ...return to the main timeline and put this action on the movieclip that contains the button...
    code:
    onClipEvent (load) {
    Mouse.hide();
    }
    onClipEvent (mouseMove) {
    _x = _parent._xmouse;
    _y = _parent._ymouse;
    updateAfterEvent();
    }


    then test movie.....here is a fla which demonstrates what i have attempted to explain...hope you find it useful...

  6. #6
    Junior Member
    Join Date
    Jan 2005
    Posts
    12
    thanx alot! that was really usefull!

  7. #7
    Junior Member
    Join Date
    Jan 2005
    Posts
    12
    ahhh! sorry to bother u AGAIN but now i have another problem. I use the example u gave me two start my game but now when i use the action to make something happen when u click on it, it doesnt work. For example I have a guy as a movie clip that is set to start when you click on it but when i click on it the gunshot and every thing works but the guy doesnt get shot. Do u have any suggestions?

  8. #8
    Senior Member hum's Avatar
    Join Date
    Sep 2003
    Location
    CloudCuckooland
    Posts
    1,714
    Hi..
    send the fla of what you have so far and ill take a look for you...

  9. #9
    Junior Member
    Join Date
    Jan 2005
    Posts
    12
    k thx
    Attached Files Attached Files

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