2 Replies Latest reply on Jul 21, 2006 10:21 PM by Newsgroup_User

    tellTarget how does it work?

    Level 7
      Hello:
      I'm looing in the Director help form Telltarget to control flash movie in
      the example
      -- Lingo syntax
      sprite(1).tellTarget("\myMovieClip")

      I don't understand "\myMovieClip" . I write the name of my flash movie in
      the cast and an error happens, so I can't communicate wih my flash movie.
      Can you help me?

      Thans


        • 1. Re: tellTarget how does it work?
          Chunick Level 3
          \myMovieClip would be the name of your movieClip in the Flash sprite. So, let's say you imported a flash .swf file into your cast and then dragged that member onto the stage, finally, in some code you wanted to control the flash sprite... but what you really wanted to control was the movieClip in the sprite... you could use the tellTarget() command to communicate with the movieClip in the Flash sprite directly. Let's say my movieClip was called mc_ManWalkCycle, it's in the root timeline, and my flash sprite has a behavior attached to it, it might look something like this:

          property pState

          on beginSprite me
          pState = 0
          sprite(me.spriteNum).tellTarget(\mc_ManWalkCycle)
          end

          -- starts and stops the flash movieClip's walk animation cycle
          on mouseUp me
          pState = not pState
          if pState then
          sprite(me.spriteNum).play()
          else
          sprite(me.spriteNum).stop()
          end if
          end

          on endSprite me
          sprite(me.spriteNum).endTellTarget()
          end

          ** Important Note: I've never used this particular command so I really don't know if it will work as described in the help docs (knowing how error prone they are), so take what I've explained with a grain of salk, but I hope it helps, at any rate.
          • 2. Re: tellTarget how does it work?
            Level 7
            Thank you very much.

            I have a little animation of a roll dice in swf format that a designer made
            me long time ago, and I don't have the original Flash file. Is there any
            command lingo that tell me the name of the movieclip?
            Thanks again.

            "Chunick" <webforumsuser@macromedia.com> escribi� en el mensaje
            news:e9nrgk$st1$1@forums.macromedia.com...
            > \myMovieClip would be the name of your movieClip in the Flash sprite. So,
            > let's
            > say you imported a flash .swf file into your cast and then dragged that
            > member
            > onto the stage, finally, in some code you wanted to control the flash
            > sprite...
            > but what you really wanted to control was the movieClip in the sprite...
            > you
            > could use the tellTarget() command to communicate with the movieClip in
            > the
            > Flash sprite directly. Let's say my movieClip was called mc_ManWalkCycle,
            > it's
            > in the root timeline, and my flash sprite has a behavior attached to it,
            > it
            > might look something like this:
            >
            > property pState
            >
            > on beginSprite me
            > pState = 0
            > sprite(me.spriteNum).tellTarget(\mc_ManWalkCycle)
            > end
            >
            > -- starts and stops the flash movieClip's walk animation cycle
            > on mouseUp me
            > pState = not pState
            > if pState then
            > sprite(me.spriteNum).play()
            > else
            > sprite(me.spriteNum).stop()
            > end if
            > end
            >
            > on endSprite me
            > sprite(me.spriteNum).endTellTarget()
            > end
            >
            > ** Important Note: I've never used this particular command so I really
            > don't
            > know if it will work as described in the help docs (knowing how error
            > prone
            > they are), so take what I've explained with a grain of salk, but I hope it
            > helps, at any rate.
            >