A Flash Developer Resource Site

Results 1 to 6 of 6

Thread: go to key frame __ on (Key) help

  1. #1
    Junior Member
    Join Date
    Aug 2006
    Posts
    13

    go to key frame __ on (Key) help

    Ok...

    Well, i have koolmoves demo 5.3.2 and i'm having trouble trying to do the "go to key frame __ on (Key)." In this case, i want it to go to key frame 3 when you press "space." I ain't no genius on action scripting so if someone could please tell me how to do this is would be very appreciated.
    -[~]this_message_has_been_approved_by_Ksouth[~]-
    also, i tried to use the search thing but i couldn't really figure out a way to put my cry for help into words.

  2. #2
    Senior Member indogo's Avatar
    Join Date
    Dec 2005
    Posts
    282
    this.onEnterFrame = function(){
    if(Key.isDown(Key.SPACE)){
    gotoAndPlay("3");
    };
    }

    use names for your keyframes...generally better.
    put the code above in the frame where the movie is stopped waiting to jump.

    other keys are listed in the syntax assistant.

    regards

    mike

  3. #3
    Junior Member
    Join Date
    Aug 2006
    Posts
    13
    omfg...thnx alot!!!
    and i mean alot
    like...um...the length of a rainbow
    and...100 cups of coffee...

    THNX!

  4. #4
    Senior Member indogo's Avatar
    Join Date
    Dec 2005
    Posts
    282
    Guess it worked them

    mine's a duff

    mike

  5. #5
    Junior Member
    Join Date
    Aug 2006
    Posts
    13
    erm...

    i just noticed that it says..

    "line 5-expeting a mouse event statement"

    are you sure this is exactly it?

    this.onEnterFrame = function(){
    if(Key.isDown(Key.SPACE)){
    gotoAndStop("3");
    };
    }

    *****edit****

    i didn't read the other stuff so i'll try that first



    ****edit...again***

    nvm..it works...

    coffeee!!!!!
    THNX ALOT!!!!!!!!!!
    Last edited by ksouth; 08-14-2006 at 02:30 PM.

  6. #6
    Senior Member indogo's Avatar
    Join Date
    Dec 2005
    Posts
    282
    lol....I never know the best way to say ..'bung it in yer main timeline'

    ps.. this can be used in a movieclip as well

    mike

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