progressBar class can only work with display objects?

I tried adding a progress bar to a flex application, showing the progress of a function.
(i’m new to flex, not so new to flash…)

then i found out that the progress bar’s source can be a display object only… :frowning: like so:
progressBar = new ProgressBar();
progressBar.source = loader (or image…)

do anyone knows a way to use progress bars in order to show the progress of a function?
thanks.