Версия для печати темы
Нажмите сюда для просмотра этой темы в оригинальном формате
Форум программистов > Flex > как обработать request


Автор: rukudias 18.10.2008, 19:27
Привет Всем !
есть  страница flex
на ней буттон по клику она осуществляет redirect 
на др страницу flex 
Код

 private function newWin(url:String):void {
            var url:String = url;
            var request:URLRequest = new URLRequest(url); 
            var variables:URLVariables = new URLVariables();
            variables.exampleSessionId = new Date().getTime();
            variables.exampleUserLabel = "guest";
            request.data = variables;
            request.method = URLRequestMethod.POST;
            navigateToURL(request,"_top");

            }

как в этой странице (url) отловить параметры которые пришли с исходной страницы?

Автор: ts_ 30.10.2008, 13:50
    С помощью только URLRequest даных с респонза не получите, используйте например HTTPService: 

Код


public var simpleService:HTTPService;
public function makeHTTPCall():void 
{
    simpleService=new HTTPService();
    simpleService.method="POST";
    simpleService.url="your_URL_request";
    simpleService.resultFormat="text";
    simpleService.showBusyCursor=true;
    simpleService.addEventListener(ResultEvent.RESULT, processResults);
    simpleService.send();
}

public function processResults(event:ResultEvent):Array
{
    trace(event.result)
}


Автор: gargon2008 17.11.2008, 10:36
есть статья http://int-info.ws/index.php?cat=23. работа с redirect

Powered by Invision Power Board (http://www.invisionboard.com)
© Invision Power Services (http://www.invisionpower.com)