I am trying to automatically change the colour of an MC when it comes into play and am having a few problem. I used the code I found in the Flash AS Help, but it’s not working.
Here’s what I used:
myColor = new Color(rollover);
myColor = setRGB(0x993366);
Rollover is the instance of the MC I want to target.
Thanks again lost … it didn’t work though … should i put in on the mc action or main timeline … i’m not sure if its not working because its inside an MC that acts as a button …
here’s the deal … the target is within a mc acting as a button … the target is on the _over state …
you’ve seen the nav … its the rollouts … each color should be diffent … rather than creating 3 graphics or tinting … i thought i’d be able to just change the color through AS
I created a square… converted that to a movie clip.
Inside the square movie clip I created a circle (next to the square) and made that a movie clip with the instance name “circle” (no quotes).
I then went back to the _root timeline and added these actions to my square movie clip…
onClipEvent (load) {
circleColor = new Color(this.circle);
}
on (rollOver) {
circleColor.setRGB(0xE6E6E6);
}
on (rollOut) {
circleColor.setRGB(0x999999);
}
Works great (except that since the circle is also part of the movie clip when you mouseover the circle it does the same thing, but I don’t know your exact situation so I am not going to bother with fixing it).
No fair … doesn’t work for me … I think it’s because I have it set up a little differently that you …
Here’s my setup …
MC1 - on main timeline acting as button
Within MC1 on _over state, MC2 (animated) …
MC2 is what I’m trying to target … but the gods won’t let me …
Why, oh why, do they have to rain on my parade? L
Thanks for the help though. I could do with you with Flash as one of those helpers … you know … the kind that pop up in Microsoft Office and ask ‘can i help?’ … L
LOL … nah … you’re the wacko scientist … or maybe the cute dog … L … and hey … paper clips are handy you know …
Okay, give me a sec … I’ll strip the .fla down a little and send it along … although last time I tried to attach a .swf it wouldn’t let me … so god knows what it will do with my crazy .fla …
give me 10 mins … i need to switch burn it and transfer to this computer …
*Originally posted by lostinbeta *
**I don’t see your setRGB code, are you trying to change the RGB code on the object in your layer labeled “background”??? **
oops … that one won’t have it … that’s an older version … the new one is on my laptop … yes … it’s the background layer … its an animated mc