A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Fighting tutorial 1

  1. #1
    Member
    Join Date
    Jan 2005
    Posts
    32

    Fighting tutorial 1

    I would put this in the tut section but they wont let me....

    Fighting Tutorials
    #1-3
    animation.
    Zerghelp.com

    Create a guy on the left side of the screen

    facing right. make him a movie clip.

    double click on the movie clip and

    make the kicking foot a movie clip and instance name it foot1

    make the punchning arm a movie clip and instance name it arm1

    create a punching animation.

    label the first frame of it punch. on the last frame of the

    kick animation put the actions GotoAndStop(1); After that

    Create a kick animation.label the first frame of the kick

    animation kick.on the last frame of the kick animation

    Put the actions GotoAndStop(1);Next Create A Falling back

    frame.Label the first frame of it fall.On the last frame put

    the actions GotoAndStop(1);On The arm in the first frame of the

    player movieclip. Put the actions


    onClipEvent (enterFrame) {
    if (Key.isDown(87)) {

    _parent.gotoAndPlay("punch");

    }
    if (Key.isDown(83)) {

    _parent.gotoAndPlay("kick");
    }

    }

    And these actions on the first frame

    stop();



    Create another guy on the other side and make him a movie clip.

    double click on the movie clip and make the kicking foot a movie

    clip and instance name it foot2 make the punching arm a movie clip

    and instance name it arm2 create a punching animation.

    label the first frame of it punch. on the last frame of the

    kick animation put the actions GotoAndStop(1); After that

    Create a kick animation.label the first frame of the kick

    animation kick.on the last frame of the kick animation

    Put the actions GotoAndStop(1);Next Create A Falling back

    frame.Label the first frame of it fall.On the last frame put

    the actions GotoAndStop(1);On The arm in the first frame of the

    player movieclip. Put the actions


    onClipEvent (enterFrame) {
    if (Key.isDown(Key.UP)) {

    _parent.gotoAndPlay("punch");

    }
    if (Key.isDown(Key.DOWN)) {

    _parent.gotoAndPlay("kick");
    }

    }

    And on the first frame put the actions

    stop();

    press the back arrow to get to the main timeline and
    instance name the guy on the left player1. instance name
    the guy on the right player2.

    put these actions in player 1

    onClipEvent (load) {
    movement1 = 10;
    }
    onClipEvent (enterFrame) {
    if (Key.isDown(65)) {
    this._x = this._x-movement1;
    step = 1;

    }
    }

    onClipEvent (enterFrame) {
    if (Key.isDown(68)) {
    this._x = this._x+movement1;
    step = 2;

    }
    }



    put these actions in player 2

    onClipEvent (load) {
    movement1 = 10;
    }
    onClipEvent (enterFrame) {
    if (Key.isDown(37)) {
    this._x = this._x-movement1;

    }
    }
    onClipEvent (enterFrame) {
    if (Key.isDown(39)) {
    this._x = this._x+movement1;

    }
    }

    Test it all the animations should be done keys are W,a,s,d up,down,left,right.
    health and damage will be done in next tutorial.

    Tutorial done.
    WOOT WOOT
    Last edited by wats120; 09-16-2005 at 05:47 PM.

  2. #2
    Patron Saint of Beatings WilloughbyJackson's Avatar
    Join Date
    Nov 2000
    Location
    Ro-cha-cha-cha, New York
    Posts
    1,988
    woot woot?

  3. #3
    (F)FlickCorp. Productions
    Join Date
    Oct 2004
    Location
    West Virginia, USA
    Posts
    67
    this section of the tutorial is very difficult to understand would be better if u would acompany it with an fla because some people like me like to learn hands on also u probably need to explain where to do the animations via new frame,same frame whatever I dunno Im a newb lol
    Ingage - The Unsleepable

    (F)FlickCorp. Productions

  4. #4
    (F)FlickCorp. Productions
    Join Date
    Oct 2004
    Location
    West Virginia, USA
    Posts
    67
    oih and your sites link dont work or its just not loading the flash right
    Ingage - The Unsleepable

    (F)FlickCorp. Productions

  5. #5
    Senior Member TheLostGuru's Avatar
    Join Date
    Aug 2004
    Location
    I live on this webpage...
    Posts
    784
    Why don't you just make an fla. and make it open source?
    "If I have seen further it is by standing on the shoulders of giants." Isaac Newton
    ------------------------------------------------------------------------------

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