This content has been marked as final. Show 3 replies
What you have done should work. Be sure that you are correctly targeting the clip that you want to change. If the code remains in the same place and you now want to change a clip that is inside another clip, be sure that your path to that inner clip is correct.
Seems I was targeting the movieclip incorrectly.. for anyone that is interested the code for the movieclip fill inside a movieclip was meant to be:
color = new Color(movieclip1.movieclip2);
Where movieclip2 is the movieclip we are changing the color of, and movieclip1 is the parent movieclip, which movieclip2 is inside of.
A follow up question...
Is there a way to target the original movieclip, and not just an instance of the movieclip. ie, I want to set the color of every instance of a movieclip called 'movie' - can i target the movieclip itself, or must I target each of the instances of that movie clip independently?
Cheers for all the help, great forum!
you can only target and make changes to a MC that is currently available on the timeline. But if all of the instances are named 'movie' then targeting that instance name should make the change to all. However, if they are appended with a number (like above) you will need to add that to the names string, you could then use a loop to target them. I would also consider placing the color change code within a method that you can call on each MC when needed, you could also construct this as a prototype. all together it would look something like this: