change the overlayOpacity: doesn't work

9 messages Options
Embed this post
Permalink
binski

change the overlayOpacity: doesn't work

Reply Threaded More More options
Print post
Permalink
Hello out there, I am new and very thankful for all I read and found threads
that help me build my very first shadowbox powered site.

I am calling shadowbox from flash , many thanx to neocorps great instructions
everything works fine, but there is still no opacity value?

to be seen here,
the very first book top/left onClick opens shadowbox.

i am able to change the color and everything I want to in shadowbox.js,
but I am not able to change the opacity ????
it doesn't do anything, and is still completely opaque, but the other Options are working??????
I set the parameter       overlayOpacity:     0.7, doesn't work
but changing the           overlayColor:       '#666',
for example, that works


I really don't understand

is there anybody who can help me out, please it's important for me
thanx in advance
binski
binski

Re: change the overlayOpacity: doesn't work

Reply Threaded More More options
Print post
Permalink
Hello
in the meantime,
i tested my project with lightbox++
here
with the same result
the oberlay is no more transparent????????? when using flash instead of jpg's to be shown.
????????

here is my demo http://www.graphics4web.de/kunden/test/index.html
first book on topleft is the example on click lightbos opens

has anybody an Idea how to acchieve a transparent background for the shadowbox or lightbox
i am appreciative for every help, tipp, hint

thanx in advance binski
James

Re: change the overlayOpacity: doesn't work

Reply Threaded More More options
Print post
Permalink
In reply to this post by binski
I have the same Problem

I have my site in flash.  once flash calls up shadowbox, the shadowbox works, however the flash dissapears until the shadowbox is closed.

Any help?
magiaFLV

Re: change the overlayOpacity: doesn't work

Reply Threaded More More options
Print post
Permalink
Hi James!
Same problem, but I am behind with flash. I have a .fla that generates test.html and test.swf .
On the html file I had added the following (there are more code, the one generated by adobe flash cs3)

<script type="text/javascript" src="shadowbox-base.js"></script>
<script type="text/javascript" src="shadowbox.js"></script>
<script type="text/javascript">

Shadowbox.loadSkin('classic', 'build/skin/'); // use the "classic" skin
Shadowbox.loadLanguage('en', 'build/lang/'); // use the English language
Shadowbox.loadPlayer(['img', 'qt','flv','swf'], 'build/player/'); // use img and qt players

window.onload = Shadowbox.init;

var openShadowbox = function(content, player, title){
    Shadowbox.open({
        content:    content,
        player:     player,
        title:      title
    });
};

</script>

</head>
<body bgcolor="#000000">
<//a href="pictures/bikini/pic1.jpg" rel="shadowbox">My Image
<//a href="videos/test.mov" rel="shadowbox;height=500;width=800">My Movie
(I added //, so you can see the code but i removed on my test.html (btw, I am using Dreamweaver CS3)
and I can see My Image (and My Movie) link and play the pic1.jpg correctly.
(PROBLEM #1)
It doesn' work with the video, just open, re size and I see a Quicktime simbol and a question mark or black if I try a flv. It works with a .swf file.
(PROBLEM #2)
How I can open a pic, .flv, .mov or any other type of video but calling it from flash?
I had tried this: (on my .fla file)

pic_mc.addEventListener(MouseEvent.CLICK, callLink);

function callLink(event:MouseEvent):void {
  var url:String = "javascript:openShadowbox('videos/rihanaHI.flv', 'flv', 'Rihana');";
  var request:URLRequest = new URLRequest(url);
  try {
    navigateToURL(request, '_blank');
  } catch (e:Error) {
    trace("Error occurred!");
  }
}

where pic_mc is a movieClip on the Stage, But nothings happend.

Can anybody guide me a little bit? Thanks
JohnH

Re: change the overlayOpacity: doesn't work

Reply Threaded More More options
Print post
Permalink

Shadowbox sets the visibility of certain elements on the html page to invisible when the overlay appears.  To fix this do the following,

Open shadowbox.js and scroll down to line 1414 (assuming shadowbox 2.0 code)
You should see a block of code that contains this line

        var hide = ['select', 'object', 'embed']; // tags to hide

remove the 'object' and 'embed' tags and shadowbox will no longer hide your flash elements

        var hide = ['select']; // tags to hide

set the opacity variable to whatever you want and then it should work.

-John
binski

Re: change the overlayOpacity: doesn't work

Reply Threaded More More options
Print post
Permalink
Hey John,

this is GREAT
it works, phantastic, cool you made me happy,
I didn't find a solution until now, so I changed to a very simple workaround in flash directly.
But for the future I'll have a really nice solution
from flash to flash with shadowbox.

sincere thanks
binski
data

Re: change the overlayOpacity: doesn't work

Reply Threaded More More options
Print post
Permalink
In reply to this post by JohnH
Exactly what I needed!

Thanks
K

Re: change the overlayOpacity: doesn't work

Reply Threaded More More options
Print post
Permalink
In reply to this post by JohnH
When I remove the object and embed tags, the script doesn't function at all. :(

I feel like I must be missing something obvious- I too am trying to call the shadowbox script from a flash movie, and it's working fine with the exception of the opacity.
Martin Walsh

Re: change the overlayOpacity: doesn't work

Reply Threaded More More options
Print post
Permalink
K,

I solved this with a combination of two things:

1 - This thread got me transparent: http://n2.nabble.com/When-I-open-Shadowbox-flash-in-html-disappear-td2395999ef1309102.html#a2471605

but then I hit a wall because my Flash file was positioned "absolutely" - like this:

#shadowbox_container {
  position: absolute;
  display: block;
  visibility: hidden;
  z-index: 999;
  text-align: center; /* centers #shadowbox in quirks and IE */
}

So what I ended up with was a working transparency, until I used the scrollbar - then Flash's indexing would kick in and out and I would watch my shadowbox blink in and out of existence (mine is an iFrame with a SWF embedded in the website).

so fix number 2, after hours of frustration, appears to be to add a z-index to the Flash file when embedding it to begin with.  
In my case: <div id="flashcontent2" STYLE="z-index:0">
       ... followed by swf embed code ...
</div>

I am not an expert - but that appears to have done the trick.  Feel free to e-mail me at mcwalsh83@gmail.com if I can help anyone out with extending this answer, because I could have used it to secure some sleep hours ago ;)