Advertisement
Guest User

Untitled

a guest
Oct 11th, 2011
805
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. public static function questUpdateText() {
  2.            
  3.             //add first girls name... if the girl is moved better make everyone know!
  4.             questPopUpMaker.popItems[topSpot + 1].htmlText = holder[questPopUpMakeGirl.spot].girlName;
  5.             trace("qi.charPopUpArray array length: " +  qi.charPopUpArray.length + " " + qi.charPopUpArray)  //qi.charPopUpArray array length: 0
  6.  
  7. //if we are out of girls better reset the name.
  8.             if(qi.charPopUpArray.length = holder.length) {
  9.                 questPopUpMaker.popItems[topSpot + 1].htmlText = "No Girl";
  10.             }
  11. }
  12.  
  13. //add button pressed
  14. public static function questAddGirlButtonClick(e:MouseEvent) {
  15. if (questPopUpUpdate.holder.length > 0) {
  16.                 trace("qi.charPopUpArray: " + qi.charPopUpArray);  //now has null, 1 actually ( , 1 )
  17.                 qi.charPopUpArray.push(questPopUpMakeGirl.spot);
  18.                 questPopUpMaker.popItems[questPopUpMaker.addRemoveLabel].alpha = 1;
  19.                 questPopUpMaker.popItems[questPopUpMaker.addRemoveLabel].addEventListener(MouseEvent.CLICK, questRemoveGirlButtonClick);
  20.             }  
  21.             if (questPopUpUpdate.holder.length == qi.charPopUpArray.length) {
  22.                 questPopUpMaker.popItems[questPopUpMaker.prevnextLabel].removeEventListener(MouseEvent.CLICK, questPopUpMakeGirl.cycleLeftPopUp);
  23.                 questPopUpMaker.popItems[questPopUpMaker.prevnextLabel + 1].removeEventListener(MouseEvent.CLICK, questPopUpMakeGirl.cycleRightPopUp);
  24.                 questPopUpMaker.popItems[questPopUpMaker.prevnextLabel].alpha = .6;
  25.                 questPopUpMaker.popItems[questPopUpMaker.prevnextLabel + 1].alpha = .6;
  26.                 questPopUpMaker.popItems[questPopUpMaker.addRemoveLabel].removeEventListener(MouseEvent.CLICK, questAddGirlButtonClick);
  27.                 questPopUpMaker.popItems[questPopUpMaker.addRemoveLabel].alpha = .6;
  28.             }
  29.             questPopUpMakeGirl.cycleLeftPopUpMove();
  30.             questPopUpUpdate.updatePopUp();
  31.         }
  32.  
  33.  
  34.  
  35.  
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement