A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Preloader for dynamic loading gallery

  1. #1
    _global.chosenson="flash"; chosenson's Avatar
    Join Date
    Jul 2002
    Location
    BIG APPLE
    Posts
    716

    Preloader for dynamic loading gallery

    The attached code is for a dynamic gallery. It works fine. My problem is attaching a movieclip for a preloader. I have tried using the getBytesLoaded/getBytesTotal method but this always returns a 100 because I don't think it is testing for the picture being loaded, but instead is looking at the thumbnails.

    Any ideas, suggestions?

    Thanks!

    Code:
    for (a = 0; a < total; a++)
    {
    	_root.thumbLdr.createEmptyMovieClip ("thumbNail" + a, a);
    	_root.thumbLdr["thumbNail" + a]._x = (a * thumb1xpo);
    	_root.thumbLdr["thumbNail" + a]._y = thumb1ypo;
    	_root.thumbLdr["thumbNail" + a].createEmptyMovieClip ("thumHold", 1);
    	_root.thumbLdr["thumbNail" + a].thumHold.loadMovie (thumbs[a]);
    	_root.thumbLdr["thumbNail" + a].clik = a;
    	//
    	_root.thumbLdr["thumbNail" + a].onRelease = function ()
    	{
    		
    		_root.picLdr._x = photox;
    		_root.picLdr._y = photoy;
    		_root.picLdr.loadMovie (["image0" + (this.clik + 1) + ".jpg"], 1);
    	};
    }
    If you have a question, need some help, email me:chosenson

    It's always the simplest things that escape the complex mind!

    always be just

  2. #2
    Senior Member
    Join Date
    Oct 2003
    Posts
    1,354
    Where did you put you getBytes... code?
    Looks like it needs to refer to the picLdr movieclip

  3. #3
    _global.chosenson="flash"; chosenson's Avatar
    Join Date
    Jul 2002
    Location
    BIG APPLE
    Posts
    716
    I tried that. I tried everything I could think of.


    Thanks much!
    If you have a question, need some help, email me:chosenson

    It's always the simplest things that escape the complex mind!

    always be just

  4. #4
    Senior Member
    Join Date
    Oct 2003
    Posts
    1,354
    If you are doing this from a local computer, you will always get 100%. Since it loads directly from the harddrive. Sometimes it will show up correctly if you 'simulate download' from test movie.

    Other, than that. I think we would have to see more of your code, or even the fla file.

  5. #5
    _global.chosenson="flash"; chosenson's Avatar
    Join Date
    Jul 2002
    Location
    BIG APPLE
    Posts
    716
    Quote Originally Posted by DallasNYC
    If you are doing this from a local computer, you will always get 100%. Since it loads directly from the harddrive. Sometimes it will show up correctly if you 'simulate download' from test movie.

    Other, than that. I think we would have to see more of your code, or even the fla file.

    I will upload the code later and post the URL then.


    Thanks
    If you have a question, need some help, email me:chosenson

    It's always the simplest things that escape the complex mind!

    always be just

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