12 Replies Latest reply on Jun 1, 2012 8:06 AM by ribarra1

    The hyperlink affects the channel where it is

    ribarra1

      Hello, after searching a solution to my problem in the forum and did not locate send you this question:

       

      I'm creating a project where I use hyperlinks. When the cursor passes through the hyperlink shown in hand and everything goes smooth. This underlines a text hyperlink that is displayed in a list. The list is located in a member of the stage that is located in a particular channel, specifically in the 22.

      The hyperlink allows only the text to perform an action , in particular, find information and navigate to a tag within the Score.

      This label shows without problems a series of sprites except for the sprite is located on the same channel where is the member with the hyperlink, 22.

      The effect is that whatever you put, when I stand on this last sprite, it shows the hand, the same type of cursor that I have activated the hyperlink.

      I tried forcing other cursor when I'm put in that sprite but no use. I have also used the "useHipertext = false" to disable the hyperlink but the fact is I need to use it because I do not know how to perform otherwise the action when positioned on the hyperlink text.

       

        Any ideas?

      Thank you very much

        • 1. Re: The hyperlink affects the channel where it is
          nairkat Level 1

          Havent tried that feature myself but let me ask you some questions:

          ribarra1 wrote:

           

          The list is located in a member of the stage that is located in a particular channel, specifically in the 22.

          The member should be in a cast right? But I think I see what you mean.

          ribarra1 wrote:

           

           

          The hyperlink allows only the text to perform an action , in particular, find information and navigate to a tag within the Score.

          Isnt that 2 actions?

          ribarra1 wrote:

          This label shows without problems a series of sprites except for the sprite is located on the same channel where is the member with the hyperlink, 22.

          how can 2 things be in the same channel? I guess I misunderstood you. Well, you could try sprite(22).cursor= -1 upon reaching the tag to set the cursor to a typical white arrow when the mouse rolls over sprite 22. Anyhow, there must be a better solution.

           

          If you say you have tried that and didnt work. Check if the channel is a puppet, maybe that's the problem. Well, you can post the code here as well.

          • 2. Re: The hyperlink affects the channel where it is
            josh_chunick Level 1

            It's hard to follow what you are saying, but maybe you can move the sprite located on the same channel where the member with the hyperlink is, (sprite 22) to another sprite channel.

            • 3. Re: The hyperlink affects the channel where it is
              ribarra1 Level 1

              Sorry for not responding sooner.

              I created a simple project which reproduce the problem.

              I do not know if it is possible to attach the file, however i will summarize it best:

              There are 5 members:

              Three Behavior, one Paint and one Vector Shape.

              In the script channel I have a frame script called 'start' with the following code:

               

              exitFrame on me

                 html = ""

                 html = "<HTML> <BODY> <TABLE border=1> <TR>"

                 put "<A HREF='"&1&"'>" & 1 & "</ A>" after html

                 put "</ TR>" after html

                 put "</ TABLE> </ BODY> </ HTML>" after html

                 member ("number"). html = html

              end

               

              On channel 1, from frame 1 to 10, I have a sprite of the member which displays the text of the hyperlink.

              In this sprite I assign the behavior "hyperlink" that has the following code:

               

              hyperlinkClicked on me

                 go to frame "tag"

              end

               

              In the same channel but in a frame 15 I have the label "tag", where

              a Vector Shape.

               

              When I put on the hyperlink text a hand appears. When we remove the cursor from the text arrow appears.

              This works perfectly.

               

              When I click on the hyperlink will go to the label tag that will show an Array Shape. This is done correctly.  However, and while I'm on this vector, the hand appears.

               

              I tried moving the hyperlink to other channels (in the example of a few days ago ) and always affects the sprites that are in those channels. I have also put the cursor -1 but it has no effect.

               

              I hope I have explained more clearly.

              Thank you very much

              • 4. Re: The hyperlink affects the channel where it is
                nairkat Level 1

                When the movie reaches frame 15 do you have a frame script there? If the movie stops maybe the hand cursor could persist until you rewind it.

                • 5. Re: The hyperlink affects the channel where it is
                  josh_chunick Level 1

                  Again, why don't you assign a channel to the text with the hyperlink that doesn't get used by any other sprites on any other frame?... in other words, why do you have to have the text sprite and vectorshape sprite be in the same channel?... just leave the channel empty except for the text sprite.

                  • 6. Re: The hyperlink affects the channel where it is
                    ribarra1 Level 1

                    In effect, I could put the text with the hyperlink on a unused frame. But I want to do like that because I want to put together all the sprites, in the part higher of de score, or otherwise there would be no place for all of them.

                    • 7. Re: The hyperlink affects the channel where it is
                      ribarra1 Level 1

                      When the movie reaches frame 15 I have a frame script with the following code:

                       

                      on exitFrame me

                          go to the frame

                      end

                      • 8. Re: The hyperlink affects the channel where it is
                        josh_chunick Level 1

                        You can have 1000 channels. All you need is to set it in the Property

                        Inspector under the Movie tab there's an input field labelled 'Channels'.

                        Make sure there are no sprites selected on the stage or you won't see the

                        Movie tab.

                         

                        Josh

                        • 9. Re: The hyperlink affects the channel where it is
                          James Newton, ACP Level 3

                          On the sprite with the hyperlink, add an endSprite handler:

                           

                          on hyperlinkClicked me

                            go to frame "tag"

                          end

                           

                          on endSprite(me)

                            sprite(me.spriteNum).cursor = 0

                          end endSprite

                           

                          Does this solve the issue?

                           

                           

                          Here's a demo:

                           

                          go movie "http://nonlinear.openspark.com/tips/text/Hyperlink.dir"

                          • 10. Re: The hyperlink affects the channel where it is
                            ribarra1 Level 1

                            When I said that there would not be place for all the sprites, I was not referring to the 1000 sprites that could be asked for as you tell me. I prefer to have all the sprites together, if it is posible, and watch them on the top of the score. The less dispersed are the sprites I think it's less mess.

                            Anyway, if it were the only solution, I would have to place the text of the hyperlink as you indicate. My question was if you knew some way to prevent the hand  from appearing after using the hyperlink without having to move the sprite site.

                            • 11. Re: The hyperlink affects the channel where it is
                              josh_chunick Level 1

                              good luck with your project. Hopefully OpenSpark's solution works for you.

                              • 12. Re: The hyperlink affects the channel where it is
                                ribarra1 Level 1

                                Thank you very much. I tried it and solve my problem.