Hi everyone,
I have an image holder that will be set to different images based on the current page.
if (currentPageName === "Page A") {
$w(loadingScreenName).src = "url to image 1";
}
else if (currentPageName === "Page B") {
$w(loadingScreenName).src = "url to image 2";
}
The problem I'm having now is that let's say I'm at Page A, then image 1 is showing. When I navigate to Page B, image 1 will show for a while, before it is changed to image 2. The reverse is true as well: When I navigate to Page A from Page B, image 2 will show for a while before it is swapped to image 1.
Is there a way I can change the image from image 1 to image 2 without having the previous image shown?
Okay I believe I found the cause of the issue. For those wondering, it's because the image source is quite a large file size (~1mb) so it took around a second to load, causing the delay
Oke, but add to evry page code (home, etc) The code to change it in the $w.onReady()
Yea masterPage.js is te site code
huh? because different page shows a different image.
"Just call the appropriate preloader from each page." meaning?
I'm doing a preloader screen, and different pages have different loading screen. Some pages have the same loading screens.
I call the code inside the onready function.
What is it that you are trying to do? If you want a different image for each page, why not just put that image on the page?
Where do you have the code? Where do you call it?