8 Replies Latest reply on Apr 12, 2007 12:50 AM by Newsgroup_User

    Help please - I'm ready for the river!

    BilkoJoe
      This is doing my head in!
      Hope someone out there can help.
      I have created a flash (8) menu that I want to use in a Director2004 movie.

      One of the Flash swf buttons has the following script

      on (release) {
      getURL("lingo:Northlink");
      }


      I have imported into The Director as cast member “Menu” and has the following behaviour attached to cover the Mouse Change.

      on MouseEnter me
      Cursor 280
      end
      on MouseLeave me
      Cursor 0
      end


      From what I’ve read I‘ve created a Marker in my movie “UpNorth” which the Flash link goes to :

      on Northlink
      _Movie.go("UpNorth")
      end

      If correct where does this go? Do I attach it to the same cast member? I’ve tried lots f thing but nothing works.

      BYW I tried an external link to a website. It works in a flash player but not in my Director so I’m ding something very wrong!

      Any advice greatly appreciated.
      Thanks in advance
        • 1. Re: Help please - I'm ready for the river!
          Level 7
          > I have created a flash (8) menu that I want to use in a Director2004 movie.

          Did you "install" the 10.1 update with the Flash 8 Asset xtra?
          Does it make a difference if you publish to Flash 7 or earlier?

          > getURL("lingo:Northlink");

          When you use syntax like this you can place the handler you want to call
          pretty much anywhere - on the sprite itself or in a #movie script.
          AFAIK, if you use getURL("event:NorthLink"); you need to place the
          handler in a behavior script attached to the sprite

          > BYW I tried an external link to a website. It works in a flash player but not
          > in my Director so I?m ding something very wrong!

          No, but the getURL() call (which you are presumably using in Flash to
          "link to a website" is being intercepted by Director and if you don't
          implement an 'on getURL' handler the message simple dies). All that
          getURL does is send a message/string to the host application. When Flash
          is hosted in the player/browser they know to either open the browser or
          navigate to the string passed.
          • 2. Re: Help please - I'm ready for the river!
            BilkoJoe Level 1
            Thanks
            Did you "install" the 10.1 update with the Flash 8 Asset xtra?No but doing so now
            Does it make a difference if you publish to Flash 7 or earlier? Will try also

            Is there a generic event handler for on getURL?
            Cheers
            Joe
            • 3. Help please - I'm ready for the river!
              BilkoJoe Level 1
              Thanks Sean
              Did you "install" the 10.1 update with the Flash 8 Asset xtra?No but doing so now
              Does it make a difference if you publish to Flash 7 or earlier? Will try also

              Is there a generic event handler for on getURL?
              Cheers
              Joe
              • 4. Re: Help please - I'm ready for the river!
                BilkoJoe Level 1
                No joy?
                Was running Upgarade.
                tried using Flash 6 and 7
                Still no success.
                Does my code look ok??
                • 5. Re: Help please - I'm ready for the river!
                  Level 7
                  > Is there a generic event handler for on getURL?

                  Not sure that I understand the question, or perhaps you misunderstood my
                  post: if you place a handler named 'on getURL' in a #movie script it
                  /should/ receive any getURL() calls from #flash sprites that aren't
                  trapped at the #sprite or #frameScript level. You will then need to
                  parse parameters the handler receives and react accordingly.

                  I just made quick test to confirm this:
                  1). a "plain" getURL() call that might be intended for the browser or
                  Player (for example: getURL(" http://www.director-online.com") ) can be
                  trapped at either the sprite OR movieScript level by adding a handler
                  named 'on getURL' to a script attached to the sprite or into a #movie script

                  Summary: this message can be trapped at the sprite or movie level by
                  implementing an on getURL handler

                  2). a getURL() call that uses "lingo:" syntax will require a handler
                  with the appropriate name in a #movie script. For example:
                  getURL("lingo:NorthLink"); will send the event #NorthLink to a movie
                  script, so you need a #movie script with
                  on NorthLink
                  -- code here
                  end
                  to respond to it.

                  Summary: you cannot trap this message at the sprite level, only at the
                  movie level, and it's trapped by adding a handler with the same name as
                  is sent after the "lingo:" part of the getURL call

                  3). a getURL call that uses "event:" syntax can be trapped at either the
                  sprite or movie level by implementing a handler with the same name as is
                  used after the "event:" part of the getURL call. For example:
                  getURL("event:NorthLink"); will send the message #NorthLink to the
                  sprite scripts first and then to #movie scripts (if not trapped at the
                  sprite level)

                  Summary: this message can be trapped in either the sprite script or a
                  movie script
                  • 6. Re: Help please - I'm ready for the river!
                    BilkoJoe Level 1
                    Thanks again Sean, think I've nailed the getURL. Is there anyway I can post my dir file with the flash content ahat you could look at for errors. Its just those two scripts and a swf?
                    Cheers
                    Joe
                    • 7. Re: Help please - I'm ready for the river!
                      BilkoJoe Level 1
                      RELAX Sean All sorted! Got this from the site:
                      Note: Make sure that in the script cast member properties, the "Type" is set to"Movie".
                      All working.
                      best
                      Joe
                      • 8. Re: Help please - I'm ready for the river!
                        Level 7
                        BilkoJoe wrote:
                        > I have imported into The Director as cast member ?Menu? and has the
                        > following behaviour attached to cover the Mouse Change.
                        >
                        > on MouseEnter me
                        > Cursor 280
                        > end
                        > on MouseLeave me
                        > Cursor 0
                        > end

                        Better:

                        on beginSprite me
                        sprite(me.spriteNum).cursor=280
                        end beginSprite

                        on endSprite me
                        sprite(me.spriteNum).cursor=0
                        end endSprite

                        It makes it work more reliably and smoothly.

                        Andrew