I am trying to use the preloader component (components set 2) within flash mx. The code I have so far is:
The preloader has the instance pre_load_pic1.
_root.pre_load_pic1.setLoadTarget(“pic1.jpg”);
_root.pre_load_pic1.setChangeHandler(load_pic1);
_root.hit2.onPress = function() {
myInterval = setInterval(load_pic1, 100);
};
function load_pic1() {
if (pre_load_pic1.getPercentComplete()>=99) {
loadMovie(“pic1.jpg”, _root.holder);
clearInterval(myInterval);
}
}
Unfortunately the preload bar does nowt even though the jpeg does load into the browser.
Can anyone help out?