A Flash Developer Resource Site

Results 1 to 2 of 2

Thread: using AS to change the colour of a graphic/MC (in Flash 5)

  1. #1
    if you go first
    Join Date
    Oct 2005
    Location
    Herts, UK
    Posts
    62

    using AS to change the colour of a graphic/MC (in Flash 5)

    Hi everyone!

    Can this be done - or is there some way around it?

    If you have a look my site for my Jiu Jitsu club:
    http://www.pc16.net/chris/city/?swf=cityjj
    and go to "Events", you'll see my timeline-calendar. On it are dots which appear depending on variables obtained from an external text file. I'd like to change their colours depending on these variables. Ie to indicate what kind of event it represents.

    Can anyone help?

    Thanks in advance!
    Chris

    ps - I have an idea of another way I can do this, but I run into problems with it. At the moment, the dots are already in the timeline-calendar's scene. I tried attaching them and naming them with a variable, i, but this didn't work - I had something like:

    Code:
    on(rollOver) {
       // Create dots and position them
       for(i=0; i<numberOfDates; i++) {
          attachMovie("dot", i, "_root.stuff");
          setProperty (i, _y, 0);
          setProperty (i, _x, xtimedot[ i ]);
       }
    }
    I reckon I could attach movies like dotGreen, dotYellow etc.

    but it looks like only ONE movie was attached - the one according to the last value of i.

    Any ideas?

    Thanks again!

  2. #2
    FlashCLUE.com Wizzz's Avatar
    Join Date
    Nov 2005
    Location
    Warsaw Poland
    Posts
    451
    code:
    new Color( your_mc ).setRGB( desired_color );


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