A Flash Developer Resource Site

Results 1 to 4 of 4

Thread: I need a loading progress bar

  1. #1
    Senior Member
    Join Date
    Dec 2004
    Posts
    459

    I need a loading progress bar

    Hello everyone,
    I need a progress bar to load as my external jpgs are loading into an empty movie clip. I did not use a component. Maybe I should? I really need to get this done. Does anyone have any suggestions on how I can get a loading progress bar to work? Below is the AS2. Thank you.

    Actionscript Code:
    on (rollOver) {
        this.small1.small1A.glowMC.gotoAndPlay("playglow");
        this.small1.small1A.yellowbox.gotoAndPlay("startyellow");
        this.small1.gotoAndPlay("startdown");
    }
    on (rollOut) {
        this.small1.small1A.glowMC.gotoAndPlay("endglow");
        this.small1.small1A.yellowbox.gotoAndPlay("endyellow");
        this.small1.gotoAndPlay("startup");
        this.small1.smallA.yellowbox.gotoAndPlay("boxsmall");


    }
    on (press) {
        this.small1.small1A.yellowbox.gotoAndStop("pushyellow");





    }
    on (release) {
        this.small1.small1A.yellowbox.gotoAndPlay("pushyellow");
        //this.fadeIn_mc.gotoAndPlay("startFade");



        var mcHolder:MovieClip = createEmptyMovieClip("mcHolder", getNextHighestDepth());
        var mcLoader:MovieClipLoader = new MovieClipLoader();
        mcLoader.addListener(this);

        (mcLoader.loadClip("photo1.jpg",mcHolder));

    }  

    //(mcLoader.loadClip("../images/photo1.jpg", mcHolder));

  2. #2
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Oh well, you're almost there. At least you're using the the MovieClipLoader Class !

    Look at the liveDocs under MovieClipLoader Class, they have code samples. all you need to do is use the onLoadProgress event.

    gparis

  3. #3
    Senior Member
    Join Date
    Dec 2004
    Posts
    459
    Thank you gparis,
    Mind if I ask another question?
    How can I make the external jpg fit on a certain x y coordinate with the AS2 I just provided?
    Thanks

  4. #4
    Senior Member
    Join Date
    Aug 2000
    Location
    Montréal
    Posts
    14,141
    Using the onLoadInit event of the MovieClipLoader Class. Inside its handler you write the desired x/y coords of the mcHolder object.

    gparis

Tags for this Thread

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