Copy link to clipboard
Copied
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.
[AS]
//======================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();
}
[/AS]
the button "updateForm" also has another eventlistnener which functions is to create a loop of text boxs. Could this be the problem?
Copy link to clipboard
Copied
I don't see anything in the code you show that looks like a cause for the problem. Usually things slowing down is the result of a loop constantly running and creating new objects that have to be processed continuously.
Copy link to clipboard
Copied
Yea it ran fine before i put in that code, but i have added in more code and now its working fine again....very unusual, maybe another bug with flash.