webForumDet fria alternativet

ladda externa bilder med kpoader component

3 svar · 455 visningar · startad av starfish prime

starfish primeMedlem sedan aug. 20044 inlägg
#1

hey
Have have a picture gallery that contain a movieclip with 18 loader components that load the pictures and it works fine, exept when you visit the site for the first time or when you have empty temp internet files the pictures wont scale and they are all over the screen full sized. if you refresh the page they scale perfect.
I guess this is a preloader thing but can you preload ext. images?

oskobMedlem sedan maj 20021 558 inlägg
#2

Yes it can be done with If.
I don't remember exactly but something like this:
if (instname.getBytesTotal() = instname.getBytesLoaded()) {

lampdanielMedlem sedan sep. 200623 inlägg
#3

Laddare, loader.

aa

BlixtsystemsMedlem sedan maj 2005704 inlägg
#4

Du kan även kolla in MovieClipLoader så har du ett par användbara events:

onLoadProgress för att kolla hur mycket som laddats ned

onLoadInit där du t.ex. lägga din kod för att skala om clippet och vara säker på att det är redo.

128 ms totalt · 3 externa anrop · v20260731065814-full.fb544a5a
0 ms — hämta forumlista (cache)
0 ms — hämta statistik (cache)
124 ms — hämta tråd, inlägg och bilagor (db)