Guest User

Untitled

a guest
Apr 22nd, 2018
70
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.96 KB | None | 0 0
  1. import flash.events.Event;
  2. import com.whirled.AvatarControl;
  3.  
  4. if (_ctrl == null) {
  5. _ctrl = new AvatarControl(this);
  6. _ctrl.setHotSpot(275, 365, 280);
  7. _ctrl.setMoveSpeed(110);
  8. _body = new ConfigXPBody(_ctrl, this, 540);
  9.  
  10.  
  11. _body.registerOption("linkhair1Color", ConfigXPBody.OPTION_COLOR_ALL, 0x936D48);
  12. _body.registerOption("hatColor", ConfigXPBody.OPTION_COLOR_ALL, 0x15345);
  13. _body.registerOption("clothingColor", ConfigXPBody.OPTION_COLOR_ALL, 0x15345);
  14.  
  15. _body.registerOption("RHandNumber", ConfigXPBody.OPTION_DROPDOWN, 1,
  16. [ "None", "Mastersword"]);
  17.  
  18. // Setting recolorable frames
  19. // _body.setRecolorFrames(optionName, ...paths)
  20. // optionName: This is the same name you used when registering options
  21. // paths: Array representing the instance name path to get to the symbol
  22. // to be recolored. Add more paths like shown
  23.  
  24. _body.setRecolorFrames("clothingColor",
  25. [ "RBicep","IRBicep","clothing" ],
  26. [ "Body","clothing" ],
  27. [ "LBicep","IRBicep","clothing"]);
  28.  
  29. _body.setRecolorFrames("linkhair1Color",
  30. [ "FHair", "linkhair1" ],
  31. [ "Skull", "linkhair1" ],
  32. [ "theface", "theface2","linkhair1"]);
  33.  
  34. _body.setRecolorFrames("hatColor",
  35. [ "BHair", "hat"]);
  36.  
  37.  
  38. // Displaying dropdown selections
  39. // _body.setImageConfigFrames(optionName, ...paths)
  40. // optionName: This is the same name you used when registering options
  41. // paths: Array representing the instance name path to get to the symbol
  42. // to be recolored. Add more paths like shown
  43.  
  44. _body.setImageConfigFrames("RHandNumber",
  45. [ "None", "Mastersword" ]);
  46.  
  47.  
  48. // This line tells configXP we are done setting everything up,
  49. // without this ConfigXP won't work :O
  50. _body.completeConfig();
  51.  
  52. addEventListener(Event.UNLOAD, handleUnload);
  53. function handleUnload (... ignored) :void {
  54. _body.shutdown();
  55. }
  56. }
  57.  
  58. var _ctrl :AvatarControl;
  59. var _body :ConfigXPBody;
Add Comment
Please, Sign In to add comment