开发者

How to detect the return type in actionscript

开发者 https://www.devze.com 2022-12-30 00:41 出处:网络
I have a an event handler (event:ResultEvent) that could return 1 of 2 types. Does actionscript3 have a function to test the type returned? something like

I have a an event handler (event:ResultEvent) that could return 1 of 2 types. Does actionscript3 have a function to test the type returned? something like

if (type(event.result) == ProxyObject) {
  // do开发者_开发知识库 something
} else {
  // do something else
}


You should be able to use

if (event.result is ProxyObject) {}

More details are here.

0

精彩评论

暂无评论...
验证码 换一张
取 消