flex的网页导航!

在flex中的导航命令:
public function navigateToURL(request: URLRequest , window: String = null): void
例子:
ExpandedBlockStart.gif ContractedBlock.gif package  dot.gif {
InBlock.gif    import flash.display.Sprite;
InBlock.gif    import flash.net.navigateToURL;
InBlock.gif    import flash.net.URLRequest;
InBlock.gif    import flash.net.URLVariables;
InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif    public class NavigateToURLExample extends Sprite 
dot.gif{
InBlock.gif
ExpandedSubBlockStart.gifContractedSubBlock.gif        public 
function NavigateToURLExample() dot.gif{
InBlock.gif            
var url:String = "http://www.adobe.com";
InBlock.gif            
var variables:URLVariables = new URLVariables();
InBlock.gif            variables.exampleSessionId 
= new Date().getTime();
InBlock.gif            variables.exampleUserLabel 
= "Your Name";
InBlock.gif            
var request:URLRequest = new URLRequest(url);
InBlock.gif            request.data 
= variables;
ExpandedSubBlockStart.gifContractedSubBlock.gif            
try dot.gif{            
InBlock.gif                navigateToURL(request);
ExpandedSubBlockEnd.gif            }

ExpandedSubBlockStart.gifContractedSubBlock.gif            
catch (e:Error) dot.gif{
InBlock.gif                
// handle error here
ExpandedSubBlockEnd.gif
            }

ExpandedSubBlockEnd.gif        }

ExpandedSubBlockEnd.gif    }

ExpandedBlockEnd.gif}

转载于:https://www.cnblogs.com/FireYang/archive/2006/10/27/541767.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值