p_mcp
p_mcp

Reputation: 2801

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

Upvotes: 1

Views: 1620

Answers (2)

Brian Genisio
Brian Genisio

Reputation: 48157

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.

Upvotes: 1

p_mcp
p_mcp

Reputation: 2801

Got it

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

var result:String = String(data);

Duhhh

Upvotes: 0

Related Questions