Page 1 of 1

disclaimer page for adult gallery

Posted: 23 Oct 2009, 03:32
by jackb
hello imagevue devs & community,

i'm trying to implement a javascript cookie based disclaimer page showing when the gallery is accessed for the first time.

i found a ready made javascript and added it to the index.html togther with the embedded gallery. it consist of a javascript and a css file.
what it does it shows or hides a div layer.

my test works perfectly well with safari and firefox on macbut it doesn't work at all using windows neither ie nor firefox.

usingn windows the disclaimer page disapears behind the gallery flash. i've tried to set z-index: 1 to the #imagevue and a higher z-index to the disclaimer div without success.

here is my sample working on mac, not working on windows:
http://www.studio710.ch/test/

here is the original disclaimer page without imagevue gallery and it is working with both mac and windows http://www.studio710.ch/test/disclaimer.html

if we can work this out i'm happy to share the disclaimer script.

any help would be greatly appreciated
jack

Posted: 26 Oct 2009, 06:05
by mjau-mjau
This happens generally because flash/SWF does not usually accept layers hovering over it, at least not for the IE plugin. There is a workaround for this though, by using the WMODE transparency feature. Simply edit the imagevue/templates/index.gallery.phtml and add the following parameter:
Code
so.addParam("wmode", "transparent");
More info on adding this parameter to SWFObject:
http://www.actionscript.org/forums/show ... 3?t=124957
http://stackoverflow.com/questions/1081 ... -swfobject
http://www.codingforums.com/showthread.php?t=137848

Posted: 12 Nov 2009, 02:27
by jackb
hello mjau-mjau,

thank you for the reply. I have tried to add this to my index.html where I embed the flash gallery:
Code
		<script type="text/javascript">
		//<![CDATA[
			var flashVars = {
				foreground_color: 'EEEEEE',
				background_color: '222222'
			}; 
			var params = {
				params.wmode = 'opaque'
			};	   					
			swfobject.embedSWF("imagevue/imagevue2.swf", "imagevue", "100%", "100%", "8.0.0", "imagevue/expressInstall.swf", flashVars, {allowScriptAccess: 'always', allowFullScreen: true, bgcolor: '#222222'}, params, {id: 'imagevue', name: 'imagevue'});
		// ]]>
		</script>		 
It now shows the disclaimer on Windows using IE8 but then it shows the "Oopps! This page requires Flash Player and Javascript" instead of the flash gallery.

Do you see what I did wrong?
Thank you
Jack

Posted: 12 Nov 2009, 03:15
by jackb
I've also tried a ":" instead of the "=" with same result as above posting:
Code
<script type="text/javascript">
      //<![CDATA[
         var flashVars = {
            foreground_color: 'EEEEEE',
            background_color: '222222'
         };
         var params = {
            params.wmode : 'transparent'
         };                     
         swfobject.embedSWF("imagevue/imagevue2.swf", "imagevue", "100%", "100%", "8.0.0", "imagevue/expressInstall.swf", flashVars, {allowScriptAccess: 'always', allowFullScreen: true, bgcolor: '#222222'}, params, {id: 'imagevue', name: 'imagevue'});
      // ]]>
      </script>       
Then I've tried the to add the params directly in the embedSWF like this:
Code
		<script type="text/javascript">
		//<![CDATA[
			var flashVars = {
				foreground_color: 'EEEEEE',
				background_color: '222222'
			}; 
	   					
			swfobject.embedSWF("imagevue/imagevue2.swf", "imagevue", "100%", "100%", "8.0.0", "imagevue/expressInstall.swf", flashVars, {allowScriptAccess: 'always', allowFullScreen: true, bgcolor: '#222222'}, {'wmode':'transparent'}
			, {id: 'imagevue', name: 'imagevue'});
		// ]]>
		</script> 
The result now is again that the disclaimer is not shown in IE. I've also tried to set again z-index: 1 to #imagevue and a higher z-index:2 to my disclaimer css but no success.

Thanks for your help

Posted: 12 Nov 2009, 04:42
by jackb
I noticed that the latest version does work on Windows using Firefox, it just doesn't work with IE.
Jack

Posted: 12 Nov 2009, 10:40
by mjau-mjau
I would imagine it to be something like this, with the "wmode" setting grouped with the other parameters:
Code
      <script type="text/javascript">
      //<![CDATA[
         var flashVars = {
            foreground_color: 'EEEEEE',
            background_color: '222222'
         };
                     
         swfobject.embedSWF("imagevue/imagevue2.swf", "imagevue", "100%", "100%", "8.0.0", "imagevue/expressInstall.swf", flashVars, {allowScriptAccess: 'always', allowFullScreen: true, bgcolor: '#222222', wmode: 'transparent'}, {id: 'imagevue', name: 'imagevue'});
      // ]]>
      </script> 

Posted: 12 Nov 2009, 15:07
by jackb
mjau-mjau wrote:I would imagine it to be something like this, with the "wmode" setting grouped with the other parameters:
Code
      <script type="text/javascript">
      //<![CDATA[
         var flashVars = {
            foreground_color: 'EEEEEE',
            background_color: '222222'
         };
                     
         swfobject.embedSWF("imagevue/imagevue2.swf", "imagevue", "100%", "100%", "8.0.0", "imagevue/expressInstall.swf", flashVars, {allowScriptAccess: 'always', allowFullScreen: true, bgcolor: '#222222', wmode: 'transparent'}, {id: 'imagevue', name: 'imagevue'});
      // ]]>
      </script> 

Thanks, this works like a charm! No need for z-index at all.

Posted: 12 Nov 2009, 15:46
by jackb
I've made a little disclaimer package for interested gallery owners. There is a readme file included with a little description and how to setup.

Please note that I'm not the writer of the disclaimer.js script. I only made it usable for the imagevue gallery with the help of mjau-mjau.

Disclaimer Package Download

Have fun
Jack

Posted: 13 Nov 2009, 04:45
by mjau-mjau
Thanks for that - Do you have en example of it in action?