This content has been marked as final. Show 7 replies
Would you be willing to share the main page code for how you are using this function?
I am trying to do this also. I've had some trouble getting examples of using progress bar with web service call events.
Ha. It's hundreds of lines right now... But I'll skim it down and post it soon....
Thanks for your interest! Hope we can figure this out...
here is a VERY simplified version of my application.
Compile the three files attached, and click the tabs, and you will see something similar to what I'm experiencing - the Progress Bar component is correctly moved in the first ViewStack child, but not moved correctly in the other two.
One way around this is to set the initial size of the Canvas to some width/height that approximates what it will be when the WebService actually finishes. My suggestion is an oversimplification, but you get the idea.
That's a thought, but I prefer using percentages to allow for the entire application to fit in whatever size browser or screen resolution the end user it using.
You can use percentages. Just set percentWidth and percentHeight in AS when the web service has completed. You just initially hard code sizes.
I figured it out.
I added an Event Handler for show Events on the MyCanvas.mxml component which updates the display of the component, then loops through each of the child Canvas components, and calls the moveToCenter() function. I implemented this in my original application, and it's working like a charm - all of the child pages (under each tab) are being preloaded with data before the user clicks the tab, so that each page is ready for viewing immediately, or at least will be in progress, and show that it's in progress as soon as they click the tab.