dcsimg
A Flash Developer Resource Site

Results 1 to 8 of 8

Thread: Wow the preloader is the hardest part......

  1. #1
    Junior Member
    Join Date
    Jul 2009
    Posts
    24

    Wow the preloader is the hardest part......

    Ok i have been making a website and i need to put a preloader in that loads my website. I have downloaded 3 different preloader and replaced the pic that they had in with my own and when i do that it either no longer works or it has a white screen until about 50% then it does work! WTH is going on??????

  2. #2
    shavingcream incarnate gukinator's Avatar
    Join Date
    Jul 2008
    Location
    Santa Cruz
    Posts
    147
    this should work (see attachments)
    Attached Files Attached Files

  3. #3
    Member
    Join Date
    Jul 2009
    Posts
    72
    said the file was wrong file type

  4. #4
    shavingcream incarnate gukinator's Avatar
    Join Date
    Jul 2008
    Location
    Santa Cruz
    Posts
    147
    oops, i can only save as cs3, heres the code
    PHP Code:
    function preload(){
        var 
    this.createEmptyMovieClip('ctrl',1);

        
    c.onEnterFrame = function() {
            if(
    _root.getBytesLoaded() >= _root.getBytesTotal() && _root.getBytesLoaded() > 4) {
                
    delete this.onEnterFrame;
                
    this._parent.gotoAndStop(2);
                
    this.removeMovieClip();
            } else {
                var 
    pr Math.round((100/_root.getBytesTotal())*_root.getBytesLoaded());
                
    loading_bar._xscale pr;
                
    loading_txt.text 'LOADING ' pr '%';
            }                
        }
    }
    this.preload();
    stop(); 
    make an mc with an instance name of loading_bar, and a text box with an instance of loading_txt on the first frame
    it should work, it does for me

    oh wait, did you unarchive the file? its compressed, hence the .fla.zip
    Last edited by gukinator; 08-12-2009 at 07:31 PM.

  5. #5
    Member
    Join Date
    Jul 2009
    Posts
    72
    yea I unarchived it and I tried opening the flash file and got that message...weird.

  6. #6
    Dignitary rynoe's Avatar
    Join Date
    Jan 2003
    Location
    Earth
    Posts
    761
    That is becuase you have an older version of flash
    [SIGPIC][/SIGPIC]

  7. #7
    Member
    Join Date
    Jul 2009
    Posts
    72
    hm...ok I guess. I've got cs3 and I've never touched cs4

  8. #8
    Dignitary rynoe's Avatar
    Join Date
    Jan 2003
    Location
    Earth
    Posts
    761
    The file type attached is CS4 or a mac version or something.

    But the code works just fine, just tried it.
    Last edited by rynoe; 08-13-2009 at 11:17 AM.
    [SIGPIC][/SIGPIC]

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