Flash crashes when I run code more than once


hi guys, have problem piece of code functions when first run when run second time flash becomes unresponsive , crashes. have tried swf in flash player code runs fine first few times 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" has eventlistnener functions create loop of text boxs. problem?

i don't see in code show looks cause problem.  things slowing down result of loop running , creating new objects have processed continuously.



More discussions in ActionScript 3


adobe

Comments

Popular posts from this blog

How to change text Component easybook reloaded *newbee* - Joomla! Forum - community, help and support

After Effect warning: A problem occurred when processing OpenGL commands

Preconditions Failed. - Joomla! Forum - community, help and support