Skip to main content
SuperGibaLogan
Known Participant
Jan 21, 2024 3:26 AM UTC
Question

(smartfoxserver pro, as2, flash 8) how do i make a choose color system in avatarChat.fla?

hi, i want to add a choose color system so that the player can change it's avatars color (and when the player doesent want to choose the color, it will still select a random color.)

 

so, how do i do it? i want to make the choose color system in the "connect" frame, right here:

This topic is closed to new replies. Start a new post to keep the conversation going.

3 replies

kglad
Community Expert
Community Expert
Jan 21, 2024 3:35 AM UTC

are you trying to use as2 to do this?

Translate
SuperGibaLogan
Known Participant
Jan 21, 2024 7:58 AM UTC

yes

Translate
SGL
kglad
Community Expert
Community Expert
Jan 21, 2024 3:20 PM UTC

you can use colorF to change an object's color (r,g,b from 0 to 255).

 

import flash.geom.ColorTransform;
import flash.geom.Transform;

 

 

function colorF(mc,r,g,b){
var colorTrans:ColorTransform = new ColorTransform();
var trans:Transform = new Transform(mc);
colorTrans.blueMultiplier = 0;
colorTrans.greenMultiplier = 0;
colorTrans.redMultiplier = 0;
colorTrans.redOffset = r;
colorTrans.greenOffset = g;
colorTrans.blueOffset = b
trans.colorTransform = colorTrans;
}

Translate