Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //frame 1, var's
- var _loc3 = classes.GlobalData.getSelectedCarXML();
- var acid = _loc3.attributes.i;
- var aeid = _loc3.attributes.ae;
- //Frame 2/Class function
- function uninstallPartCB(t, c)
- {
- classes.Frame.serverLights(false);
- var _loc6 = new XML();
- _loc6.ignoreWhite = true;
- _loc6.parseXML(c);
- var _loc4 = _loc6.firstChild;
- switch (Number(_loc4.attributes.s))
- {
- case 1:
- {
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("installplus");
- _root.abc.contentMC.txtTitle = "Part is Uninstalled";
- _root.abc.contentMC.txtMsg = "The part is successfully uninstalled from your car.";
- _root.abc.removeButtons();
- _root.abc.addButton("OK");
- _global.shopPartsMC.uninstallCartPart();
- break;
- }
- case 0:
- {
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("install");
- _root.abc.contentMC.txtTitle = "Part is Already Uninstalled";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this part is already uninstalled from your car.";
- _root.abc.removeButtons();
- _root.abc.addButton("Cancel");
- _global.shopPartsMC.clearCart();
- break;
- }
- case -1:
- {
- var _loc5 = "Error, dependent parts:";
- for (var _loc3 = 0; _loc3 < _loc4.childNodes.length; ++_loc3)
- {
- _loc5 = _loc5 + ("\n" + _loc4.childNodes[_loc3].firstChild.nodeValue);
- } // end of for
- _root.abc.contentMC.gotoAndStop("response");
- _root.abc.contentMC.alertIconMC.gotoAndStop("install");
- _root.abc.contentMC.txtTitle = "Part is Required";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this part was required by these parts:" + _loc5;
- _root.abc.removeButtons();
- _root.abc.addButton("Cancel");
- _global.shopPartsMC.clearCart();
- break;
- }
- case -2:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the part for is impounded.");
- break;
- }
- case -3:
- {
- _root.abc.contentMC.txtTitle = "Part is Required";
- _root.abc.contentMC.txtMsg = "I\'m sorry, but this part can\'t be uninstalled.";
- _root.abc.removeButtons();
- _root.abc.addButton("Cancel");
- _global.shopPartsMC.clearCart();
- break;
- }
- case -4:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the part for is locked.");
- break;
- }
- case -5:
- {
- _root.displayAlert("warning", "Car not Available", "I\'m sorry, but the car you selected to buy the part for is not yours.");
- break;
- }
- case -6:
- {
- _root.markTestDriveExpiredAndDisplayWarning();
- break;
- }
- case -50:
- {
- _root.abc.contentMC.txtTitle = "Account Locked"; //
- _root.abc.contentMC.txtMsg = "Sorry, you left a race that is still in progress. Your account is temporarily locked until the race is finished. This may take moment.";
- _root.abc.removeButtons();
- _root.abc.addButton("Cancel");
- _global.shopPartsMC.clearCart();
- break;
- }
- case -99:
- {
- _root.abc.contentMC.txtTitle = "Car Not Owned"; //Title of the warning screen
- _root.abc.contentMC.txtMsg = "Sorry, you do not own this car, therefore, you can not install the selected part to the selected car." //Message in the warning screen
- _root.abc.removeButtons(); //Removes any old buttons
- _root.abc.addButton("OK"); //OK Button to close out of the warning.
- break;
- }
- } // End of switch
- } // End of the function
- //Eplanation as to why this would work
- For uninstalling parts to be successful, it needs to go to Case 1 of the function. If you write a case with a warning instead of the server info for installing, its not going to install.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement