A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: How to change MovieClip color on rollover.....

  1. #1
    Junior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    15

    Unhappy How to change MovieClip color on rollover.....

    Pretty simple stuff, but for some reason its not working for me..

    On layer 2 I have my movie clips loc1, loc2, loc3....etc... inside a movie clip (Inner Main) , and on layer 1 I have a movie clip (click).

    Code:-

    for (i in mc) {
    if (typeof (mc[i]) == "movieclip" && i != "click") {
    myBtn = mc[i];
    myBtn._alpha = 0;
    myBtn.onRollOver = function() {
    myBtn._alpha=100;
    var colorful = new Color("this");
    colorful.setRGB(0x003366);

    };
    myBtn.onRollOut = function() {
    myBtn._alpha=0;
    };
    myBtn.onPress = function() {

    };
    };

  2. #2
    Flashmatics silentweed's Avatar
    Join Date
    Mar 2005
    Location
    London, UK
    Posts
    4,875
    lost the quotation marks around this
    Flashmatics | Flashmatics Library (free downloads)
    -----------------------------------------------------
    Latest Projects:
    The Dead Room | Are You Smarter | Prison Break (Frame A Friend) | Beck's Fusions | The 24 Experience

    -----------------------------------------------------
    Flash Certified Developer

  3. #3
    Junior Member
    Join Date
    Sep 2009
    Location
    Canada
    Posts
    15
    ahh...well it is the 'myBtn' movie clip

    i can even write it as:-

    var colorful = new Color("myBtn");
    colorful.setRGB(0x003366);

Tags for this Thread

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