Velocity Reviews

Velocity Reviews (http://www.velocityreviews.com/forums/index.php)
-   Javascript (http://www.velocityreviews.com/forums/f68-javascript.html)
-   -   video in javascript (http://www.velocityreviews.com/forums/t923797-video-in-javascript.html)

chrisdude911 03-26-2006 11:50 AM

video in javascript
 
how do i add video into a javascript web page with my own custom
buttons?


cwdjrxyz 03-26-2006 05:21 PM

Re: video in javascript
 

chrisdude911 wrote:
> how do i add video into a javascript web page with my own custom
> buttons?


First, you often do not have to use javascript to add an embedded video
with control buttons to a web page. The objects for the WMP and Real
players, for example, can contain parameters that supply various button
combinations, if you wish, or you can autostart without any controls
showing. In some cases, javascript controls will allow you to do
something more fancy, but of course these will not work if the viewing
browser has script turned off.

You will find some examples of both audio and video, with and without
script, on my media pages that can be reached at
http://www.cwdjr.info/media/playersRoot.php .


electrician@electrician.com 03-27-2006 05:35 AM

Re: video in javascript
 
First use IE 5 or better and use Windows. I do not program for
Netscape or other second rate browsers and OS.
Go to http://www.alaskavirtualtour.com It does what I think you are
looking for.
It is loaded with viewable code and uses two versions of Windows Medai
Player with the controls plus more. You do know how to view the code?
(right mouse button)


cwdjrxyz 03-27-2006 07:02 AM

Re: video in javascript
 

electrician@electrician.com wrote:
> First use IE 5 or better and use Windows. I do not program for
> Netscape or other second rate browsers and OS.


I think many here consider IE6 as the worst popular browser in wide
use. The reasons are many. It is not W3C standards compliant in many
areas. It can not even support mime type application/xhtml+xml that is
required for serving true xhtml, and IE7 likely will not either. Not
many use Netscape anymore. However many are now using Firefox and
Opera. I need elaborate no more. If you want to argue this point, there
are many users of browsers such as Firefox here that likely will be
more than happy to argue with you. I do not have the time.


> Go to http://www.alaskavirtualtour.com It does what I think you are
> looking for.


It does not work on Firefox, Opera, Mozilla, and Netscape, and the code
is full of validation errors. If you are only interested in viewers who
use a recent IE, it works. However there are ways to make the video
play on most recent browsers that are well known. Most of the big media
sites I go to work just fine on recent Firefox, Opera, Mozilla, and
Netscape browsers as well as IE.


> It is loaded with viewable code and uses two versions of Windows Medai
> Player with the controls plus more. You do know how to view the code?
> (right mouse button)


If you view the page on Firefox, Opera, Netscape, or Mozilla and right
click to view the source code, you just find a few lines of a frame set
code, and the movies can not be clicked on. If you use IE6 and click on
a movie so that it is working, then you can view the source code by
right clicking. The reason the code works only for IE and close
relatives soon becomes apparent. An ActiveX object path only is used
for playing the movie, and most browsers do not support this. The
classic way, although not standards compliant, is to insert an embed
path within the ActiveX object. This allows most other browsers to play
the movie when they do not support ActiveX. However there are standards
compliant ways that I use to avoid using a now invalid embed tag. The
code you get that includes the players is also full of other errors.
Just take it to the W3C validator to see.

This is the worst example of a page for playing video files that I have
seen in a long time, and one should avoid it unless you are only using
a page on a network where you know only recent IE browsers are used.


electrician@electrician.com 03-27-2006 09:35 AM

Re: video in javascript
 
<This is the worst example of a page for playing video files that I
have
seen in a long time, and one should avoid it unless you are only using
a page on a network where you know only recent IE browsers are used.>


The fact is 98 per cent of the Internet users use IE5 or better. No
private network is required.
Click on my webstat counter at the bottom electrician.com and read the
stats for about a million hits.

If you do not use IE 5+ you are not in compliance with 98 percent of
the users of my sites. I simply don't have the time to mess with the
Netscape, Firefox, and Opera minority. As far as I am concerned
Microsoft is the standard bearer, not the W3C people. We have all seen
where Netscape went by being W3C compliant. I wrote several JavaScript
programs from 1996 to 1999. Then after spending six weeks writing a
program would have to spend another two weeks making it compatible with
Netscape. Never again! Hey if you don't want to use IE go somewhere
else. The Internet world will go on spinning right on by you.


VK 03-27-2006 10:27 AM

Re: video in javascript
 

electrician@electrician.com wrote:
> The fact is 98 per cent of the Internet users use IE5 or better. No
> private network is required.
> Click on my webstat counter at the bottom electrician.com and read the
> stats for about a million hits.
> If you do not use IE 5+ you are not in compliance with 98 percent of
> the users of my sites. I simply don't have the time to mess with the
> Netscape, Firefox, and Opera minority. As far as I am concerned
> Microsoft is the standard bearer, not the W3C people.


Partially true (in the sense that some standards are being originally
coined by Microsoft, not by W3C).

Your stat is highly patched though. The average by
<http://www.w3schools.com/browsers/browsers_stats.asp>
<http://www.thecounter.com/stats/2006/February/browser.php>
<http://www.webreference.com/stats/browser.html>

is 4%-9% with small growth trend which is close to the stats of servers
I'm able to monitor in my location (but have no right to disclose).

But anyone is entitled for his personal decision about anything, and
they are not a subject of public "redo efforts" as long as they are
legal. As there is nothing illegal in your decision to support nothing
but IE, you are fine. The question remains though: if your final
decision is already taken :- what the f-word are you fishing in this
newsgroup? <microsoft.public.scripting.jscript> is right on the corner
and that group charter corresponds to your ideas and experience.

suitcase - train - mpsj ! ;-)


Erwin Moller 03-27-2006 11:38 AM

Re: video in javascript
 
electrician@electrician.com wrote:

> First use IE 5 or better and use Windows. I do not program for
> Netscape or other second rate browsers and OS.


"Netscape or other second rate browsers and OS?"

Are you completely retarded?
I guess anything not-windows is second rate in your book, right?

Stop pretending you have answers if you show so clearly you are completely
clueless.

To the Original Poster: Please know this chap is not speaking for the
community at all.

No regards,
Erwin Moller

> Go to http://www.alaskavirtualtour.com It does what I think you are
> looking for.
> It is loaded with viewable code and uses two versions of Windows Medai
> Player with the controls plus more. You do know how to view the code?
> (right mouse button)



cwdjrxyz 03-27-2006 05:48 PM

Re: video in javascript
 

cwdjrxyz wrote:
> electrician@electrician.com wrote:
> > First use IE 5 or better and use Windows. I do not program for
> > Netscape or other second rate browsers and OS.

>
> I think many here consider IE6 as the worst popular browser in wide
> use. The reasons are many. It is not W3C standards compliant in many
> areas. It can not even support mime type application/xhtml+xml that is
> required for serving true xhtml, and IE7 likely will not either. Not
> many use Netscape anymore. However many are now using Firefox and
> Opera. I need elaborate no more. If you want to argue this point, there
> are many users of browsers such as Firefox here that likely will be
> more than happy to argue with you. I do not have the time.
>
>
> > Go to http://www.alaskavirtualtour.com It does what I think you are
> > looking for.

>
> It does not work on Firefox, Opera, Mozilla, and Netscape, and the code
> is full of validation errors. If you are only interested in viewers who
> use a recent IE, it works. However there are ways to make the video
> play on most recent browsers that are well known. Most of the big media
> sites I go to work just fine on recent Firefox, Opera, Mozilla, and
> Netscape browsers as well as IE.
>
>
> > It is loaded with viewable code and uses two versions of Windows Medai
> > Player with the controls plus more. You do know how to view the code?
> > (right mouse button)

>
> If you view the page on Firefox, Opera, Netscape, or Mozilla and right
> click to view the source code, you just find a few lines of a frame set
> code, and the movies can not be clicked on. If you use IE6 and click on
> a movie so that it is working, then you can view the source code by
> right clicking. The reason the code works only for IE and close
> relatives soon becomes apparent. An ActiveX object path only is used
> for playing the movie, and most browsers do not support this. The
> classic way, although not standards compliant, is to insert an embed
> path within the ActiveX object. This allows most other browsers to play
> the movie when they do not support ActiveX. However there are standards
> compliant ways that I use to avoid using a now invalid embed tag. The
> code you get that includes the players is also full of other errors.
> Just take it to the W3C validator to see.
>
> This is the worst example of a page for playing video files that I have
> seen in a long time, and one should avoid it unless you are only using
> a page on a network where you know only recent IE browsers are used.


I find that the above needs elaboration. Since some here do not use
IE6, or who will not be bothered switching to it while reading this
group, I have gone to IE6 so that I could get the source code for your
"moose" video. I then copied and pasted this in the text box at the W3C
validator. I selected the extended interface and selected to show the
source code. I then copied the report and pasted it below so that
everyone in the group can easily see the source code and the error
report. Below this report, I will make some additional comments.

__________________________________________________ ______________________


W3C QA Markup Validation Service
v0.7.2

* Skip Navigation | Home
* About...
* News
* Docs
* Help & FAQ
* Feedback

Jump To:

* Results
* Source Listing

Result: Failed validation, 42 errors
File: upload://Form Submission
Encoding: utf-8
Doctype: HTML 4.01 Frameset
This page is not Valid HTML 4.01 Frameset!

Below are the results of attempting to parse this document with an SGML
parser.

1. Error Line 16, column 27: required attribute "TYPE" not specified
..

<SCRIPT LANGUAGE=JAVASCRIPT>

The attribute given above is required for an element that you've
used, but you have omitted it. For instance, in most HTML and XHTML
document types the "type" attribute is required on the "script" element
and the "alt" attribute is required for the "img" element.

Typical values for type are type="text/css" for <style> and
type="text/javascript" for <script>.


2. Error Line 40, column 6: required attribute "TYPE" not specified
..

<style>


3. Error Line 54, column 29: required attribute "TYPE" not specified
..

<script language="JavaScript">


4. Error Line 186, column 107: document type does not allow element
"BODY" here .

... alink="#0130DD" onLoad="scrollMsg()">

The element named above was found in a context where it is not
allowed. This could mean that you have incorrectly nested elements --
such as a "style" element in the "body" section instead of inside
"head" -- or two elements that overlap (which is not allowed).

One common cause for this error is the use of XHTML syntax in
HTML documents. Due to HTML's rules of implicitly closed elements, this
error can create cascading effects. For instance, using XHTML's
"self-closing" tags for "meta" and "link" in the "head" section of a
HTML document may cause the parser to infer the end of the "head"
section and the beginning of the "body" section (where "link" and
"meta" are not allowed; hence the reported error).


5. Error Line 243, column 36: an attribute specification must start
with a name or name token .

<PARAM NAME="ShowGotoBar" VALUE=0">

An attribute name (and some attribute values) must start with one
of a restricted set of characters. This error usually indicates that
you have failed to add a closing quotation mark on a previous attribute
value (so the attribute value looks like the start of a new attribute)
or have used an attribute that is not defined (usually a typo in a
common attribute name).


6. Error Line 273, column 32: required attribute "TYPE" not
specified .

<p><script Language="JavaScript">


7. Error Line 275, column 233: end tag for element "A" which is not
open .

...p://home.netscape.com\">Click Here</a> to get Netscape
4.</b></font>");

The Validator found an end tag for the above element, but that
element is not currently open. This is often caused by a leftover end
tag from an element that was removed during editing, or by an
implicitly closed element (if you have an error related to an element
being used where it is not allowed, this is almost certainly the case).
In the latter case this error will disappear as soon as you fix the
original problem.

If this error occured in a script section of your document, you
should probably read this FAQ entry.


8. Error Line 275, column 256: end tag for element "B" which is not
open .

...>Click Here</a> to get Netscape 4.</b></font>");


9. Error Line 275, column 263: end tag for element "FONT" which is
not open .

...Here</a> to get Netscape 4.</b></font>");


10. Error Line 281, column 208: there is no attribute "SRC" .

...sc1); window.status = ''"><image src="moose_th.gif"
border="0"></a></center>

You have used the attribute named above in your document, but the
document type you are using does not support that attribute for this
element. This error is often caused by incorrect use of the "Strict"
document type with a document that uses frames (e.g. you must use the
"Transitional" document type to get the "target" attribute), or by
using vendor proprietary extensions such as "marginheight" (this is
usually fixed by using CSS to achieve the desired effect instead).

This error may also result if the element itself is not supported
in the document type you are using, as an undefined element will have
no supported attributes; in this case, see the element-undefined error
message for further information.

How to fix: check the spelling and case of the element and
attribute, (Remember XHTML is all lower-case) and/or check that they
are both allowed in the chosen document type, and/or use CSS instead of
this attribute.


11. Error Line 281, column 230: there is no attribute "BORDER" .

...''"><image src="moose_th.gif" border="0"></a></center>


12. Error Line 281, column 233: element "IMAGE" undefined .

...><image src="moose_th.gif" border="0"></a></center>

You have used the element named above in your document, but the
document type you are using does not define an element of that name.
This error is often caused by:
* incorrect use of the "Strict" document type with a document
that uses frames (e.g. you must use the "Frameset" document type to get
the "<frameset>" element),
* by using vendor proprietary extensions such as "<spacer>"
or "<marquee>" (this is usually fixed by using CSS to achieve the
desired effect instead).
* by using upper-case tags in XHTML (in XHTML attributes and
elements must be all lower-case.


13. Error Line 286, column 232: element "IMAGE" undefined .

...><image src="enter_th.gif" border="0"></a></center>


14. Error Line 290, column 231: element "IMAGE" undefined .

..."><image src="ice1_th.gif" border="0"></a></center>


15. Error Line 294, column 231: element "IMAGE" undefined .

..."><image src="ice2_th.gif" border="0"></a></center>


16. Error Line 298, column 226: element "IMAGE" undefined .

..."><image src="sled_th.gif" border="0"></a></center>


17. Error Line 302, column 225: element "IMAGE" undefined .

...><image src="goose_th.gif" border="0"></a></center>


18. Error Line 306, column 242: element "IMAGE" undefined .

...age src="pillsbury_th.gif" border="0"></a></center>


19. Error Line 314, column 43: element "IMAGE" undefined .

<center><image src="house_b.jpg" border="0"></center>


20. Error Line 319, column 3: document type does not allow element
"LI" here; missing one of "UL", "OL", "DIR", "MENU" start-tag .

<li>

The mentioned element is not allowed to appear in the context in
which you've placed it; the other mentioned elements are the only ones
that are both allowed there and can contain the element mentioned. This
might mean that you need a containing element, or possibly that you've
forgotten to close a previous element.

One possible cause for this message is that you have attempted to
put a block-level element (such as "<p>" or "<table>") inside an inline
element (such as "<a>", "<span>", or "<font>").


21. Error Line 320, column 24: document type does not allow element
"H2" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON"
start-tag .

<font color="orange"><h2>Click to Play a Movie about a
Moose!</h2></li>


22. Error Line 320, column 70: end tag for "FONT" omitted, but its
declaration does not permit this .

...2>Click to Play a Movie about a Moose!</h2></li>

* You forgot to close a tag, or
* you used something inside this tag that was not allowed,
and the validator is complaining that the tag should be closed before
such content can be allowed.

The next message, "start tag was here" points to the particular
instance of the tag in question); the positional indicator points to
where the validator expected you to close the tag.


23. Info Line 320, column 0: start tag was here .

<font color="orange"><h2>Click to Play a Movie about a
Moose!</h2></li>

24. Error Line 324, column 3: document type does not allow element
"LI" here; missing one of "UL", "OL", "DIR", "MENU" start-tag .

<li>


25. Error Line 325, column 21: document type does not allow element
"H2" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON"
start-tag .

<font color="red"><h2>Click to Play Ice Carving Enter
Movie!</h2></li>


26. Error Line 325, column 69: end tag for "FONT" omitted, but its
declaration does not permit this .

...>Click to Play Ice Carving Enter Movie!</h2></li>


27. Info Line 325, column 0: start tag was here .

<font color="red"><h2>Click to Play Ice Carving Enter
Movie!</h2></li>

28. Error Line 330, column 3: document type does not allow element
"LI" here; missing one of "UL", "OL", "DIR", "MENU" start-tag .

<li>


29. Error Line 331, column 24: document type does not allow element
"H2" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON"
start-tag .

<font color="yellow"><h2>Click to Play first Movie about Ice
Carvings</h2></li>


30. Error Line 331, column 78: end tag for "FONT" omitted, but its
declaration does not permit this .

...first Movie about Ice Carvings</h2></li>


31. Info Line 331, column 0: start tag was here .

<font color="yellow"><h2>Click to Play first Movie about Ice
Carvings</h2></li>

32. Error Line 335, column 3: document type does not allow element
"LI" here; missing one of "UL", "OL", "DIR", "MENU" start-tag .

<li>


33. Error Line 336, column 24: document type does not allow element
"H2" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON"
start-tag .

<font color="orange"><h2>Click to Play second Movie about Ice
Carvings</h2></li>


34. Error Line 336, column 79: end tag for "FONT" omitted, but its
declaration does not permit this .

...cond Movie about Ice Carvings</h2></li>


35. Info Line 336, column 0: start tag was here .

<font color="orange"><h2>Click to Play second Movie about Ice
Carvings</h2></li>

36. Error Line 340, column 3: document type does not allow element
"LI" here; missing one of "UL", "OL", "DIR", "MENU" start-tag .

<li>


37. Error Line 341, column 21: document type does not allow element
"H2" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON"
start-tag .

<font color="red"><h2>Click to Play second Movie about Ice
Sleds</h2></li>


38. Error Line 341, column 73: end tag for "FONT" omitted, but its
declaration does not permit this .

...o Play second Movie about Ice Sleds</h2></li>


39. Info Line 341, column 0: start tag was here .

<font color="red"><h2>Click to Play second Movie about Ice
Sleds</h2></li>

40. Error Line 345, column 3: document type does not allow element
"LI" here; missing one of "UL", "OL", "DIR", "MENU" start-tag .

<li>


41. Error Line 346, column 24: document type does not allow element
"H2" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON"
start-tag .

<font color="yellow"><h2>Click to Play Goose Movie!</h2></li>


42. Error Line 346, column 60: end tag for "FONT" omitted, but its
declaration does not permit this .

<font color="yellow"><h2>Click to Play Goose Movie!</h2></li>


43. Info Line 346, column 0: start tag was here .

<font color="yellow"><h2>Click to Play Goose Movie!</h2></li>

44. Error Line 350, column 3: document type does not allow element
"LI" here; missing one of "UL", "OL", "DIR", "MENU" start-tag .

<li>


45. Error Line 351, column 21: document type does not allow element
"H2" here; missing one of "APPLET", "OBJECT", "MAP", "IFRAME", "BUTTON"
start-tag .

<font color="red"><h2>Click to Play Pillsbury Mountain
Movie!</h2></li>


46. Error Line 351, column 70: end tag for "FONT" omitted, but its
declaration does not permit this .

...lick to Play Pillsbury Mountain Movie!</h2></li>


47. Info Line 351, column 0: start tag was here .

<font color="red"><h2>Click to Play Pillsbury Mountain
Movie!</h2></li>

48. Error Line 356, column 31: required attribute "TYPE" not
specified .

<script LANGUAGE = "JavaScript">


49. Error Line 397, column 6: end tag for "HTML" which is not
finished .

</html>

Most likely, You nested tags and closed them in the wrong order.
For example <p><em>...</p> is not acceptable, as <em> must be closed
before <p>. Acceptable nesting is: <p><em>...</em></p>

Another possibility is that you used an element which requires a
child element that you did not include. Hence the parent element is
"not finished", not complete. For instance, <head> generally requires a
<title>, lists (ul, ol, dl) require list items (li, or dt, dd), and so
on.



Source Listing

Below is the source input I used for this validation:

1. <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN"
2. "http://www.w3.org/TR/html4/frameset.dtd">
3.
4. <html>
5. <head>
6. <!-- Part of this example is from JavaScript: The Definitive
Guide, 3rd Edition. -->
7. <!-- That book and this example were Written by David Flanagan.
-->
8. <!-- They are Copyright (c) 1996, 1997, 1998 O'Reilly &
Associates. -->
9. <!-- This example is provided WITHOUT WARRANTY either expressed
or implied.-->
10. <!-- You may study, use, modify, and distribute it for any
purpose, -->
11. <!-- as long as this notice is retained. -->
12.
13. <title>Alaska Virtual tour</title>
14.
15.
16. <SCRIPT LANGUAGE=JAVASCRIPT>
17. <!-- Hide script from old browsers
18. // This script copyright 1997, Tom Negrino and Dori Smith.
19. // This script is from "JavaScript for the WWW, Visual QuickStart
Guide, 2nd Ed."
20. // For more information, see
<http://www.chalcedony.com/javascript/>.
21. // This script may be used and modified, but the copyright notice
must remain intact.
22.
23. myMsg = "Welcome to Alaska Virtual Tour dot
Com.........................."
24. i=0
25.
26. function scrollMsg() {
27. window.status = myMsg.substring(i,myMsg.length) +
myMsg.substring(0,i-1)
28. if (i < myMsg.length) {
29. i++
30. }
31. else{
32. i = 0
33. }
34. setTimeout("scrollMsg()",50)
35. }
36.
37.
38. // End hiding script from old browsers -->
39. </SCRIPT>
40. <style>
41.
42. .fly { color: aqua; font-family: verdana; font-size: 24px;
position: absolute; visibility: hidden; z-index: 2; }
43. .logo { font-family: verdana; font-size: 60px; color: #284327;
position: absolute; top: 0px; left: 80px; visibility: visible; z-index:
2; }
44. .pict2 { font-family: verdana; font-size: 60px; color: #284327;
position: absolute; top: 100px; left: 220px; visibility: visible;
z-index: 1; }
45. .desc { text-align: left; font-family: arial; font-size: 14px;
color: red; position: absolute; top: 600px; left: 190px; width: 500px;
visibility: hidden; z-index: 0; }
46. BODY { <body background="starback2.gif">; }
47. A { color: aqua; }
48. A:HOVER { color: red; text-decoration : none; }
49. A:ACTIVE ( color: red; text-decoration : none; }
50. .abs {position: absolute; color: #FFFFFF; top: 130px; left:
250px; z-index:0;}
51.
52. </style>
53.
54. <script language="JavaScript">
55.
56.
57.
58.
59. function showObject(object) {
60. object.visibility = VISIBLE;
61. }
62.
63.
64. function hideObject(object) {
65. object.visibility = HIDDEN;
66. }
67.
68.
69.
70.
71. function slideLogo(from, to) {
72. if (from < to) {
73. company.top = (from += 10);
74. setTimeout('slideLogo(' + from + ',' + to + ')', 75);
75. }
76. else initObjects();
77. }
78.
79.
80. function rotateObjects() {
81.
82.
83. if (turnoff==1) {
84.
85.
86. for (var i = 0; i < pos.length; i++) {
87.
88. pos[i] += inc; objects[i].visibility = 'visible';
89.
90. objects[i].left = (r * Math.cos(pos[i])) + xoff
91. objects[i].top = (r * Math.sin(pos[i])) + yoff;
92. }
93. rotateTimer = setTimeout("rotateObjects()", 70);
94. }
95.
96.
97. if (turnoff==0) {
98.
99. for (var i = 0; i < pos.length; i++) {
100.
101. pos[i] += inc; objects[i].visibility = 'hidden';
102.
103.
104.
105.
106.
107.
108. }
109.
110. }
111. }
112.
113. function initObjects() {
114. objects = new Array(fly1, fly2, fly3, fly4, fly5, fly6, fly7);
115. pos = new Array();
116. pos[0] = 0;
117. for (var i = 1; i < objects.length; i++) {
118. pos[i] = parseFloat(pos[i - 1] + ((2 * pi) / objects.length));
119. }
120. rotateObjects();
121. }
122. var house;
123. var objects;
124. var pos;
125. var r = 200; // radius
126. var xoff = 330; // x offset
127. var yoff = 250; // y offset
128. var pi = Math.PI; // get pi
129. var inc = pi / 180; // degrees per rotation cycle
130. var objects; // objects to be rotated
131. var pos; // position for objects
132. var turnoff=1;
133.
134. // function setVisibilitymoose() {
135. // turnoff=0;
136. // Player.URL =
"http://easylink.playstream.com/gnewton100/moose/moose.wmv";
137. // setVisibility2();
138. // }
139.
140. function setVisibility3() {
141. turnoff=0;
142. house.visibility = 'hidden';
143. }
144. function setVisibility4() {
145. turnoff=1;
146. initObjects();
147. }
148.
149. function startmeup1_1() {
150. setVisibility3();
151.
document.all.music.filename="http://easylink.playstream.com/gnewton100/moose/moose.wmv";
152. return false;
153. }
154. function startmeup1_2() {
155. setVisibility3();
156.
document.all.music.filename="http://easylink.playstream.com/gnewton100/ice/mov00147.wmv";
157. return false;
158. }
159. function startmeup1_3() {
160. setVisibility3();
161.
document.all.music.filename="http://easylink.playstream.com/gnewton100/ice/mov00162.wmv";
162. return false;
163. }
164. function startmeup1_4() {
165. setVisibility3();
166.
document.all.music.filename="http://easylink.playstream.com/gnewton100/ice/mov00161.wmv";
167. return false;
168. }
169. function startmeup1_5() {
170. setVisibility3();
171.
document.all.music.filename="http://easylink.playstream.com/gnewton100/ice/mov00153.wmv";
172. return false;
173. }
174. function startmeup1_6() {
175. setVisibility3();
176.
document.all.music.filename="http://easylink.playstream.com/gnewton100/goose/goose.wmv";
177. return false;
178. }
179. function startmeup1_7() {
180. setVisibility3();
181.
document.all.music.filename="http://easylink.playstream.com/gnewton100/pillsbury/pillsbury1.wmv";
182. return false;
183. }
184. </script>
185. </head>
186. <body text="#0130DD" bgcolor="#000000" link="#0130DD"
vlink="#006400" alink="#0130DD" onLoad="scrollMsg()">
187.
188. <div class="abs">
189.
190.
191.
192. <OBJECT id=music height=300 width=320
classid=clsid:22D6F312-B0F6-11D0-94AB-0080C74C7E95>
193. <PARAM NAME="AutoStart" VALUE="-1">
194. <PARAM NAME="Balance" VALUE="0">
195. <PARAM NAME="DisplaySize" VALUE="0">
196. <PARAM NAME="Filename" VALUE="">
197. <PARAM NAME="Mute" VALUE="0">
198. <PARAM NAME="SelectionStart" VALUE="-1">
199. <PARAM NAME="SelectionEnd" VALUE="-1">
200. <PARAM NAME="ShowControls" VALUE="false">
201. <PARAM NAME="ShowAudioControls" VALUE="true">
202. <PARAM NAME="ShowDisplay" VALUE="0">
203. <PARAM NAME="ShowPositionControls" VALUE="-1">
204. <PARAM NAME="Volume" VALUE="0">
205. <PARAM NAME="AudioStream" VALUE="-1">
206. <PARAM NAME="AutoSize" VALUE="0">
207. <PARAM NAME="AnimationAtStart" VALUE="-1">
208. <PARAM NAME="AllowScan" VALUE="-1">
209. <PARAM NAME="AllowChangeDisplaySize" VALUE="-1">
210. <PARAM NAME="AutoRewind" VALUE="1">
211. <PARAM NAME="BaseURL" VALUE="">
212. <PARAM NAME="BufferingTime" VALUE="5">
213. <PARAM NAME="CaptioningID" VALUE="">
214. <PARAM NAME="ClickToPlay" VALUE="-1">
215. <PARAM NAME="CursorType" VALUE="0">
216. <PARAM NAME="CurrentPosition" VALUE="-1">
217. <PARAM NAME="CurrentMarker" VALUE="0">
218. <PARAM NAME="DefaultFrame" VALUE="">
219. <PARAM NAME="DisplayBackColor" VALUE="0">
220. <PARAM NAME="DisplayForeColor" VALUE="16777215">
221. <PARAM NAME="DisplayMode" VALUE="0">
222. <PARAM NAME="Enabled" VALUE="-1">
223. <PARAM NAME="EnableContextMenu" VALUE="-1">
224. <PARAM NAME="EnablePositionControls" VALUE="-1">
225. <PARAM NAME="EnableFullScreenControls" VALUE="0">
226. <PARAM NAME="EnableTracker" VALUE="-1">
227. <PARAM NAME="InvokeURLs" VALUE="-1">
228. <PARAM NAME="Language" VALUE="-1">
229. <PARAM NAME="PlayCount" VALUE="1">
230. <PARAM NAME="PreviewMode" VALUE="0">
231. <PARAM NAME="Rate" VALUE="1">
232. <PARAM NAME="SAMILang" VALUE="">
233. <PARAM NAME="SAMIStyle" VALUE="">
234. <PARAM NAME="SAMIFileName" VALUE="">
235. <PARAM NAME="SendOpenStateChangeEvents" VALUE="-1">
236. <PARAM NAME="SendWarningEvents" VALUE="-1">
237. <PARAM NAME="SendErrorEvents" VALUE="-1">
238. <PARAM NAME="SendKeyboardEvents" VALUE="0">
239. <PARAM NAME="SendMouseClickEvents" VALUE="0">
240. <PARAM NAME="SendMouseMoveEvents" VALUE="0">
241. <PARAM NAME="SendPlayStateChangeEvents" VALUE="-1">
242. <PARAM NAME="ShowCaptioning" VALUE="0">
243. <PARAM NAME="ShowGotoBar" VALUE=0">
244. <PARAM NAME="ShowStatusBar" VALUE="true">
245. <PARAM NAME="ShowTracker" VALUE="-1">
246. <PARAM NAME="TransparentAtStart" VALUE="false">
247. <PARAM NAME="VideoBorderWidth" VALUE="0">
248. <PARAM NAME="VideoBorderColor" VALUE="0">
249. <PARAM NAME="VideoBorder3D" VALUE="0">
250. <PARAM NAME="WindowlessVideo" VALUE="0">
251. </OBJECT>
252.
253.
254. <BR />
255. Right click in video after video starts to control player.
256. </div>
257.
258.
259.
260.
261.
262.
263.
264.
265.
266.
267.
268.
269.
270.
271.
272. <center>
273. <p><script Language="JavaScript">
274. if (navigator.appVersion < "4") {
275. document.write("<font color=\"#FFFFFF\" size=\"2\"
face=\"verdana\"><b>You really ought to upgrade to a new browser. You
are really missing out on a lot without version 4 browsers. <a
href=\"http://home.netscape.com\">Click Here</a> to get Netscape
4.</b></font>");
276. }
277. </script>
278. </center>
279.
280. <div id="fly1" class="fly">
281. <center><a href="javascript:void('')" onclick="startmeup1_1();
return false" onmouseover="showObject(desc1); window.status='Movie
about a Moose'" onMouseOut="hideObject(desc1); window.status =
''"><image src="moose_th.gif" border="0"></a></center>
282. </div>
283.
284.
285. <div id="fly2" class="fly">
286. <center><a href="javascript:void('')" onclick="startmeup1_2();
return false" onmouseover="showObject(desc2); window.status='Enter Ice
Carvings'" onMouseOut="hideObject(desc2); window.status = ''"><image
src="enter_th.gif" border="0"></a></center>
287. </div>
288.
289. <div id="fly3" class="fly">
290. <center><a href="javascript:void('')" onclick="startmeup1_3();
return false" onmouseover="showObject(desc3); window.status='Ice
Carvings No. 1'" onMouseOut="hideObject(desc3); window.status =
''"><image src="ice1_th.gif" border="0"></a></center>
291. </div>
292.
293. <div id="fly4" class="fly">
294. <center><a href="javascript:void('')" onclick="startmeup1_4();
return false" onmouseover="showObject(desc4); window.status='Ice
Carvings No. 2'" onMouseOut="hideObject(desc4); window.status =
''"><image src="ice2_th.gif" border="0"></a></center>
295. </div>
296.
297. <div id="fly5" class="fly">
298. <center><a href="javascript:void('')" onclick="startmeup1_5();
return false" onmouseover="showObject(desc5); window.status='Ice Sled
Ride'" onMouseOut="hideObject(desc5); window.status = ''"><image
src="sled_th.gif" border="0"></a></center>
299. </div>
300.
301. <div id="fly6" class="fly">
302. <center><a href="javascript:void('')" onclick="startmeup1_6();
return false" onmouseover="showObject(desc6); window.status='Goose
Movie'" onMouseOut="hideObject(desc6); window.status = ''"><image
src="goose_th.gif" border="0"></a></center>
303. </div>
304.
305. <div id="fly7" class="fly">
306. <center><a href="javascript:void('')" onclick="startmeup1_7();
return false" onmouseover="showObject(desc7); window.status='Pillsbury
Mountain Movie'" onMouseOut="hideObject(desc7); window.status =
''"><image src="pillsbury_th.gif" border="0"></a></center>
307. </div>
308.
309. <div id="company" class="logo">
310. <center><font face="Serpentine"><font
color="#0130DD">alaskavirtualtour.com</font></font></center>
311. </div>
312.
313. <div id="house" class="pict2">
314. <center><image src="house_b.jpg" border="0"></center>
315. </div>
316.
317.
318. <div id="desc1" class="desc">
319. <li>
320. <font color="orange"><h2>Click to Play a Movie about a
Moose!</h2></li>
321. </div>
322.
323. <div id="desc2" class="desc">
324. <li>
325. <font color="red"><h2>Click to Play Ice Carving Enter
Movie!</h2></li>
326. </div>
327.
328. <div id="desc3" class="desc">
329.
330. <li>
331. <font color="yellow"><h2>Click to Play first Movie about Ice
Carvings</h2></li>
332. </div>
333.
334. <div id="desc4" class="desc">
335. <li>
336. <font color="orange"><h2>Click to Play second Movie about Ice
Carvings</h2></li>
337. </div>
338.
339. <div id="desc5" class="desc">
340. <li>
341. <font color="red"><h2>Click to Play second Movie about Ice
Sleds</h2></li>
342. </div>
343.
344. <div id="desc6" class="desc">
345. <li>
346. <font color="yellow"><h2>Click to Play Goose Movie!</h2></li>
347. </div>
348.
349. <div id="desc7" class="desc">
350. <li>
351. <font color="red"><h2>Click to Play Pillsbury Mountain
Movie!</h2></li>
352. </div>
353.
354.
355.
356. <script LANGUAGE = "JavaScript">
357.
358.
359.
360. var isNS = (navigator.appName == "Netscape" &&
parseInt(navigator.appVersion) >= 4);
361.
362. var HIDDEN = (isNS) ? 'hide' : 'hidden';
363. var VISIBLE = (isNS) ? 'show' : 'visible';
364.
365. var fly1 = (isNS) ? document.fly1 : document.all.fly1.style;
366. var fly2 = (isNS) ? document.fly2 : document.all.fly2.style;
367. var fly3 = (isNS) ? document.fly3 : document.all.fly3.style;
368. var fly4 = (isNS) ? document.fly4 : document.all.fly4.style;
369. var fly5 = (isNS) ? document.fly5 : document.all.fly5.style;
370. var fly6 = (isNS) ? document.fly6 : document.all.fly6.style;
371. var fly7 = (isNS) ? document.fly7 : document.all.fly7.style;
372.
373. var company = (isNS) ? document.company :
document.all.company.style;
374. var desc1 = (isNS) ? document.desc1 : document.all.desc1.style;
375. var desc2 = (isNS) ? document.desc2 : document.all.desc2.style;
376. var desc3 = (isNS) ? document.desc3 : document.all.desc3.style;
377. var desc4 = (isNS) ? document.desc4 : document.all.desc4.style;
378. var desc5 = (isNS) ? document.desc5 : document.all.desc5.style;
379. var desc6 = (isNS) ? document.desc6 : document.all.desc6.style;
380. var desc7 = (isNS) ? document.desc7 : document.all.desc7.style;
381. var house = (isNS) ? document.company : document.all.house.style;
382. slideLogo(0, 500);
383. // slideHome(0, 200);
384.
385.
386. </script>
387.
388.
389.
390.
391.
392.
393.
394.
395.
396. </body>
397. </html>

Valid XHTML 1.0! The W3C Validator Team

__________________________________________________ ____________________

The W3C is supported by many computer companies since most see the need
for standards. In fact Microsoft likely contributes more money to the
W3C than any other company. It also has people on many of the W3C
committees. Unfortunately, they have not brought their IE6 browser
fully up to standards yet, and the IE7 appears to be a stop-gap.
Microsoft has done some browser work for small devices, etc since they
released the IE6, but for years they did little for the full PC version
of IE6. In the meantime other browser providers moved ahead. The
problem is likely that Microsoft diverted most of their programming
experts to the new OS that has been delayed many times because of
problems, and it has been about 5 years since the XP OS was introduced.

Lines 6-8. Your reference is way out of date. Javascript has changed a
lot since the 90s. I have the 2002 4'th ed. by Flanagan, but even it is
now somewhat out of date. You will find discussions of many of the
newer aspects of javascript in the FAQs for this group.

Line 151 and elsewhere. You use document.all rather than the standard
document.getElementById. The document.all and document.layers notation
were non official codes uses in the browser war era at the time when
IE4 and Netscape browsers were the most recent things. Recent Microsoft
browsers will support document.getElementById, so there is no reason to
use document.all and thus exclude most other moder browsers. One
exception is that Opera will also support document.all as well as the
now standard document.getElementById.

If some of the other errors are not apparent, you can find discussion
of some of them in the FAQs for this group, and many people who post
here likely can answer you concerning them.

It really is no more trouble to write modern code for video than it is
to write outmoded code. However nearly everything in the computer field
changes rapidly, so one has to keep up to date.

Since you are so fond of Microsoft, I am surprised that you used
Javascript rather than Microsoft's version called JScript. I still see
this used a bit, but mainly by Microsoft employees.

I did find your videos well photographed and interesting viewing. Thus
I do hope you will be able to update the code for the page in the
future, if you can ever find time.


Randy Webb 03-28-2006 09:17 AM

Re: video in javascript
 
electrician@electrician.com said the following on 3/27/2006 4:35 AM:
> <This is the worst example of a page for playing video files that I
> have
> seen in a long time, and one should avoid it unless you are only using
> a page on a network where you know only recent IE browsers are used.>
>
>
> The fact is 98 per cent of the Internet users use IE5 or better. No
> private network is required.
> Click on my webstat counter at the bottom electrician.com and read the
> stats for about a million hits.


Everything in that paragraph is useless though. First, 98% of the
Internet doesn't use IE5 or better. The percentage of IE5 or better
users is precisely ~94.13242%

Second, webstat counters on a site such as yours is completely useless
if you want to argue about usage.

> If you do not use IE 5+ you are not in compliance with 98 percent of
> the users of my sites.


Are we talking about the general Internet users or the users of your
site? The audience is totally different.

> I simply don't have the time to mess with the Netscape, Firefox, and
> Opera minority.


And that is your choice to make.

> As far as I am concerned Microsoft is the standard bearer, not the W3C people.


Ironically, I agree with that but not for the reasons you think I do.

> We have all seen where Netscape went by being W3C compliant.


Being W3C compliant is not what led to the downfall of Netscape. AOL
buying Netscape was it's downfall.

> I wrote several JavaScript programs from 1996 to 1999.


It doesn't surprise me that it would take you three years to write
several scripts.

> Then after spending six weeks writing a program would have to spend another
> two weeks making it compatible with Netscape.


OK, 6 weeks to make it work in IE and only 2 weeks to make it work in
Netscape and you say that NS was the trouble browser?

> Never again! Hey if you don't want to use IE go somewhere else.
> The Internet world will go on spinning right on by you.


For a few more years anyway.
--
Randy
comp.lang.javascript FAQ - http://jibbering.com/faq & newsgroup weekly
Javascript Best Practices - http://www.JavascriptToolbox.com/bestpractices/


All times are GMT. The time now is 07:41 AM.

Powered by vBulletin®. Copyright ©2000 - 2014, vBulletin Solutions, Inc.
SEO by vBSEO ©2010, Crawlability, Inc.