Flex 全局函数定义 ╰半夏微凉° 2021-10-18 18:32 256阅读 0赞 在flex中定义全局函数的方法如下: 1 // in getName.as 2 package com.adobe.syUtils 3 \{ 4 public function getName():String 5 \{ 6 return " my name is bona shen " ; 7 \} 8 \} 不过一个文件中只能定义一个public属性的公用函数。 1 // in other use.as 2 import com.adobe.syUtils.getName; 3 import mx.controls.Alert; 4 public class Test 5 \{ 6 public function Test() 7 \{ 8 Alert.show(getName()); 9 \} 10 \} 11 转载于:https://www.cnblogs.com/jssy/archive/2007/09/04/881976.html
还没有评论,来说两句吧...