Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Problem with loading pics in a photo gallery

New Here ,
Mar 30, 2007 Mar 30, 2007
Ok.. I don't know what is the problem for this.. maybe someone with more experience bumped to this too.. and can help me out..
I will put the link here so u can see it but before u open it, pay attention of the mess.. pictures are loaded one over another or not loaded at all.. There are 2 panels of the same pics and code, the second one loads the pics the same way as the first one right after the first one has finished loading all of the pics. But strangely the second panel with pics has absolutely no problem with positioning the pics correctly with their correct size even the first time u open it. (this comes from the swf of the pic that loads in the loader; they all load in loaders positioned by me). After the gallery has loaded the first time and u Refresh the page.. u will see the gallery works perfect. If u want to see the mess up again, just delete ur temporary internet files and refresh the page again. Here is my gallery (not finished yet):

http://www.goliveuk.com/Projects/Theolife/

NOTICE:
When I test this in flash with simulate download, all works fine except that some pics show progress of loading (I've made listeners for that) and on complete I trace it completed loading but they don't show up..

So I can't figure out what might be causing this problem...
As far as my logic goes.. I can tell that if in the second panel the pics load succesfully every time, this means that the problem comes only the first time they are being loaded.. for me this doesn't make any sense.. and I see as solution to make some invisiblemovie clip that will load all of my pics for the first time and then the actual visible movie clips that are visible will continue so there are no problems.
I don't know if this will work.. it is just my thinking.
Maybe there is some other way to fix this when they load the first time.. maybe telling the code to load it.. and reload it after that ?
Any ideas what could be causing this problem ?
Hope someone can explain to me..

Thanks in advance...
TOPICS
ActionScript
360
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 30, 2007 Mar 30, 2007
you must wait until loading is complete (use preloader code or the onLoadInit() method of the moviecliploader listener class) before trying to access your loaded object's _width and _height.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 30, 2007 Mar 30, 2007
can u give me an example with onLoadInit() or preloader code as u mention so I can get a clear view of what u mean cuz now I am a bit confused what must wait for loading to be completed the main swf or the swfs of the pictures that have a code inside to get the size of the loader?
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 30, 2007 Mar 30, 2007
try:

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 30, 2007 Mar 30, 2007
thanks a lot I will surely do so 🙂
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 30, 2007 Mar 30, 2007
LATEST
you're welcome.

p.s. you can assign the value of i to a variable in target within the onLoadInit() method, if you need to retrieve the value of i.
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines