A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: Change background color on RollOver

  1. #1
    FK's Giant Steve_w_V's Avatar
    Join Date
    Mar 2003
    Location
    San Jose, California
    Posts
    2,113

    Change background color on RollOver

    Having some probs with what I thought was going to be an easy task. I have some buttons given names like bN0, bN1, etc and textfields cN0, cN1, etc. When I roll over the buttons, I'd like to change the text in the textboxes underneath them, kinda like a hyperlink in CSS.

    Some code:
    code:

    doc.onLoad = function(success) {
    if (success) {
    for (i=0; i<doc.firstChild.childNodes.length; i++) {
    _root["cN"+i].text = doc.firstChild.childNodes[i].attributes.name;
    _root["bN"+i].onRelease = function() {
    //I'd like to change it here
    };
    //trace(doc.firstChild.childNodes[i].attributes.name);
    }
    } else {
    trace("XML not loaded");
    }
    };



    Could it be because it's inside the onLoad for the XML? I'm out of ideas.. that and it's 2:30 in the morning...
    The other day, I bought a box of animal crackers. On the side, it said "Do Not Eat if Seal is Broken". I opened the box and sure enough...

  2. #2
    FK's Giant Steve_w_V's Avatar
    Join Date
    Mar 2003
    Location
    San Jose, California
    Posts
    2,113
    bizump
    The other day, I bought a box of animal crackers. On the side, it said "Do Not Eat if Seal is Broken". I opened the box and sure enough...

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