Reply
Slideshow script doesn't work in Opera
Old 06-04-2006, 12:33 PM Slideshow script doesn't work in Opera
Experienced Talker

Posts: 32
Location: Indiana, USA
I have a script that runs a slideshow and it works in both IE & FF, but not in Opera. I have run the Javascript console in Opera, but since I'm still learning JS, it's like trying to read Greek. Can someone walk me through this debugger and explain why this script does not work in Opera?

Here's the script:
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http://www.w3c.org/TR/xhtml1/DTD/xhtml1-strict.dtd">

<html>

<head>

<script>
    // (C) 2000 www.CodeLifter.com
    // http://www.codelifter.com
    // Free for all users, but leave in this  header
    // NS4-6,IE4-6
    // Fade effect only in IE; degrades gracefully

    // =======================================
    // set the following variables
    // =======================================

    // Set slideShowSpeed (milliseconds)
    var slideShowSpeed = 4000

    // Duration of crossfade (seconds)
    var crossFadeDuration = 2

    // Specify the image files
    var Pic = new Array() // don't touch this
    // to add more images, just continue
    // the pattern, adding to the array below

    Pic[0] = 'mmMissy062798(1).JPG'
    Pic[1] = 'mmMissy062798(2).JPG'
    Pic[2] = 'mmMissy062798(3).JPG'
    Pic[3] = 'mmMissy062798(4).JPG'
    Pic[4] = 'mmMissy071303(1).JPG'
    Pic[5] = 'mmMissy071303(2).JPG'
    Pic[6] = 'mmMissy071303(3).JPG'
    Pic[7] = 'mmMissy071303(4).JPG'
    Pic[8] = 'mmMissy071303(5).JPG'
    Pic[9] = 'mmMissy071303(6).JPG'
    Pic[10] = 'mmMissy080302.JPG'
    Pic[11] = 'mmMissy110403(1).jpg'
    Pic[12] = 'mmMissy110403(2).jpg'
    Pic[13] = 'mmMissy110403(3).jpg'
    Pic[14] = 'mmMissy110403(4).JPG'
    Pic[15] = 'mmMissy110403(5).JPG'
    Pic[16] = 'mmMissy110403(6).JPG'
    Pic[17] = 'mmMissyWaiting.jpg'
    Pic[18] = 'mmPrettyGirl.jpg'
    Pic[19] = 'missy-endshow.jpg';
        
    // =======================================
    // do not edit anything below this line
    // =======================================

    var t
    var j = 0
    var p = Pic.length

    var preLoad = new Array()
    for (i = 0; i < p; i++){
    preLoad[i] = new Image()
    preLoad[i].src = Pic[i]
    }

    function runSlideShow(){
        if (document.all){
        document.images.SlideShow.style.filter="blendTrans(duration=2)"
        document.images.SlideShow.style.filter="blendTrans(duration=crossFadeDuration)"
        document.images.SlideShow.filters.blendTrans.Apply()      
        }
    document.images.SlideShow.src = preLoad[j].src
        if (document.all){
        document.images.SlideShow.filters.blendTrans.Play()
        }
    j = j + 1
    //  remove comment if you want slideshow to loop, leave comment in for show to play once
    //  commented out > >  if (j > (p - 1)) j=0   
    
    if (j <=(p-1))
      t = setTimeout('runSlideShow()', slideShowSpeed)
    }
</script>


</head>

<body onload="runSlideShow()">

<table>
<tr><td id="VU" height=310 width=415>
        <img src="mmMissy062798(1).JPG" name='SlideShow' width="410" height="308"></td></tr>
</table>

<br />

<div class="info">
    <span>This show will start automatically, and will stop when finished.  Use the "X" at the top of the window to close.</span>
</div>

<br />

</body>

</html>
And this is the error messgae from Opera:

Code:
Missy's Photo Slideshow
http://testdomain.ftwin.com/albums/missy/missy-slideshow.html
Event thread: load
Error:
name: TypeError
message: Statement on line 63: Could not convert undefined or null to object
Backtrace:
  Line 63 of inline#1 script in http://testdomain.ftwin.com/albums/missy/missy-slideshow.html
    document.images.SlideShow.filters.blendTrans.Apply();
  Line 1 of  script 
    runSlideShow();
  At unknown location
    [statement source code not available]
Any help would be most appreciated.
__________________
They have computers, and they may have other weapons of mass destruction. - - Janet Reno
Smoking Man is offline
Reply With Quote
View Public Profile Visit Smoking Man's homepage!
 
When You Register, These Ads Go Away!
Reply     « Reply to Slideshow script doesn't work in Opera
 

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off




   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML

 


Page generated in 0.10455 seconds with 12 queries