A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Movie Clip BgColor in XML

  1. #1
    Junior Member
    Join Date
    Mar 2009
    Posts
    1

    Movie Clip BgColor in XML

    I am attempting to try and change the background colour of a Movie clip through XML but I'm not sure how to do it, or even if it possible.

    I've tried playing with css and seeing if I can achieve it that way but I cant seem to get that to work either.

    I have text loading dynamically through XML no problem, I just cant work out how to do the same with the background colour.

    I want to be able to change it via an external file, whether that be XML, text file or CSS - I dont mind.

    If anyone has any advice it would be greatly appreciated.

    Thank you.

  2. #2
    I know nothing.
    Join Date
    Feb 2008
    Posts
    315
    You chould be able to do it thoru CSS - Can you post your FLA?

  3. #3
    FK'n_dog a_modified_dog's Avatar
    Join Date
    Apr 2003
    Location
    "aaarf"
    Posts
    9,176
    an example using AS2 and xml -
    PHP Code:
    // on stage - movieclip - instance name - clip

    _xml = new XML();
    _xml.ignoreWhite = true;
    _xml.load("col.xml");

    _xml.onLoad = function(){
    newCol = parseInt(this.firstChild.childNodes[0].firstChild);
    col = new Color(clip);
    col.setRGB(newCol);
    };

    /* - col.xml -

    <?xml version="1.0"?>
    <root>
    <node>0xFF0000</node>
    </root>

    */
    hth

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center