A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: preloader q

  1. #1
    Web Pimp
    Join Date
    Jun 2004
    Posts
    130

    preloader q

    okay, here's my preloader script:
    frame 1:
    Code:
    loadpercent = "0%";
    Frame 2:
    Code:
    factor = _root._totalframes / 750;
    Percent = Math.round ((_root.getBytesLoaded() / _root.getBytesTotal() * 100)* factor);
    loadPercent = ".."+percent+"..";
    
    if (Percent > 100) {
    	gotoAndPlay(4);
    }
    BAR._width = PERCENT*170;
    Frame 3:
    Code:
    gotoAndPlay(2);
    Okay... now for my question. i have a one frame movieclip of a bar spinning around...if i took out frame 3 and added else{gotoandplay(2);} on to the second frame, so it looked like this:
    Code:
    factor = _root._totalframes / 750;
    Percent = Math.round ((_root.getBytesLoaded() / _root.getBytesTotal() * 100)* factor);
    loadPercent = ".."+percent+"..";
    
    if (Percent > 100) {
    	gotoAndPlay(3);
    }
    else {gotoAndPlay(2);}
    BAR._width = PERCENT*170;
    would that work?
    is it possible to loop one frame to keep playing itself over and over?
    because i want to have that little bar spinning...




  2. #2
    Registered User Bzdero's Avatar
    Join Date
    Feb 2001
    Location
    Split, Croatia
    Posts
    488
    No, you can't loop one frame, but you can stop that root frame and put your code on movie clip's onEnterFrame action.

  3. #3
    Web Pimp
    Join Date
    Jun 2004
    Posts
    130
    okay, great...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