A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: kcomponents

  1. #1
    Junior Member
    Join Date
    Apr 2004
    Location
    England
    Posts
    8

    kcomponents

    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.
    The only limitation is your imagination.

  2. #2
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    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.

  3. #3
    Junior Member
    Join Date
    Apr 2004
    Location
    England
    Posts
    8
    Thanx for the additional info.

    Si.
    The only limitation is your imagination.

  4. #4
    Senior Member
    Join Date
    Jun 2000
    Posts
    3,512
    Feel free to post the code, Wilbert.

  5. #5
    Senior Member
    Join Date
    Dec 2002
    Location
    Netherlands
    Posts
    1,632
    This is the current kcomponents loader code (first frame)
    code:
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  




Click Here to Expand Forum to Full Width

HTML5 Development Center