Topic: Using a Simpleviewer Pro sequence as a page loading display...

Hi,

I was wondering if anyone might know of a way to integrate a small Simpleviewer Pro Slideshow:
http:/timperceval.com/guiran/intro1/

into the index page which could be displayed while loading the main, slow loading, javascript?
http:/timperceval.com/guiran/

The gallery will be in an external folder so I know I have to use this code:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="http:/timperceval.com/guiran/intro1/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.baseURL = "http:/timperceval.com/guiran/intro1/";
simpleviewer.ready(function () {
simpleviewer.load("sv-container", "100%", "100%", "222222", true, flashvars);
});
</script>
<div id="sv-container"></div>
<!-- END SIMPLEVIEWER EMBED -->

But how do I adapt it to my needs here?

Any help would be immensely appreciated!

Thanks,

Tim

Last edited by celestun (2011-09-25 01:25:11)

Re: Using a Simpleviewer Pro sequence as a page loading display...

It looks like you are not the first person to request some sort of loading indication for Hype: http://hype.assistly.com/customer/porta … -animation
Searching the Hype forum with terms such as 'slow' and 'load' bring up other threads such as: http://hype.assistly.com/customer/porta … ow-to-load

In response to your specific query, you could perhaps initially load your SimpleViewer intro gallery into a <div> and then, after the Hype JavaScript file has been read, use the jQuery .replaceWith() function to replace the content of the <div> (into which the gallery was initially embedded) with your main content.

Steven Speirs
SimpleViewer Support Team.

Re: Using a Simpleviewer Pro sequence as a page loading display...

Thanks for your extremely helpful reply!... yes I already looked at those links on Hype, but still no solution it would seem.

I'm trying to understand your suggestion, but to be honest it's beyond my scope. I really don't understand a thing about javascript. Is there any way you might be able to actually give me some code to insert in my index page? Sorry if it seems too simple!

Many thanks,

Tim

Re: Using a Simpleviewer Pro sequence as a page loading display...

You could try something like the following in the <body> of your page:

<!--START SIMPLEVIEWER EMBED.-->
<script type="text/javascript" src="http:/timperceval.com/guiran/intro1/svcore/js/simpleviewer.js"></script>
<script type="text/javascript">
var flashvars = {};
flashvars.baseURL = "http:/timperceval.com/guiran/intro1/";
simpleviewer.ready(function () {
simpleviewer.load("guiran_hype_container", "100%", "100%", "222222", true, flashvars);
});
</script>
<!-- END SIMPLEVIEWER EMBED -->
<div id="guiran_hype_container" style="position:relative;overflow:hidden;width:1230px;height:760px;">
</div>
<script type="text/javascript">
document.getElementById('guiran_hype_container').innerHTML="<script type='text/javascript' charset='utf-8' src='guiran_Resources/guiran_hype_generated_script.js?68624'></script>";
</script>
</script>

However, thinking about it further, a solution may be more difficult than first imagined.
It is not a regular scenario whereby a JavaScript library file (containing functions which may be called later) is to be read by the browser and then some content is to be displayed afterwards.
The main content is actually displayed by the JavaScript file itself so a loading display (whether a SimpleViewer gallery or a simple text message) may have to be incorporated into the Hype JavaScript file itself, in which case you may have to wait until this functionality is implemented in a future version of Hype.

Steven Speirs
SimpleViewer Support Team.

Re: Using a Simpleviewer Pro sequence as a page loading display...

Many thanks for your suggestions. I'm managing to get the flash to play but then it stops and doesn't continue onto the Hype javascript.

I'll keep trying!

Thanks!