A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: any ideas what could cause a movie clip not to play?

  1. #1
    Junior Member
    Join Date
    Mar 2015
    Posts
    13

    Question any ideas what could cause a movie clip not to play?

    Okay, I've been coding a bit of a side scroller. Everything works great except for 2 movie clips. A quick example of the code would be
    Code:
    if ( Key.isDown ( Key.SPACE ) {
    gotoAndStop ("jump")
    }
    if ( Key.isDown ( Key.LEFT) || Key.isDown ( Key.RIGHT)){
    gotoAndStop ("walk")
    }
    Basically all my code follows that format. The two movie clips that aren't playing are creep and crawl. creep is accessed with a key combination of up arrow and either right or left arrows, as for crawl it I was going to code it as the down arrow with either the right or left arrow obviously depending on the direction. I have been troubleshooting for two days and am just looking for advice what I could try for I am at my wits end. When I press the desired key combinations it can find the right frame (frame 1) of the animations. I suppose I should mention my character is a mc and in my character's timeline are frames with stop (); on them as well as labels such as walk, jump, etc. These are also mc's nested in the character timeline it is these that contain the animation. My trace commands can vouch for me, the code goes to frame 1 of crawl/creep timeline but will go no further. I tried gotoAndPlay among other things every idea I had I have long since exhausted and am hoping to get some fresh suggestions. One thing that I have thought of is perhaps because the right or left arrows would handle walk, creep and crawl, that perhaps it was confused though I specifically assign conditions for if up and left/right is pressed execute code, for instance. Honestly I don't know, which is why I seek advice, 2 days wasted is more than enough. I appreciate all you can offer for I have gone looney tunes.

  2. #2
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    If you can attach your fla, it will help tremendously,

    look at these two pages instead,

    in the first link, look at gravity and walking section

    http://www.rodedev.com/tutorials/gamephysics/

    http://www.kirupa.com/developer/mx20...tform_game.htm

  3. #3
    . fruitbeard's Avatar
    Join Date
    Oct 2011
    Posts
    1,780
    Hi,

    These two links should help you enormously,

    download the fla at bottom of thread on this link http://board.flashkit.com/board/show...super-basic%29

    and the fla from this link http://board.flashkit.com/board/show...hlight=gravity

  4. #4
    Junior Member
    Join Date
    Mar 2015
    Posts
    13
    Thanks fruitbeard, those codes are pretty slick. I wanted to mention, I was poking about trying to learn how to utilize the code you provided, and I happened upon a site on the adobe forums. The one posting the issue sounded almost identical to my dilemma. He did explain a way that he got to work. I have read and reread his explaination and I don't know if it is just me but I could not for the life of me comprehend where to put the code and how it works. For learning purposes, I would be ever grateful if someone could read over his explaination and if you understand it, can you try to simplify his words. I know I can be troublesome however, I still consider myself a noob and I love to learn. That link I mentioned can be found here;
    https://forums.adobe.com/thread/867207

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