Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import flash.events.Event;
- import com.whirled.AvatarControl;
- if (_ctrl == null) {
- _ctrl = new AvatarControl(this);
- _ctrl.setHotSpot(275, 365, 280);
- _ctrl.setMoveSpeed(110);
- _body = new ConfigXPBody(_ctrl, this, 540);
- _body.registerOption("linkhair1Color", ConfigXPBody.OPTION_COLOR_ALL, 0x936D48);
- _body.registerOption("hatColor", ConfigXPBody.OPTION_COLOR_ALL, 0x15345);
- _body.registerOption("clothingColor", ConfigXPBody.OPTION_COLOR_ALL, 0x15345);
- _body.registerOption("RHandNumber", ConfigXPBody.OPTION_DROPDOWN, 1,
- [ "None", "Mastersword"]);
- // Setting recolorable frames
- // _body.setRecolorFrames(optionName, ...paths)
- // optionName: This is the same name you used when registering options
- // paths: Array representing the instance name path to get to the symbol
- // to be recolored. Add more paths like shown
- _body.setRecolorFrames("clothingColor",
- [ "RBicep","IRBicep","clothing" ],
- [ "Body","clothing" ],
- [ "LBicep","IRBicep","clothing"]);
- _body.setRecolorFrames("linkhair1Color",
- [ "FHair", "linkhair1" ],
- [ "Skull", "linkhair1" ],
- [ "theface", "theface2","linkhair1"]);
- _body.setRecolorFrames("hatColor",
- [ "BHair", "hat"]);
- // Displaying dropdown selections
- // _body.setImageConfigFrames(optionName, ...paths)
- // optionName: This is the same name you used when registering options
- // paths: Array representing the instance name path to get to the symbol
- // to be recolored. Add more paths like shown
- _body.setImageConfigFrames("RHandNumber",
- [ "None", "Mastersword" ]);
- // This line tells configXP we are done setting everything up,
- // without this ConfigXP won't work :O
- _body.completeConfig();
- addEventListener(Event.UNLOAD, handleUnload);
- function handleUnload (... ignored) :void {
- _body.shutdown();
- }
- }
- var _ctrl :AvatarControl;
- var _body :ConfigXPBody;
Add Comment
Please, Sign In to add comment