4 Replies Latest reply on Jan 13, 2007 5:05 AM by Darshan Rane

    Action Script Color Changes

    FlashIsTheCoolest123
      Hi there.

      I have some code that I created off the top of my head to change the color of one of my Pac Man characters to blue after a dot is absorbed, I'm more than sure it's not right, so can someone give me a few pointers on what to do? Thanks

      _root.Blinky.color = "0xCC5124";

      (That color's not blue anyway)...

      THANKS!
        • 1. Re: Action Script Color Changes
          Level 7
          FlashIsTheCoolest123,

          > I have some code that I created off the top of my
          > head to change the color of one of my Pac Man
          > characters

          Ooooh! The ActionScript 2.0 Language Reference is only a click away!
          Leave the top of your head for more important matters! :)

          > I'm more than sure it's not right, so can someone
          > give me a few pointers on what to do? Thanks
          >
          > _root.Blinky.color = "0xCC5124";

          Badda bing -- that's ... well, like you said, not right. Assuming
          Blinky is a movie clip symbol, that would make it an instance of the
          MovieClip class. If you look up the "MovieClip class" entry in the
          ActionScript 2.0 Language Reference, you'll find taht movie clips have no
          such property as color. Definitely not a bad guess, but the great part is,
          you don't *have* to guess when it comes to ActionScript. Consider the
          object you're dealing with (movie clip), look up its class, then check out
          that class's properties (characteristics of the object), methods (things it
          can do), or events (things it can react to). If that leads you nowhere,
          re-think the concept. You're dealing with color, so is there a Color class?
          Aha ... there is! Check out the sample code in there and see if what you
          get.

          Write back if you have specific questions.


          David Stiller
          Adobe Community Expert
          Dev blog, http://www.quip.net/blog/
          "Luck is the residue of good design."


          • 2. Re: Action Script Color Changes
            Darshan Rane Level 3
            with movieclip symbol there is tint property which you might use
            • 3. Re: Action Script Color Changes
              Darshan Rane Level 3
              with movieclip symbol there is tint property which you might use
              • 4. Re: Action Script Color Changes
                Darshan Rane Level 3
                with movieclip symbol there is tint property which you might use