6 Replies Latest reply on Jun 13, 2006 2:42 PM by Newsgroup_User

    using radio button to go to marker

    morningstar Level 1
      Hi,
      I'm using Director Mx for Windows. When the user checks a radio button (cast member "bon"), I want the movie to jump to a certain marker ("start"). I'm currently using the script below, (which uses the hilite property) that I thought would solve the problem, but nothing happened when I tried it.

      on mouseUp me
      if member("bon").hilite = TRUE then go to "start"
      end if
      end

      Does anyone have any idea of what might work? Thanks so much.
        • 1. Re: using radio button to go to marker
          Chunick Level 3
          Are you using a flash component radio button?
          • 2. Re: using radio button to go to marker
            Level 7
            > on mouseUp me
            > if member("bon").hilite = TRUE then go to "start"
            > end if
            > end

            Your code should work, though half of what's there is unnecessary.
            Simplification:

            on mouseUp
            if member("bon").hilite then go "start"
            end


            That extra "end if" won't cause problems here, but in more complex scripts
            it can really get you in trouble. You only need that if you're doing more
            than one command within the "if" or "else" if there is one. You can
            generally tell if something like that is extra by the fact that the
            auto-indentation is off. Every "end if" should be at the same indentation
            as its matching "if". If it isn't, then something is wrong.

            As for the other changes, the "me" is only necessary if you're actually
            going to use it in the script. Leaving it in is harmless, but just extra.
            The "= TRUE" is unnecessary in most cases, because saying "if A" is exactly
            the same as saying "if A = TRUE". And the word "to" is never needed in a
            "go" statement. (These are optional changes that won't cause or fix any
            problems, but saves a bunch of extra typing.)


            • 3. Re: using radio button to go to marker
              morningstar Level 1
              Hi,
              Thanks to all for the responses, however I still can't get the code to work. I've actually tried it with both the classic and flash component radio buttons. I went to the site to try to download the radio button behavior but the link wasn't working and all I could get was the demo, which seemed to contain not only the behavior I originally wanted but also the ability to custom make my buttons, which actually is something I wanted even more. Is there a way to repair the download link? Thanks so much.
              • 4. Re: using radio button to go to marker
                Level 7
                Do you have a URL for the site you're trying to access...?
                • 5. Re: using radio button to go to marker
                  morningstar Level 1
                  Hi,
                  The website I'm trying to access is the one that was mentioned in the first reply to my problem from chunick -- www.chunick.com/director.htm. Actually the demo on this site gave me ideas of how to create my own custom buttons, which do the behavior I want. However, I was thinking that the code he created might be simpler and easier to implement than what I created myself. But in the meantime, creating my own radio buttons actually solves the problem. However, if there is a way to repair that link, i would still like to see the code that used to create the demo. Thanks again.
                  • 6. Re: using radio button to go to marker
                    Level 7
                    > The website I'm trying to access is the one that was mentioned in the first
                    > reply to my problem

                    That didn't come through to my news reader. Apologies for the noise...