开发者

Passing Data between views in Adobe Flex (Actionscript)

Ive read 开发者_如何学编程a ton of online tutorials about this and cant seem to get a definite answer...

View1.mxml

navigator.pushView(views.view2, {response:"BLAH"});

View2.mxml

<fx:Script>
    <![CDATA[

    var result:String = // FIRST VIEW RESPONSE WHICH = BLAH

    ]]>
</fx:Script>

How is this done? Surely it should be simple? All the tutorials online seem very indepth! Thanks Phil


The property you are looking for is called data. It will get set AFTER construction. So, once data is set, you want to access data.response.


Got it

navigator.pushView(views.view2, "BLAH");

var result:String = String(data);

Duhhh

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜