5 Replies Latest reply on Jul 8, 2006 9:43 AM by jp zoro

    Button problem

    jp zoro
      I've made three 'Joker' buttons in frame 5. I want these to stay down when they've been hit (which I've done) but now I don't know how to make the Joker move the timeline onto 'nextframe'. You can see the current version of this at http://jpriordan.mysite.wanadoo-members.co.uk/Plenaries/plenary_letters.htm
      I'm new to Flash and teaching myself as I go along. Sorry if this is something really basic!

      Thanks for your help.

      Here is the exported flash.

      Can I put the .fla on this forum so you can have a look?
        • 1. Button problem
          A suppose an easy way to do this would to be to click on each joker button and view the actions for that button (F9 on a pc). Then in the actions, type in the following code, depending on your prefference:


          You can change it to " on(press)" if that's what you want or you can change it to "gotoAndStop(6)" if that is the desired effect.

          I'm no expert on flash so hopefully i didn't tell you something completely wrong =)

          Edit: I believe you can also replace the frame "(6)" with "next"
          • 2. Re: Button problem
            jp zoro Level 1
            Many thank for your reply PDMart.

            My problem is that I needed to use a Movie Clip with three frames in it (the third of which is 'hit') not a button as I wanted to the 'button' to stay pressed when it had been hit. Does that make sense? When I double click on the Joker and go to the third frame I've put nextFrame(); in the actions but this doesn't take me to the next frame of the normal timeline.

            Best wishes,
            • 3. Re: Button problem
              PDMart Level 1
              I think what you need to do is to put the actionscript on your instance of the joker Movie Clips in the actual stage, not in frame 3 of your Movie Clip. So where you see in your stage your 3 jokers, click on each one and in the actions panel put in the required code, which should be something like
              • 4. Re: Button problem
                jp zoro Level 1
                I've tried what you suggested but it isn't working yet. I'm probably doing something dum as I'm new to Flash.

                Here is the code I've got on the Joker button in an 'actions' layer which works to keep the joker pressed:

                this.onRollover = function() {
                this.onRollOut = this.onDragOut=function () {
                if (this.selected != true) {
                this.selected = false;
                this.onPress = function() {
                this.selected = true;

                • 5. Re: Button problem
                  jp zoro Level 1
                  I got it sorted:

                  on (release) {
                  with (_level0) {