Open Quicktime from FLASH in shadowbox

8 messages Options
Embed this post
Permalink
rayOcreative

Open Quicktime from FLASH in shadowbox

Reply Threaded More More options
Print post
Permalink
I've been through the forum postings and have tried a few suggestions but I can't seem to find the answer to this: I'm trying to open a Quicktime movie from Flash in Shadowbox.
Hopefully you can clue me in… or thump me in the head—one of the two.
In a nutshell:
I can launch the shadowbox from the flash button but a few things aren't clicking:
1. The quicktime movie is 640x360 and it only opens in a little window and shrinks the movie to fit.
2. The flash in the background disappears and goes black.

I've stripped a test down to make it as basic as possible.
Here is the link to the test:
http://rayocreative.com/shadowboxtest1.html

Here is my HTML:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title>::shadowBox_test::</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link rel="stylesheet" type="text/css" href="shadowbox/shadowbox.css">
<script type="text/javascript" src="shadowbox/shadowbox.js"></script>
<script type="text/javascript">
Shadowbox.init({
    language:   "en",
    players:    ["qt"]
});
</script>
<script type="text/javascript">
function openShadowbox(content, player, title){
    Shadowbox.open({
        content:    content,
        player:     player,
        title:      title
    });
}
</script>

</head>

<body>

<div align="center">
 
   
   
   
 

</div>
</body>
</html>


---------
AND here is the actionscript [2.0] that I am applying to my flash button:
on (release) {
        getURL("javascript:openShadowbox('http://rayocreative.com/reel/TWC_CareerDay_640.mov', 'qt', 'QT_test');");
}

----------

Any clues? I really like Shadowbox and I hope I can use it. Any help is greatly appreciated.
Thank you.
WebWorx24

Re: Open Quicktime from FLASH in shadowbox

Reply Threaded More More options
Print post
Permalink
For the sizing issue you'll want to add width and height to the function. Here is an example:

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

==================================

As for the Flash object disappearing you'll have to:

"Modify line 1390 in shadowbox.js to (remove the 'embed' and 'object' tags):

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

This is the original thread: http://www.shadowbox-js.com/forum.html#nabble-td1311151|a1367542
rayOcreative

Re: Open Quicktime from FLASH in shadowbox

Reply Threaded More More options
Print post
Permalink
Thanks for the quick response WebWorx24.

I applied this to the HTML:
function openShadowbox(content, player, title){
    Shadowbox.open({
        content:    content,
        player:     player,
        title:      title,
        height: 360,
        width: 640
    });
}

///I adjusted the height to 360 [instead of 470] to fit the dimensions of my QT - fits perfect. One question. What if am calling up multiple QTs from different buttons in the flash doc with different sizes (e.g., 500x375)? Is there a way to do a custom for each QT?

This is how it looks after applying the height and width with the single button:
http://rayocreative.com/shadowboxtest2.html

///
As far as <<Modify line 1390 in shadowbox.js>>
I'm a little lost on that one [sorry, not an expert coder].
When I go to line 1390 of the shadowbox.js [I opened the one from the source file] this is what's on line 1390:
            if(p.qt) return 'qt';

I don't think this is what you were referring to. Can you give me a little more guidance on adjusting the shadowbox.js so it doesn't hide my flash?

Thanks again for your help. Much appreciated.


rayOcreative

Re: Open Quicktime from FLASH in shadowbox

Reply Threaded More More options
Print post
Permalink
Ok... did a little digging and found what I need with a search and replace. This seems to fix it [although the flash button is still live under the QT, but I can live with that]:
http://rayocreative.com/shadowboxtest3.html

But I added another button for a different size movie. Movie 2 appears with the bigger box set forth with the dimensions added in the HTML. Is there any way to adjust the HTML? shadowbox.js? Or, add dimensions to the the flash Actionscript [2.0] to make each QT play in the proper size window?

Once again, any help is much appreciated.
Thank you.
WebWorx24

Re: Open Quicktime from FLASH in shadowbox

Reply Threaded More More options
Print post
Permalink
Glad that you got it working.

To have two qt's display with different sizes you'll have to call two different functions. For example:

function one:
var openShadowbox = function(content, player, title){
    Shadowbox.open({
        content:    content,
        player:     player,
        title:      title,
        height:     470,
        width:      640
    });
};

Function two:
var video2= function(content, player, title){
    Shadowbox.open({
        content:    content,
        player:     player,
        title:      title,
        height:     470,
        width:      640
    });
};

You'll notice that I've changed the function name for the second example. That name should also be changed for your second button.

Example:
on (release) {
        getURL("javascript:video2('http://rayocreative.com/reel/TWC_CareerDay_640.mov', 'qt', 'QT_test');");
}

You can continue adding more buttons and vids by following the same structure.

==================================

If you'd like one button to launch several videos that one can click through then you'd have to follow this thread: http://www.shadowbox-js.com/forum.html#nabble-td1802473|a2136076

The AS2 example is a few posts down. It can get quite complicated.

==================================

The 'Modify line 1390' can get tricky if you're using the compressed version of the js file. What I did was did a search for 'var hide' and click through until you come to 'var hide = ['select', 'object', 'embed']; // tags to hide. From there you can delete 'object' and 'embed.'
rayOcreative

Re: Open Quicktime from FLASH in shadowbox

Reply Threaded More More options
Print post
Permalink
that's going to do the trick.
It goes without saying... but you ROCK!
rayOcreative

Re: Open Quicktime from FLASH in shadowbox

Reply Threaded More More options
Print post
Permalink
Spinning like a top:
http://rayocreative.com/shadowboxtest4.html

Thanks again.

One last thing, is it normal for the flash page [the button actions] to still be live in the background?
Briwil

Re: Open Quicktime from FLASH in shadowbox

Reply Threaded More More options
Print post
Permalink
For what its worth (and I'm noticing this because I'm having the same issue), this isn't working correctly on Safari 3 on XP, the movie shows up, but the overlay shadowbox buttons/border are hidden underneath the flash movie... you can see it for a second underneath if you reload the page.

Does anyone please know why this is happening? Safari 3 in XP is supported, yes?