【问题标题】:Popping an array from local function in as2从 as2 中的本地函数弹出一个数组
【发布时间】:2012-10-28 09:51:12
【问题描述】:

为什么这个pop方法返回:[type Function]

var possibles:Array=new Array(1,2,3,4);
function testpop()
{
  trace( possibles.pop );
}
testpop();

这段代码写在动作脚本2中

【问题讨论】:

    标签: arrays function actionscript actionscript-2


    【解决方案1】:

    因为它是一个函数记得调用它:

    var possibles:Array=new Array(1,2,3,4);
    function testpop()
    {
      trace( possibles.pop() );
    }
    testpop();
    

    【讨论】:

      猜你喜欢
      • 2017-10-12
      • 1970-01-01
      • 1970-01-01
      • 2020-11-06
      • 1970-01-01
      • 2017-07-06
      • 2014-02-04
      • 2019-08-24
      • 1970-01-01
      相关资源
      最近更新 更多