I have a Loader component in a movieclip and a Progress Bar component in a movie clip.
Instance name of Loader is ThumbLoader
Instance name of Progress Bar is Progress_bar
I have the following code which works fine in the authoring and bandwidth simulation environment.
But doesn’t work in the real life through the HTML page.
ThumbLoaderListener = new Object();
ThumbLoaderListener.progress = function(eventObject) {
Progress_bar.setProgress(ThumbLoader.percentLoaded, 100);
};
ThumbLoader.addEventListener("progress", ThumbLoaderListener);
Then I tried the following which also didn’t work.
Progress_bar.mode="polled";
Progress_bar.source=ThumbLoader;
Then came across the issue between the Loader & Progress Bar components here http://www.macromedia.com/cfusion/knowledgebase/index.cfm?id=tn_19442
Flash TechNoteProgress Bar does not sync with Loader Component in a movie clip
Issue
When a ProgressBar component and a Loader component are in the same movie clip, and the ProgressBar component links to the Loader component using a relative link, the ProgressBar component will not show the correct percentage corresponding to the Loader component's status.
Reason
If you simply add the name of the Loader—for example, myLoader—in the ProgressBar Component Inspector, the component's source actually points to _parent.myLoader. The ProgressBar is therefore unable to locate the Loader component.
Solution
When you use the Component Inspector to set the source, the source is defined to use a relative path. However, since an absolute path is required, make sure to specify one when using the Component Inspector to set the source. For example, if linking to the same Loader component (myLoader), and both components are in a movie clip named mcName, set the source to mcName.myLoader.
Last updated: July 26, 2004
The solution according to Macromedia is
Progress_bar.source=**MovieClipInstance.**ThumbLoader;
Now I have three movieclips (Thumb1_mc, Thumb2_mc, Thumb3_mc) and the Loader & Progress are inside those three move clips. How to set the Progress_bar.source=???
I am really confused.
It seems the progress event of the loader doesn’t work at all.
Somebody please give me a workaround or some solution.
I did lot of searching in the net for this issue and found no solution. Please help me.
Kannan.