dcsimg
A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: preload movie !!!!!!!!!!!!!!!!!!!!!!!

  1. #1
    Member
    Join Date
    May 2001
    Posts
    34

    preload movie !!!!!!!!!!!!!!!!!!!!!!!

    l want to make a preload movie for my first scene , that sound nice now, my first scene has only one key frame ! because l put all the contents in one MC ! now how can l direct the preload codes to the MC? is it too complicated? or l have to copy all layers to the main scene?


    please help
    Last edited by alhakeem; 02-04-2003 at 07:10 AM.

  2. #2
    Senior Member sofiebel's Avatar
    Join Date
    Feb 2001
    Posts
    1,044
    You can use a bytes preloader.
    Add two keyframes to your first scene:
    Code:
    // this part goes on the first keyframe
    // put a rectangle movieclip (width = 100) onto your scene
    // call it 'bar'
    // put a dynamic textfield called 'myPercentView' on the scene
    totalBytes = getBytesTotal();
    loadedBytes = getBytesLoaded();
    myPercentage = (loadedBytes/totalBytes)*100;
    myPercentView = Math.round(myPercentage) add " %";
    bar._width = myPercentage;
    // this part goes on the second keyframe
    if (loadedBytes == totalBytes) {
    	this.gotoAndStop("yourframe");
    } else {
    	this.gotoAndPlay(1);
    }
    That should be it.

  3. #3
    Member
    Join Date
    May 2001
    Posts
    34
    sorry but there must be some thing wrong here! l put my animation in MC and l put it in the main scene so it's only one frame , l did every thing what you asked me to do but l had to wait a few seconds for the main scene to start working but l the preload movie didn't work .. now please can you send me a flash example for this case? l will be greatful..thank you

  4. #4

  5. #5
    Member
    Join Date
    Jan 2003
    Location
    Tallahassee
    Posts
    35
    Here's a fla file. It's very simple and well commented. I got this from oldnewbie in this forum, so you can always search on oldnewbie to find more info.

    This preloader will give a percent(in numerics) and the word Loaded .
    Attached Files Attached Files

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