Request: Variable-based nested movieClip control

A place for tutorials on how to get the most out of Flash

Request: Variable-based nested movieClip control

Postby TedFallenger » Tue May 29, 2012 4:49 am

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.
User avatar
TedFallenger
 
Joined: Wed Aug 03, 2011 2:39 pm

Re: Request: Variable-based nested movieClip control

Postby BlueLight » Tue May 29, 2012 5:15 am

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!
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Request: Variable-based nested movieClip control

Postby TedFallenger » Tue May 29, 2012 7:50 am

Thanks, Blue, but I've seen that thread and, as I mentioned, I'm doing this in AS2.
User avatar
TedFallenger
 
Joined: Wed Aug 03, 2011 2:39 pm

Re: Request: Variable-based nested movieClip control

Postby BlueLight » Tue May 29, 2012 8:17 am

I thought bob used as2
User avatar
BlueLight
Gangs n' Whores Developer
 
Joined: Sat Jun 04, 2011 8:23 am

Re: Request: Variable-based nested movieClip control

Postby OwnerOfSuccuby » Tue May 29, 2012 11:03 am

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:
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm

Re: Request: Variable-based nested movieClip control

Postby TedFallenger » Tue May 29, 2012 6:18 pm

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.
User avatar
TedFallenger
 
Joined: Wed Aug 03, 2011 2:39 pm

Re: Request: Variable-based nested movieClip control

Postby OwnerOfSuccuby » Tue May 29, 2012 7:15 pm

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.
OwnerOfSuccuby
 
Joined: Fri Jun 11, 2010 9:33 pm


Return to Tutorials



Who is online

Users browsing this forum: No registered users