Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: web page



Ted:

You can get that by pasting the other function on my page into the <HEAD> section of your page (pasted below for your convenience). This function has more parameters: the width and height of the movie, true/false to display the movie controller, the URL, and title of the window. So, for example:

<a href="#" onClick="simpleMovWin(240,196,'true','./qt4-web/qt_webmasters/mov/ jump.mov','Movie')">Open the movie in a new browser window</a><p>

... on my page makes a link that opens a new window named "Movie" with the movie "jump.mov" playing in it. Note that if you set the parameter for controller to true you should add 16 pixels to the height parameter. This script also references a movie called watchnow.mov (even though it doesn't display that movie). You can use any movie, but if you want to use my watchnow.mov it can be downloaded from http://homepage.mac.com/cook5/watchnow.mov

These scripts are really just a starting point. I'm sure improvements can be made ;)

-George


<SCRIPT LANGUAGE="javascript">
function simpleMovWin(w,h,controller,url,title) {
// define some variables for the call to embed the movie
var jsString1 = "QT_WriteOBJECT ('/watchnow.mov','" + w + "','" + h + "','',";
var jsString2 = "'qtsrc','" + url + "',";
var jsString3 = "'controller','" + controller + "','scale','tofit'";


		// make a new window, title and resize it
		movieWin=window.open("",title,"scrollbars=no,toolbar=no");
		movieWin.document.write("<html><head><title>");
		movieWin.document.write(title);
		movieWin.document.write("</title></head>");
		movieWin.document.write('<body bgcolor="#000000">');
		var winW = w+40;
		var winH = h+40;
		movieWin.resizeTo(winW,winH);

// write the QT Javascript Library to thw window
movieWin.document.writeln('<' + 'script src="./AC_QuickTime.js" language="JavaScript" type="text/javascript">');
movieWin.document.writeln("</" + "script>");


// embed the movie
movieWin.document.write("<center>");
movieWin.document.writeln('<' + 'script language="JavaScript" type="text/javascript">');
movieWin.document.writeln(" " + jsString1);
movieWin.document.writeln(" " + jsString2);
movieWin.document.writeln(" " + jsString3);
movieWin.document.writeln(");");
movieWin.document.writeln("</" + "script>");
movieWin.document.write("</center>");
}
</SCRIPT>



On Nov 16, 2003, at 9:19 PM, email@hidden wrote:

This great. Now I feel like a real PITA, but what I'm after is the example you had where the plugin plays the movie (not the Player) in a second "small" web window, kinda a "floating window". Though I do realize that the size and the placement of such a window can be set in the code. Could possibly modify this for that scenario?

from pita,  ;-0
Ted


On Nov 16, 2003, at 9:01 PM, George Cook wrote:

Ted:

The JavaScript Libraries can be downloaded via:

http://developer.apple.com/internet/licensejs.html

And clicking the download button.

Once you have these downloaded, put the script file "AC_QuickTime.js" in the main directory (aka document root) of your web server. Then you can use functions from the library by using the including tag in your html:

<script src="/AC_QuickTime.js" language="JavaScript" type="text/javascript"></script>

The example on my site that opens QuickTime Player from an HREF link uses the JavaScript library above. It does so by creating a new window, and using JavaScript document.write commands (a method that has been discussed on this list). The JavaScript function I wrote for this purpose could be copied into the <HEAD> section of the web page you want to use it on. This function also uses a small QuickTime movie named "launchingqt.mov" that displays the graphic "Launcing QuickTime Player." This movie could also be placed in the main directory of your web server. To call this function in your web page, you would use an HREF tag such as:

<a href="#" onClick="launchPlayer('./qt4-web/qt_webmasters/mov/jump.mov')">Open the movie in QuickTimePlayer</a><p>

For this to work, the "head" section of your web page needs the "launchPlayer" function (copy and paste from below). You also need to have the 160x120 launchingqt.mov file (or your equivalent) in the document root of your web server. If you want my movie, you can get it from http://homepage.mac.com/cook5/launchingqt.mov

<head>
<title>Your Web Page Title</title>
<SCRIPT LANGUAGE="javascript">
function launchPlayer(url) {
// variables for the QT Window
var jsString1 = "QT_WriteOBJECT ('/launchingqt.mov','160','120','',";
var jsString2 = "'href','" + url + "',";
var jsString3 = "'controller','false','autohref','true','target','quicktimeplayer'";


		// make a new window, title and resize it
		movieWin=window.open("","QuickTime","scrollbars=no,toolbar=no");
		movieWin.document.write('<body bgcolor="#000000">');
		movieWin.resizeTo(200,180);

// write the QT Javascript Library to thw window
movieWin.document.writeln('<' + 'script src="/AC_QuickTime.js" language="JavaScript" type="text/javascript">');
movieWin.document.writeln("</" + "script>");


// embed the movie
movieWin.document.write("<center>");
movieWin.document.writeln('<' + 'script language="JavaScript" type="text/javascript">');
movieWin.document.writeln(" " + jsString1);
movieWin.document.writeln(" " + jsString2);
movieWin.document.writeln(" " + jsString3);
movieWin.document.writeln(");");
movieWin.document.writeln("</" + "script>");
movieWin.document.write("</center>");
setTimeout("movieWin.close()",1000);
}
</SCRIPT>
</head>



On Nov 16, 2003, at 1:00 AM, email@hidden wrote:


From: email@hidden
Subject: Re: web page
Date: Sat, 15 Nov 2003 01:02:29 -0500
To: email@hidden

I'm having a little trouble understanding what you mean that I need to
do with the 'JavaScript Libraries'.
(http://developer.apple.com/internet/ieembedfix.html)
1) when I go to the site listed, and click on 'JavaScript', there's is
tons of stuff and I'm lost with what am supposed to be looking for;
2) and what do I do with it once I have it? d'oh! sorry. :-(


"All" I really need to get this understood is one example. Your page,
very of kind you, is difficult for this beginner to cut out the other
linkage. again... :-(.


Would you (anyone?) help me out?  and I'll about be done with what I
need.  :-)

Ted
_______________________________________________
quicktime-talk mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/quicktime-talk
Do not post admin requests to the list. They will be ignored.

References: 
 >Re: quicktime-talk digest, Vol 3 #956 - 4 msgs (From: George Cook <email@hidden>)
 >Re: quicktime-talk digest, Vol 3 #956 - 4 msgs (From: email@hidden)



Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.