navigateToURL(request:URLRequest, window:String):void
|
Value |
Description |
|---|---|
_self |
Specifies the current frame in the current window. |
_blank |
Specifies a new window. This new window acts as a pop-up window in the client's browser, so you must be aware that a pop-up blocker could prevent it from loading. |
_parent |
Specifies the parent of the current frame. |
_top |
Specifies the top-level frame in the current window. |
<?xml version="1.0"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script><![CDATA[
import flash.net.*;
public function executeSearch(event:MouseEvent):void {
public var u:URLRequest = new URLRequest
"http://www.google.com/search?hl=en&q=" + ta1.text);
navigateToURL(u,"_blank");
}
]]></mx:Script>
<mx:TextArea id="ta1"/>
<mx:Button label="Search" click="executeSearch(event)"/>
</mx:Application>
위의 예제는 이 메소드를 이용해서 get방식으로 값을 보내는 방식을
구현해본것이다
아울러 이것을 좀더 프로그램적으로 구현을 해본다면
import flash.net.*;
public var url:URLRequest = new URLRequest("http://mysite.com/index.jsp");
var uv:URLVariables = new URLVariables();
url.method = "GET";
uv.name = "fred";
url.data = uv;
navigateToURL(url);
이런식으로 함수를 하나 만들어서 사용하면 될듯하다
플랙스에서 외부 asp나 jsp로 값을 보낼때 사용하면 유익할듯하다.
^^
다음엔 Datagrid에 이미지나 기타 다른 것들을 넣는것을 정리해서
올려놓을 예정이다.
| flex로 구현한 RSS Reader (0) | 2007.08.10 |
|---|---|
| URLRequest object를 가지고 자바스크립트 실행시키기 (0) | 2007.08.09 |
| Using an item renderer with the TileList and HorizontalList controls (0) | 2007.08.09 |
| flex에서 Using the htmlText property 사용하기 (0) | 2007.08.08 |
| flex에서 Data formatting(데이터 포맷 지정하기) (0) | 2007.08.08 |