as3.0 請教有關 new 元件庫內部陣列傳值關係

46 views
Skip to first unread message

nL lee

unread,
Mar 13, 2012, 11:01:06 PM3/13/12
to au...@googlegroups.com
各位前輩 , 想請教一下  假設我 new 元件庫元件 叫 A1_ui


該 A1_ui 裡影格 as 假設是以下 :


var a1y:Array  = new Array();


function b1()
{
           //trace( a1y)
}

在 function 內就無法 trace 到 new出之陣列 ~  是否有其他作法可以替代 感謝!!~

benny zhao

unread,
Mar 13, 2012, 11:15:54 PM3/13/12
to au...@googlegroups.com
虽然你 b1这个方法看似 在 a1y 后才声明,但是解析的时候,所有function的方法定义会被放到最前面。这个时候根本还没有 a1y

2012/3/14, nL lee <u242...@gmail.com>:

> --
> 您收到此郵件,是因為您訂閱了 Google 網上論壇的「台灣 Adobe 使用者俱樂部 」群組。
> 如要在此群組張貼留言,請寄電子郵件至 au...@googlegroups.com
> 如要取消訂閱此群組,請寄電子郵件至 augtw-un...@googlegroups.com
> 如需更多選項,請造訪此群
> 組:http://groups.google.com.tw/group/augtw?hl=zh-TW?hl=zh-TW


--
my blog : http://bennyrice.com/blog/

nL lee

unread,
Mar 14, 2012, 12:05:56 AM3/14/12
to au...@googlegroups.com
感謝 回答 , 那這樣有無替代方案 或是參考呢 
我有嘗試過 陣列跟 Object同時宣告 , Object就可以接到值
Reply all
Reply to author
Forward
0 new messages