2
A
回答
4
這是不可能的。
0
堅持住,我的意思是這取決於 - 你不能做一個功能性的方式,但如果我們談論嚴格的理論,那麼你可以破解這樣的事情:
var returned:Boolean = false;
function syncService():void {
httpService.addEventListener(Event.COMPLETE, completeHandler);
httpService.send();
while (!returned) {}
return;
}
function completeHandler(e:Event):void {
returned = true;
}
我會從不在生產中使用它,甚至可能不工作。它只是要求超時錯誤等 - 但理論上應該這樣做,對吧?
+2
這是行不通的。 ActionScript運行在一個單獨的線程中,它只會停留在while循環中,永遠不會調用completeHandler,也不會再次繪製到屏幕上。 – joshtynjala 2009-11-25 22:03:58
相關問題
- 1. Flex中的Flash HTTPService
- 2. 在Flex中,我可以發送HTTPService POST請求而不是GET請求嗎?
- 3. Flex中的兩個不同的HTTPService類
- 4. Flex HTTPService:檢索發送請求的服務
- 5. Flex - URLLoader和HTTPService
- 6. Flex HTTPService錯誤
- 7. Flex httpservice故障
- 8. 同步GET請求
- 9. iPhone同步請求
- 10. django同步請求
- 11. AFNetworking同步請求
- 12. Volley同步請求
- 13. 同步JSONP請求
- 14. CasperJS同步請求
- 15. 同步Ajax請求
- 16. 同步UIWebview請求
- 17. 請求AVAssetForVideo同步
- 18. 帶Websockets的同步請求
- 19. Flex HTTPService進度條
- 20. 異步API請求的同步API請求Swift 2.2
- 21. 來自線程與異步請求的NSURLConnection同步請求
- 22. Flex HTTPService組件的resultFormat
- 23. Windows Azure中的同步請求?
- 24. 使用Redis同步Django中的請求
- 25. Windows Phone中的RestSharp同步請求
- 26. angular2中的同步GET請求
- 27. 用iOS中後臺線程中的同步請求替換異步請求?
- 28. 如何使用請求參數與的HTTPService特殊字符 - Flex的
- 29. jquery ajax同步http請求
- 30. Java同步幫助請求
你的意思是'httpService.send()'只在服務完成後才返回? - 據我所知,第 – Amarghosh 2009-11-24 12:41:37