天天看點

Flex實作頁面之間的跳轉

<a href="http://developer.51cto.com/art/201008/216773.htm">http://developer.51cto.com/art/201008/216773.htm</a>

&lt;?xml version="1.0" encoding="utf-8"?&gt;

&lt;!-- 此檔案是由 flash builder 自動生成的,可用于編譯 flexunit 類,但不可修改。

請單擊“flexunit 結果”視圖中的“重新整理”圖示以重新生成此檔案。 --&gt;

      creationcomplete="cc()"

      xmlns:mx="library://ns.adobe.com/flex/mx" minwidth="955" minheight="600" xmlns:component="com.huike.flex.component.*" width="823" height="358"&gt;

 &lt;fx:script&gt;

  &lt;![cdata[

   import flash.net.urlrequest;

   import flash.net.navigatetourl;

   import flash.external.externalinterface;

   import mx.controls.alert;

   function cc() :void{

//    var rr :urlrequest = new urlrequest(u);

//    navigatetourl(rr,"_blank");

//    externalinterface.call("function(){window.location.href='http://localhost:8088/webpro/webpro-debug/main.html';}");

    v.selectedchild=c;

   }

  ]]&gt;

 &lt;/fx:script&gt;

 &lt;fx:declarations&gt;

  &lt;!-- 将非可視元素(例如服務、值對象)放在此處 --&gt;

 &lt;/fx:declarations&gt;

 &lt;mx:viewstack id="v" label="viewstack" width="427" height="299"&gt;

  &lt;s:navigatorcontent label="an" width="100%" height="100%"&gt;

   &lt;component:aaaaaaaaaa label="a" width="100%" height="100%" id="c"&gt;

   &lt;/component:aaaaaaaaaa&gt;

  &lt;/s:navigatorcontent&gt;

 &lt;/mx:viewstack&gt;

&lt;/s:application&gt;

繼續閱讀