开发者

Flex Mobile How to pass info from Page One (List.selectedItem) to the third page?

开发者 https://www.devze.com 2023-04-04 20:18 出处:网络
I have 3 pages view, HomeView ViewPg02 ViewPg03 In HomeView, has a List control and when user select an item it will goes to ViewPg02

I have 3 pages view,

  1. HomeView
  2. ViewPg02
  3. ViewPg03

In HomeView, has a List control and when user select an item it will goes to ViewPg02

protected function myList_changeHandler(event:IndexChangeEvent):void    {
                navigator.pushView(views.ViewPg02, myList.selectedItem, null);  }

In ViewPg02, has an image control and it get the image display info from myList.selectedItem

<s:Image id="imageScreen1" width="100%"开发者_如何转开发 height="100%"  
                 source="images/{data.image}"

and when user click on the picture, it will go to ViewPg03 with the following code:

protected function imageScreen_clickHandler(event:MouseEvent):void  {
                navigator.pushView(ViewPg03); 
                    }

Problem: I get a blank page in ViewPg03 and I can’t use myList.selectedItem in ViewPg02.

How do it get the same image in ViewPg02 to display in ViewPg03 ?

Thanks.


Can't you just continue to pass the data along to page 3?

navigator.pushView(ViewPg03, data);

Doing this will pass the data property again to page three and you can display the image the same way. Or am I missing something?

0

精彩评论

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