实际在FLEX中没有页面的概念,所以就无所谓页面的跳转。实际上FLEX做的就是覆盖,隐藏等等。如

何实现JSP中的页面跳转呢?

       其中FLEX有集中方式可以实现,但我这里只介绍2种我熟悉的

       1.引用flash中的 import flash.external.ExternalInterface 这个接口

ExternalInterface.call("function(){window.location.href='http://localhost:8088/alan/Hib-debug/Hib.html';}");

       这种方法的效果和JSP中使用window.location.href函数的效果一样,在本页面直接转到目标页面,同时

更新访问路径。

       2.使用使用navigateToURL

        var url:String = "http://localhost:8080/Flex_J2eeDemo/bin/Welcome.html";
       var request:URLRequest = new URLRequest(url);
             navigateToURL(request,"_blank");

        3.其余的方法就是将页面建成 MXML Component也就是组建,然后通过ViewStack包含这些组建,实现

跳转。

相关文章:

  • 2022-12-23
  • 2021-08-15
  • 2021-07-24
  • 2021-10-11
  • 2021-10-17
  • 2021-07-19
  • 2022-12-23
  • 2021-10-15
猜你喜欢
  • 2021-09-21
  • 2022-01-30
  • 2021-12-27
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案