Click to See Complete Forum and Search --> : kcomponents
Pellinore
10-17-2004, 07:57 AM
Hi Wilbert,
I apologise if you’ve been asked this before but is there a way of using the components with the built-in KM pre-loader without the ‘kcomponents swf not found’ warning notice briefly appearing?
All the best, Si.
w.brants
10-17-2004, 01:29 PM
The warning message is displayed if two seconds after it starts loading kcomponents.swf the getbytesloaded value still is -1.
The only solution would be a better kcomponents loader or embedding you own kcomponents loader inside the preloader.
If Bob agrees, I'll post the current kcomponents loader code so anyone can make suggestions for improving it.
Pellinore
10-17-2004, 02:01 PM
Thanx for the additional info.
Si.
Bob Hartzell
10-17-2004, 04:01 PM
Feel free to post the code, Wilbert.
w.brants
10-18-2004, 01:30 AM
This is the current kcomponents loader code (first frame) if (typeof (kobject) != "undefined") {
kccontainer.removemovieclip();
gotoandplay (3);
} else if (kccontainer._name != "kccontainer") {
kct = gettimer();
createemptymovieclip("kccontainer", 777);
kccontainer.loadmovie("kcomponents.swf");
} else if (kccontainer.getbytestotal() == -1 && gettimer()-kct > 2000) {
kccontainer.createtextfield("warning", 1, 0, 0, 0, 0);
kccontainer.warning.autosize = true;
kccontainer.warning.background = true;
kccontainer.warning.text = "kcomponents.swf not found";
}
The second frame contains a goto frame 2 and the third frame is where to go once the kcomponents have been loaded. I'm checking for kobject since that is initialized when the kcomponents code is executed.
If someone has suggestions to improve the code feel free to share them.
Wilbert
flashkit.com
Copyright WebMediaBrands Inc., All Rights Reserved.