• Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
Exit
0

Flash crashes when I run code more than once

Guest
Aug 08, 2012 Aug 08, 2012

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?

TOPICS
ActionScript

Views

493

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Aug 08, 2012 Aug 08, 2012

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Aug 08, 2012 Aug 08, 2012

Copy link to clipboard

Copied

LATEST

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.

Votes

Translate

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines