0

文字列を必要とする変数 INSTANCE を含む beta というパッケージ alpha に actionscript ファイルがあります。MXML で alpha.beta.INSTANCE = "String" としてインポートして宣言すると、実行されてインスタンス String に接続されます。これを、Foo の ID を持つ TextArea のユーザー入力など、MXML の別の入力に関連付けたいのですが、エラー 1120 Access of Undefined property Foo が発生します。これは私が台無しにしている単純なものであることはわかっていますが、2日経っても正しい答えを見つけることができなかったので、集合的な天才に尋ねると思いました. 成功せずに試したさまざまな方法を投稿します。

import alpha.beta;   
 alpha.beta.INSTANCE = "String" //connects to the instance as String

alpha.beta.INSTANCE = Foo.text  //Error 1120 Access of Undefined Property Foo

alpha.beta.INSTANCE = "{Foo.text}" //connects to a an instance with the name of literally {Foo.text} not the input values.  In the sample below I would want it to connect to the 1 instance


<s:TextArea id="Foo" text="1" />
4

1 に答える 1