Actionscript 3 如何在Flex中警告整数值?

Actionscript 3 如何在Flex中警告整数值?,actionscript-3,apache-flex,flex3,alert,Actionscript 3,Apache Flex,Flex3,Alert,如何在flex中警告整数值。我有一个叫做total的变量,它是一个整数 如果我尝试使用 var total:int=myTest.length; Alert.show(total); 它抛出了一个错误,说 1067: Implicit coercion of a value of type int to an unrelated type String. show方法只接受字符串值。如何警告此int值 实际上,我想知道存储在total变量中的值 Alert.show(total.toStri

如何在flex中警告整数值。我有一个叫做total的变量,它是一个整数

如果我尝试使用

var total:int=myTest.length;
Alert.show(total);
它抛出了一个错误,说

1067: Implicit coercion of a value of type int to an unrelated type String.
show方法只接受字符串值。如何警告此int值

实际上,我想知道存储在total变量中的值

Alert.show(total.toString());