A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: Preloader not working correctly

  1. #1
    Junior Member
    Join Date
    Oct 2009
    Posts
    6

    Preloader not working correctly

    Hi, I am working on a website and I would like it to have a preloader.
    This website is scripted using Flash CS3 and AS2.

    There are two scenes, one is "preloader" the other is "tsh". Problem is, the swf file does not display while it loads, then after it loads it displays the preloader for a second and jumps right into the next scene. How can I make it load the preloader scene first, then preload the "tsh" scene?

    - I have put this code into "preloader"

    Frame 1:
    Code:
    var loaded:Number = Math.round ((_root.getBytesLoaded()/_root.getBytesTotal())*100);
    mc_slider._x = -500 + (loaded*5);
    txt_percent.text = loaded + "%";
    if (_root.getBytesLoaded() == _root.getBytesTotal()){
    	gotoAndPlay(3);
    	trace('done');
    }
    Frame 2:
    Code:
    gotoAndPlay(1);
    Frame 6: (animation between 3-6)
    Code:
    gotoAndPlay("tsh", 1);
    The website is currently online at http://thensomethinghappened.com

  2. #2
    Registered User nunomira's Avatar
    Join Date
    May 2002
    Location
    portugal
    Posts
    7,003
    hi nbarone,

    Welcome to FlashKit.

    This should help.

  3. #3
    Junior Member
    Join Date
    Oct 2009
    Posts
    6
    Thanks, just what I was looking for! I'm going to test this out on Tuesday and I'll let ya know if I have any other issues. Thanks again!

  4. #4
    Junior Member
    Join Date
    Oct 2009
    Posts
    6
    Thanks again! This worked just how I had imagined it. Had to switch around a few _root declarations but that's about it, Thanks!

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