Results 1 to 4 of 4

Thread: changing object color with xml

  1. #1
    Join Date
    May 2007
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Smile changing object color with xml

    hi guys.
    i am kinda new to flash and never used xml actually
    the problem is that I promised mine GF that I'll help her with her schoolproject. they are going to have a map with cetain areas, that should have on of tree colors depending on what the XML file says about them:

    what I need to do is:
    I will have like 10 square objects in my flash movie each with its own unique instance name. somewhere in the movie there will be defined 3 variables
    each representing a color, for example:
    Code:
    1 = #000
    2 = #FFF
    3 = #EEE
    and in the XML file there will be the list of the object names and to each of them will be a value that i can change from 1 to 3 and the color of the objects will change in the flas movie.

    could please anyone show me how to do this, as I see it it should be done fast, but I was not able to make it work. I tried googling but nothing that would help my case came up. Thank you very much in advance !

  2. #2
    Join Date
    May 2007
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Cool

    hmm no response
    looking back maybe what I wrote looks complicated.

    to put it simple all I need to know is: "how can I set the color of an flashobject through a XML file ?

    for example you draw a shape in flash, how can I make the color red with xml ? please anyone ?

  3. #3
    Join Date
    Aug 2007
    Location
    Harrisburg, PA
    Posts
    131
    Thanks
    6
    Thanked 9 Times in 9 Posts

    Default

    Have you looked into the colorTransform class? I've never actually used it myself for any real example other then playing around, but it should help you with what your trying to do.

  4. The Following User Says Thank You to punstc For This Useful Post:

    da_mascus (07-20-2009)

  5. #4
    Join Date
    May 2007
    Posts
    14
    Thanks
    1
    Thanked 0 Times in 0 Posts

    Default

    well no I didnt. xml isn't familiar to me. would you have any example ? thanks

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •