6 Replies Latest reply on May 18, 2009 10:01 AM by jcsp2001

    Open MIAW from text member

    jcsp2001 Level 1

      I have a scrollabe text member, and I want one specific word in that text that opens, when clicked, a MIAW  or a specific image. Can this be done?

        • 1. Re: Open MIAW from text member
          robdillon Most Valuable Participant

          Sure, you can set that one word to be a hyperlink. Then you can use an on hyperlinkClicked function. In that function you can open the new miaw.

          • 2. Re: Open MIAW from text member
            jcsp2001 Level 1

            Thanx for your answer, but i don't understand how to do it. Can you please explain more?

            • 3. Re: Open MIAW from text member
              Sean_Wilson Adobe Community Professional

              Can you explain what you do know how to do and what you need help with? Do you know how to create a hyperlink in a text member? Do you know how to open a MIAW? Do you know how to implement an 'on hyperlinkClicked' handler (or have you at least read the help documentation entry for it)?

               

              If you want help with something specific, then ask a specific question.

              • 4. Re: Open MIAW from text member
                jcsp2001 Level 1

                Ok... You're right.

                 

                I created a behavior with this content

                 

                on hyperlinkClicked me, data, range
                     window().new ("miaw")
                  window("miaw").open()
                  window("miaw").titlebarOptions.visible = true
                end

                 

                 

                 

                and attached it to the text cast member. This worked, but only after i put any text in the hyperlink data field in the text inspector.

                 

                i dont understand what the hyperlink data field is for in this cases, and i dont know how to make it work if i have more than one independently  highlighted words that open different MIAWs

                • 5. Re: Open MIAW from text member
                  Sean_Wilson Adobe Community Professional

                  i dont understand what the hyperlink data field is for in this cases, and i dont know how to make it work if i have more than one independently  highlighted words that open different MIAWs

                  Your simplest option might be to place something in the hyperlink data field that, when sent to the #hyperlinkClicked handler, will tell you which MIAW to open. For example, if one of your hyperlinks had the associated data of "one" and another had "two", your hyperlinkClicked handler might respond like so:

                  on hyperlinkClicked me, data, range
                    case "data" of
                        
                      "one":
                        w = window().new ("miaw_one")
                        w.filename = "@/miaw_one"
                        w.titlebarOptions.visible = true
                        w.open()
                        
                      "two":
                        w = window().new ("miaw_two")
                        w.filename = "@/miaw_two"
                        w.titlebarOptions.visible = true
                        w.open()
                        
                    end case
                  end
                  • 6. Re: Open MIAW from text member
                    jcsp2001 Level 1

                    Thank you very much Sean!!  At first it didnt work, but i changed

                    on hyperlinkClicked me, data, range
                      case "data" of

                    for

                    on hyperlinkClicked me, data, range
                      case (data) of

                    and it worked great. Thax again!!

                     

                    Jc