在flex中的导航命令:
public function navigateToURL(request:URLRequest, window:String = null):void
例子:
package {
    import flash.display.Sprite;
    import flash.net.navigateToURL;
    import flash.net.URLRequest;
    import flash.net.URLVariables;

    public class NavigateToURLExample extends Sprite 
{

        public 
function NavigateToURLExample() {
            
var url:String = "http://www.adobe.com";
            
var variables:URLVariables = new URLVariables();
            variables.exampleSessionId 
= new Date().getTime();
            variables.exampleUserLabel 
= "Your Name";
            
var request:URLRequest = new URLRequest(url);
            request.data 
= variables;
            
try {            
                navigateToURL(request);
            }

            
catch (e:Error) {
                
// handle error here
            }

        }

    }

}
posted on 2006-10-27 13:19  FireYang  阅读(675)  评论(0编辑  收藏  举报