2 Replies Latest reply on Aug 8, 2012 6:09 AM by TwistedPixel23

    Flash crashes when I run code more than once


      Hi guys, I have a problem with a piece of code which functions properly when first run it but when I run it the second time flash becomes unresponsive and crashes. I have tried the swf in flash player the code runs fine first few times but gets extremely slow thereafter.



      //======================BASE PRICE========================================

      var baseprice:Number;

      baseprice = 20;

      priceOutput.text = String(baseprice)

      //=========================BASE PRICE END=====================================

      var updatedPrice:Number

      var updatedPrice02:Number


      namesAndSize.addEventListener(MouseEvent.MOUSE_UP, captureQuantityPrice)



      function captureQuantityPrice(e:MouseEvent):void{



                updatedPrice = Number(priceOutput.text)





      quantityMenu.updateForm.addEventListener(MouseEvent.MOUSE_UP, quantityMultiply)



      function quantityMultiply(e:MouseEvent):void{


      updatedPrice02 =  updatedPrice * Number(quantityMenu.XXXSinput.text)





      priceOutput.text = updatedPrice02.toString();





      the button "updateForm" also has another eventlistnener which functions is to create a loop of text boxs. Could this be the problem?