我有以下代码:
<mx:Script>
//I WANT TO ADRESS THE FUNCTION INSIDE MY HBOX FROM HERE
</mx:Script>
<mx:DataGrid id="dg_uploads" x="10" y="10" width="500" height="350" editable="false" variableRowHeight="true">
<mx:columns>
<mx:DataGridColumn headerText="progress" sortable="true" paddingLeft="10">
<mx:itemRenderer>
<mx:Component>
<mx:HBox>
<mx:Script>
<![CDATA[
public function updateProgress(event:CustomEvent):void {
trace(event);
bar.setProgress( event.data.bytesLoaded, event.data.bytesTotal );
}
]]>
</mx:Script>
<mx:VBox>
<mx:ProgressBar id="bar" labelPlacement="top" minimum="0" visible="true" maximum="100" verticalGap="0"
color="0x323232" label="{data.name}" direction="right" mode="manual" fontWeight="bold" trackHeight="10" width="280" bottom="0"/>
<mx:ProgressBar id="subbar" mode="manual" direction="right" labelPlacement="bottom" minimum="0" visible="true" label="{data.status}"
maximum="100" width="280" styleName="subBarStyle"/>
</mx:VBox>
<mx:Image source="images/Clear-Red-Button.png" useHandCursor="true" buttonMode="true" click="outerDocument.deleteItem(event)" />
<mx:Image source="images/Clear-Green-Button.png" useHandCursor="true" buttonMode="true" click="outerDocument.stopUploadProcess(event)" />
</mx:HBox>
</mx:Component>
</mx:itemRenderer>
</mx:DataGridColumn>
</mx:columns>
</mx:DataGrid>
如何从 hbox 脚本外部寻址 hbox 脚本内部的函数?我想在文档开始时触发它