A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: preloader problem

  1. #1
    Guest

    resolved

    Hey Guys,
    I have this problem with the preloader. Maybe this question must have been asked a thousand time before

    I think my preloader script is perfect (getbyte loader)

    The problem is all the loading is done before any frames are loaded that means my preloader does not have any time to react

    I have 2 Scenes
    first Scene preloader 2 frames.
    Second Scene My flash file 3 frames

    Total file size 150kb.

    I used the Bandwidth profiler it says 128k was already loading in the first frame whereas my first frame contains only the preloader.

    And the profiler text files says 449 symbols were loaded in the first frame itself
    My problem is can I anyway optimize this so that the first frames load only th preloader or something of that sort

    How to I optimize the fla so that the preloader works fine

    Please help .

  2. #2
    Senior Member catbert303's Avatar
    Join Date
    Aug 2001
    Location
    uk
    Posts
    11,222
    Try making a new movie, that contains just a preloader to load your original movie into another level,

    frame 1

    loadMovieNum("movie.swf", 1);

    frame 2

    if (_level1.getBytesTotal() > 0) {
    total = _level1.getBytesTotal();
    loaded = _level1.getBytesLoaded();

    percent = Math.round((loaded / total) * 100);

    if (loaded == total) {
    _level1.play();
    gotoAndStop(4);
    }
    }

    frame 3

    gotoAndPlay(2);

    frame 4 is a blank keyframe, (to hide the preloader after use)

    in your main movie remove the old preloader and just add a stop action on the first frame to prevent it playing back until loaded.

  3. #3
    Guest

    resolved

    Thankz that was a great help

    I ll try it


  4. #4
    Friendly fire ain't. skd's Avatar
    Join Date
    Mar 2002
    Location
    toronto.ca
    Posts
    389
    you should stop level one as soon as it's called to load, or the preloader will pretty much lose the point

  5. #5
    Guest

    resolved

    Thankz a lot

    It helped me a lot

    Yeah Now the preloader is working as it should be

    url is

    http://www.dazzling.co.ae/test/index.html

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