[as疑难] 关于函数参数(...ags)的问题

苏塔亚库 2011-03-16 09:48:23
想封装下flash.net.NetConnection,其中有个方法:

call(command:String, responder:Responder, ...parameters)

最后一个参数为不定参数,我想将其封装下,由其他函数接收这个不定参数,然后赋予call函数,就像:

function customerCall(...ags):void
{
//把ags赋予第3个参数
call(command:String, responder:Responder, ...parameters)

//下面这个只当作一个参数,而不是不定参数
//call(command:String, responder:Responder, ags)
}

应该怎么做?
...全文
71 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
xlgp2171 2011-03-16
  • 打赏
  • 举报
回复
function customerCall(...ags):void
{
call.call(null, command:String, responder:Responder, args);
}
这样就可以咯
具体方法参考Function.call
List of ArcGIS API for Flex 1.2 packages. See the Adobe Flex 3 Language Reference at http://livedocs.adobe.com/flex/3/langref/ for Adobe Flex 3 packages. Package Description com.esri.ags This package contains the main mapping classes: Map, Graphic, SpatialReference and Units. com.esri.ags.controls This package contains the InfoWindow, Navigation and ScaleBar control classes. com.esri.ags.controls.infoClasses This package contains the InfoWindow and InfoSymbol supporting classes. com.esri.ags.controls.navigationClasses This package contains the classes for styling the navigation control. com.esri.ags.events Event classes for map navigation, loading layers, geoprocessing tasks and toolbars. com.esri.ags.geometry MapPoint, Multipoint, Polyline, and Polygon are the main geometry classes. com.esri.ags.layers Supported map layers include ArcGIS (dynamic or tiled), ArcIMS, and Graphics. com.esri.ags.renderers Renderers help symbolize graphics according to their attributes. Useful for thematic mapping. [Added in version 1.2] com.esri.ags.symbol Symbols are used to represent "geometries" on the map. Marker symbols are available for point and multipoint geometries. Line symbols are available for polyline geometries. Fill symbols are available for polygon geometries. com.esri.ags.tasks This package contains classes related to ArcGIS Server tasks: find, geometry, geoprocessor, identify, locator, query and route services. com.esri.ags.toolbars This package contains non-UI toolbar classes. Use them to create your own toolbar implementations. com.esri.ags.utils This package contains utility classes for the ArcGIS API for Flex, such as getting the extent of several graphics, or converting data between geographic and web mercator projections. [Added in version 1.2] com.esri.ags.virtualearth This package contains classes related to Virtual Earth mapping and geocoding. [Added in version 1.2]
ArcGIS API for Flex 1.3官方离线文档 本文档来源:http://resources.esri.com/help/9.3/arcgisserver/apis/flex/apiref/index.html 个人整理的离线版本,再也不用上网看了,O(∩_∩)O哈哈~ com.esri.ags——This package contains the main mapping classes: Map, Graphic, SpatialReference and Units. com.esri.ags.controls——This package contains the InfoWindow, Navigation and ScaleBar control classes. com.esri.ags.controls.infoClasses ——This package contains the InfoWindow and InfoSymbol supporting classes. com.esri.ags.controls.navigationClasses——This package contains the classes for styling the navigation control. com.esri.ags.events Event——classes for map navigation, loading layers, geoprocessing tasks and toolbars. com.esri.ags.geometry——MapPoint, Multipoint, Polyline, and Polygon are the main geometry classes. com.esri.ags.layers——Supported map layers include ArcGIS (dynamic or tiled), ArcIMS, and Graphics. com.esri.ags.renderers——Renderers help symbolize graphics according to their attributes. Useful for thematic mapping. [Added in version 1.2] com.esri.ags.symbol——Symbols are used to represent "geometries" on the map. Marker symbols are available for point and multipoint geometries. Line symbols are available for polyline geometries. Fill symbols are available for polygon geometries. com.esri.ags.tasks——This package contains classes related to ArcGIS Server tasks: find, geometry, geoprocessor, identify, locator, query and route services. com.esri.ags.toolbars——This package contains non-UI toolbar classes. Use them to create your own toolbar implementations. com.esri.ags.utils——This package contains utility classes for the ArcGIS API for Flex, such as getting the extent of several graphics, or converting data between geographic and web mercator projections. [Added in version 1.2] com.esri.ags.virtualearth——This package contains classes related to Bing Maps and Bing Maps geocoding (formerly Microsoft Virtual Earth). [Added in version 1.2]

4,328

社区成员

发帖
与我相关
我的任务
社区描述
多媒体/设计 Flex
社区管理员
  • Flex
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧