Hi, I do it like this:
in my mxml file:
<mx:ControlBar paddingLeft="2" paddingRight="2"
paddingTop="2" paddingBottom="2">
<mx:ProgressBar hideEffect="{pbfadeOut}"
showEffect="{pbfadeIn}" visible="false" id="bpProgressBar"
labelPlacement="center" indeterminate="true" width="100%"/>
</mx:ControlBar>
<mx:Fade id="pbfadeOut" duration="500" alphaFrom="1.0"
alphaTo="0.0"/>
<mx:Fade id="pbfadeIn" duration="500" alphaFrom="0.0"
alphaTo="1.0"/>
In my AS file with the remoteObject call and result.
private var _bpProgressBar:ProgressBar;
public function updateCustFileListBundle(pb:ProgressBar):void
{
this._bpProgressBar = ProgressBar(pb);
this._bpProgressBar.visible = true;
this._bpProgressBar.label = 'Oppdater data base';
//trace
(LicenseVOSingleton.instance.licenseVO.custFileList);
flexComRO.updateCustFileListBundle
(MemberVOSingleton.getInstance().memberVO,
LicenseVOSingleton.instance.licenseVO);
flexComRO.addEventListener(ResultEvent.RESULT,
onUpdateCustFileListBundle);
CursorManager.setBusyCursor();
}
private function onUpdateCustFileListBundle
(event:ResultEvent):void
{
flexComRO.removeEventListener(ResultEvent.RESULT,
onUpdateCustFileListBundle);
var rs:LicenseVO = new LicenseVO();
rs = event.result as LicenseVO
//trace('************ rs ***********');
//trace(rs.custFileList);
LicenseVOSingleton.instance.licenseVO = event.result
as LicenseVO;
LicenseVOSingleton.instance.createBPTree();
LicenseVOSingleton.instance.createMyFileTree();
//CursorManager.removeBusyCursor();
this._bpProgressBar.label = 'Data Oppdatert ferdig';
this._bpProgressBar.visible = false;
}
as you can see from the code the I send a referace from the pb into
my updateCustFileListBundle(pb:ProgressBar) and alter the variables.
It don't show you bytes loaded but it shows something is going on :)
Cato Paus
www.umbrellacorp.no
--- In [email protected], "Tom Preet" <[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I am using RemoteObject method within my Flex application. Here for
> retriving data it was getting some few seconds.
> for that I need to use Progress bar instead of using showbusy
cursor.
>
> can anyone give me some suggestions of using progress bar with
remote object
> method.
>
> Thanks,
> Tomt.
>