Page 1 of 1

Request: Variable-based nested movieClip control

PostPosted: Tue May 29, 2012 4:49 am
by TedFallenger
I'm trying to come up with a bit of script that will allow me to control the skin color of a character from the root using a variable, allowing that variable to be accessed for use on other characters.

Skin color choice is being dictated by a movie clip with several frames, each a different color, which is being used as an overlay on the body parts of the characters.

I'm new to Actionscript though I've been using Flash for quite some time. I'm using AS2 as I believe it is simpler for non-code-adept people like myself to understand.

Re: Request: Variable-based nested movieClip control

PostPosted: Tue May 29, 2012 5:15 am
by BlueLight
viewtopic.php?f=29&t=2286 this i believe has a solution but i'm not sure if it's the one you want.

Also RAWR, me da AS3 Nazi!

Re: Request: Variable-based nested movieClip control

PostPosted: Tue May 29, 2012 7:50 am
by TedFallenger
Thanks, Blue, but I've seen that thread and, as I mentioned, I'm doing this in AS2.

Re: Request: Variable-based nested movieClip control

PostPosted: Tue May 29, 2012 8:17 am
by BlueLight
I thought bob used as2

Re: Request: Variable-based nested movieClip control

PostPosted: Tue May 29, 2012 11:03 am
by OwnerOfSuccuby
TedFallenger Wrote:I'm trying to come up with a bit of script that will allow me to control the skin color of a character from the root using a variable, allowing that variable to be accessed for use on other characters.

Skin color choice is being dictated by a movie clip with several frames, each a different color, which is being used as an overlay on the body parts of the characters.

I'm new to Actionscript though I've been using Flash for quite some time. I'm using AS2 as I believe it is simpler for non-code-adept people like myself to understand.



Hi !

First read this one: http://www.kirupa.com/developer/actionscript/color.htm
Then:
AS3 version: viewtopic.php?f=29&t=2286
AS2 + AS3 version: viewtopic.php?f=29&t=2052

Idea is simple:

1)Get color - you can get it by kode like ColorPiker in AS3 - it is the same in AS2. Then you hav to put it in some variable for exampe A=ThatColor.
2)Then put it into ypur objects color. It is very good examples i think you will understand it.

If some problems - wright i ll try to help or make a little example. I have some time today so i will be on forum i think :mrgreen:

Sorry for my bad english again :lol: :mrgreen:

Re: Request: Variable-based nested movieClip control

PostPosted: Tue May 29, 2012 6:18 pm
by TedFallenger
See the trick is that I want to avoid using a huge number of colors and if possible get the variable down to a small number. One thing I want to do with this color is to use it to determine the skin color of the character's family members. The twist is that their skin colors won't be quite the same.

In short I want to avoid using a color picker and instead use some kind of nested gotoAndStop function.

Re: Request: Variable-based nested movieClip control

PostPosted: Tue May 29, 2012 7:15 pm
by OwnerOfSuccuby
Some thing like that one ? Put a mask on your object and change its color for example. Code of each color you can saw in ColorPiker it wrights it like:

So you can put only that colors you need by buttons - or hide them in your vars in some where you need.