---
title: "flex  RemoteObject 超时设置"
author: "xuershan"
date: "2016-11-12T23:02:39Z"
tags: []
categories: ["Web前端"]
slug: "flex-remoteobject"
draft: false
lastmod: "2016-11-12T23:06:48Z"
id: 2337595
url: "https://xuershan.iteye.com/blog/2337595"
---

```java


var _channelSet:ChannelSet = new ChannelSet();
var channel:AMFChannel = new AMFChannel("my-amf","url");
channel.connectTimeout = 1000;
channel.requestTimeout = 1000;
_channelSet.channels = [channel];

```


超时时间设置，时间为秒
<span style="color:red">channel.connectTimeout = 1000;
channel.requestTimeout = 1000;</span>
![](http://dl2.iteye.com/upload/attachment/0121/2174/5619253f-9ea7-3de3-b136-5380193a76e9.png)