please help, error 1065: tcmtext not defined
i know question has been asked many time error still occurs.
i'm not using tlf text fields..all classic.
here's code:
import fl.controls.radiobuttongroup;
import flash.events.mouseevent;
import fl.controls.radiobutton;
var radiomember:radiobuttongroup = new radiobuttongroup ("maths function");
male.group = radiomember;
female.group = radiomember;
btn_calculate1.addeventlistener(mouseevent.click,bmr_calculator);
function bmr_calculator(event:mouseevent):void
{
if(radiomember.selection == null)
{
display1.text ="select gender";
return;
}
if (age1.text == "")
{
display1.text ="enter numeric value in text box";
return;
}
if (weight1.text == "")
{
display1.text ="enter numeric value in text box";
return;
}
if (height1.text == "")
{
display1.text ="enter numeric value in text box";
return;
}
/*if (radiomember.selection == "male")
{
var adds = (10 * (weight1.text)) + (6.25*(height1.text)) - (5*(age1.text)) + 5;
result1.text = string(adds);
display1.text ="";
}
if (radiomember.selection == "female")
{
var adds:number = number (weight1.text) + (height1.text) - (age1.text);
result1.text = string(adds);
display1.text ="";
}*/
}
notice last part of code commented. when run code, works well...but when remove comment , run it, output becomes glitchy , error , referenceerror: error #1065: variable tcmtext not defined. comes out.
make sure have radio button moved library other components might using.
More discussions in ActionScript 3
adobe
Comments
Post a Comment