protected function showBusy(event:Event):void
If I delete function like above, busy indicator works well, no problem.
What is your function doing? Is your function perhaps doing something synchronously and thus blocking the VM from doing anything else? Keep in mind that Flash is still a single-threaded environment, so if you want the UI to update during processing you need to code your function to cede cycles back to the VM.
function does sql connection and selects something from database. Waiting this, I want to show busy indicator to inform user. I think your last sentence "cede cycles back to the VM." solve this problem. Could you give more info about this please?
The basic strategy is to utilize events to break up your code flow. Look at how URLRequest operates as an example:
Basically, the flow is
* create the URLRequest and URLLoader; configure, add listeners
* call URLLoader.load()
* (wait for event)
* handle the response event
During the 3rd step, the VM can update the UI to spin a busy indicator, increment a progress bar, etc.
I assume your SQL connection operates in a similar manner?