www.webdeveloper.com
Results 1 to 5 of 5

Thread: Help me with this rollover

  1. #1
    Join Date
    Apr 2005
    Location
    Leonardtown MD
    Posts
    31

    Question Help me with this rollover

    I am trying to get this rollover with fade to work. I forget exactly where I copied the javascript from but it worked before I modifed it. Can anyone help me troubleshot this problem?
    Thanks

    Here is the code I have so far:
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/transitional.dtd">

    <html>

    <head>

    <title> Welcome to Howling Wolf Studios </title>

    <HEAD>

    <SCRIPT LANGUAGE="JavaScript">

    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->

    <!-- Begin
    var maximages = 10; // how many fade images do you have?
    var fadespeed = 125; // fade frame time in milliseconds; 125 = 125 ms

    var fadeintimer;
    var fadeouttimer;
    var fadeincount = 0;
    var fadeoutcount = maximages-1;
    var fadearray = new Array(maximages); // enter all the fade images here
    // the first item should be 0, then numbered through 1 less than your maximages

    fadearray[0] = "images/NewWolfLogo.jpg";
    fadearray[1] = "images/NewWolfLogoFade00.jpg";
    fadearray[2] = "images/NewWolfLogoFade01.jpg";
    fadearray[3] = "images/NewWolfLogoFade02.jpg";
    fadearray[4] = "images/NewWolfLogoFade03.jpg";
    fadearray[5] = "images/NewWolfLogoFade04.jpg";
    fadearray[6] = "images/NewWolfLogoFade05.jpg";
    fadearray[7] = "images/NewWolfLogoFade06.jpg";
    fadearray[8] = "images/NewWolfLogoFade07.jpg";
    fadearray[9] = "images/NewWolfLogoFade08.jpg";
    fadearray[10] = "images/NewWolfLogoFade09.jpg";


    for (var i = 0; i < maximages; i++) {
    eval('pic' + i + ' = new Image();');
    eval('pic' + i + '.src = fadearray[i];'); // preloads fade images
    }
    function fade_in() {
    clearTimeout(fadeouttimer);
    document.images['fade-pic'].src = fadearray[fadeincount];
    if (fadeincount != maximages-1) {
    fadeincount++;
    fadeintimer = setTimeout('fade_in()', fadespeed);
    }
    else {
    clearTimeout(fadeintimer);
    fadeincount = 0;
    }
    }
    function fade_out() {
    clearTimeout(fadeintimer);
    document.images['fade-pic'].src = fadearray[fadeoutcount];
    if (fadeoutcount != 0) {
    fadeoutcount--;
    fadeouttimer = setTimeout('fade_out()', fadespeed);
    }
    else {
    clearTimeout(fadeouttimer);
    fadeoutcount = maximages-1;
    }
    }
    // End -->
    </script>

    </head>
    <body>
    <body bgcolor="#000000" text="FF0000">
    <font face= "Arial"size="+5">
    <b>
    <i>
    <div align="center"
    Welcome to Howling Wolf Studios
    </font>
    </div>
    <br>
    </b> </i>

    <center>
    <a href="mailto:jbock@howlingwolfstudios.net" onmouseover="fade_in()" onmouseout="fade_out()">
    <img src="images/NewWolfLogo.jpg" border=0><br>
    <img name="HWSLogo" height=457 width=445 border=0 src="images/NewWolfLogo.jpg"><br>
    <img src="images/NewWolfLogoFade09.jpg" border=0><br></a>

    </center>

    <p><center>
    <font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
    by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
    </center><p>

    </body>
    </html>
    "Time is like a flowing river...history repeats itself:
    From Secret of Mana SNES

  2. #2
    Join Date
    Jul 2004
    Location
    Canada, eh
    Posts
    784
    you don't seem to have an image with id="fade-pic" anywhere, so the code is unable to find document.images["fade-pic"]
    Kids, kids... you tried your best, and you failed miserably; the lesson is: never try.

  3. #3
    Join Date
    Apr 2005
    Location
    Leonardtown MD
    Posts
    31
    So I would just need to rename the image "fade-pic" to my first image or my last image?
    Thanks Again
    "Time is like a flowing river...history repeats itself:
    From Secret of Mana SNES

  4. #4
    Join Date
    Jul 2004
    Location
    Canada, eh
    Posts
    784
    well, whichever img tag you want to change should have the name/id "fade-pic"
    Kids, kids... you tried your best, and you failed miserably; the lesson is: never try.

  5. #5
    Join Date
    Apr 2005
    Location
    Leonardtown MD
    Posts
    31

    Question Ok another Question

    Ok I have gotten the rollover to work. But it is showing the first and the last image in addition to the image with the rollover. Here is the code.
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
    "http://www.w3.org/TR/xhtml1/DTD/transitional.dtd">

    <html> <!-- Frames the HTML Page -->

    <head> <!-- Title Open Command -->

    <title> Welcome to Howling Wolf Studios </title> <!-- Title at top of browser -->

    <HEAD>

    <SCRIPT LANGUAGE="JavaScript">

    <!-- This script and many more are available free online at -->
    <!-- The JavaScript Source!! http://javascript.internet.com -->

    <!-- Begin
    var maximages = 11; // how many fade images do you have?
    var fadespeed = 125; // fade frame time in milliseconds; 125 = 125 ms

    var fadeintimer;
    var fadeouttimer;
    var fadeincount = 0;
    var fadeoutcount = maximages-1;
    var fadearray = new Array(maximages); // enter all the fade images here
    // the first item should be 0, then numbered through 1 less than your maximages

    fadearray[0] = "images/NewWolfLogo.jpg";
    fadearray[1] = "images/NewWolfLogoFade00.jpg";
    fadearray[2] = "images/NewWolfLogoFade01.jpg";
    fadearray[3] = "images/NewWolfLogoFade02.jpg";
    fadearray[4] = "images/NewWolfLogoFade03.jpg";
    fadearray[5] = "images/NewWolfLogoFade04.jpg";
    fadearray[6] = "images/NewWolfLogoFade05.jpg";
    fadearray[7] = "images/NewWolfLogoFade06.jpg";
    fadearray[8] = "images/NewWolfLogoFade07.jpg";
    fadearray[9] = "images/NewWolfLogoFade08.jpg";
    fadearray[10] = "images/NewWolfLogoFade09.jpg";


    for (var i = 0; i < maximages; i++) {
    eval('pic' + i + ' = new Image();');
    eval('pic' + i + '.src = fadearray[i];'); // preloads fade images
    }
    function fade_in() {
    clearTimeout(fadeouttimer);
    document.images['HWSLogo'].src = fadearray[fadeincount];
    if (fadeincount != maximages-1) {
    fadeincount++;
    fadeintimer = setTimeout('fade_in()', fadespeed);
    }
    else {
    clearTimeout(fadeintimer);
    fadeincount = 0;
    }
    }
    function fade_out() {
    clearTimeout(fadeintimer);
    document.images['HWSLogo'].src = fadearray[fadeoutcount];
    if (fadeoutcount != 0) {
    fadeoutcount--;
    fadeouttimer = setTimeout('fade_out()', fadespeed);
    }
    else {
    clearTimeout(fadeouttimer);
    fadeoutcount = maximages-1;
    }
    }
    // End -->
    </script>

    </head> <!-- Title Close Command -->

    <body> <!-- Frames the content of the page -->

    <body bgcolor="#000000" text="FF0000"> <!-- Background color and text color -->

    <font face= "Arial"size="+5"> <!-- Text Formatting -->

    <b>
    <i>
    <div align="center" <!-- Alignment to center -->

    Welcome to Howling Wolf Studios

    </font>

    </div>

    <br>
    <center>
    <a href="mailto:jbock@howlingwolfstudios.net" onmouseover="fade_in()" onmouseout="fade_out()">

    <img name="HWSLogo" height=457 width=445 border=0 src="images/NewWolfLogo.jpg"><br>


    </center>

    <p><center>
    <font face="arial, helvetica" size="-2">Free JavaScripts provided<br>
    by <a href="http://javascriptsource.com">The JavaScript Source</a></font>
    </center><p>
    <br>
    <br>
    <br>
    <br>
    <br>
    <br>

    <br>
    <br>
    </font>

    <font face= "Arial"size="+1"> <!-- Text Formatting -->

    This is my group project called Deadfall done in Alias' Maya. The assignment was to design a 30 second animation that flies around the capture the flag level we designed and built. I worked on everything on the red base minus the three gun turrents. To download the file right mouse click and hit "save target as".
    <br>
    <br>
    <a href="images/deadfall.mov"><font size="+1" color="#FFFFFF"> <u> Click here to download Deadfall.</u></font></a>
    <br>
    <br>
    This is my first project done in my Interactive Design Class. The assignment was to make an animation from the Shockwave Rider excerpt, which you can <A HREF="html/Shockwave.html "font size="+1" color="#FFFFFF" target="_blank" ><font size="+1" color="#FFFFFF"><u> read here</u></font></a>. To download the file right mouse click and hit "save target as".
    <br>
    <br>
    <a href="images/Shockwave.mov"><font size="+1" color="#FFFFFF"><u> Click here to download the Shockwave Rider.</u></font></a>
    <br>
    <font face= "Arial"size="+1"> <!-- Text Formatting -->
    <br>
    Don't have Quicktime?
    <a href="http://www.apple.com/quicktime/download/index.html"target="_blank"> <font size="+1" color="#FFFFFF" ><u>
    <br>
    Download it here.</u></a>
    <br>
    <a href="http://www.apple.com/quicktime/download/index.html"><img src="images/getquicktime.gif" hspace="15" vspace="15" border="0" ></u></font></a>

    <br>
    <br>



    <A HREF="mailto:jbock@howlingwolfstudios.net"> <font size="+1" color="#FFFFFF"><u> Contact Me</A>
    <!-- Text Formatting -->
    </i>
    </font>

    </body>

    </html>
    "Time is like a flowing river...history repeats itself:
    From Secret of Mana SNES

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center

"

"

X vBulletin 4.2.2 Debug Information

  • Page Generation 0.25424 seconds
  • Memory Usage 2,899KB
  • Queries Executed 13 (?)
More Information
Template Usage (32):
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_global_above_footer
  • (1)ad_global_below_navbar
  • (1)ad_global_header1
  • (1)ad_global_header2
  • (1)ad_navbar_below
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (1)ad_thread_first_post_content
  • (1)ad_thread_last_post_content
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)headinclude_bottom
  • (5)memberaction_dropdown
  • (1)navbar
  • (4)navbar_link
  • (1)navbar_moderation
  • (1)navbar_noticebit
  • (1)navbar_tabs
  • (2)option
  • (5)postbit
  • (5)postbit_onlinestatus
  • (5)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available (6):
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files (26):
  • ./showthread.php
  • ./global.php
  • ./includes/class_bootstrap.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/functions_navigation.php
  • ./includes/class_friendly_url.php
  • ./includes/class_hook.php
  • ./includes/class_bootstrap_framework.php
  • ./vb/vb.php
  • ./vb/phrase.php
  • ./includes/functions_facebook.php
  • ./includes/functions_calendar.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_notice.php
  • ./packages/vbattach/attach.php
  • ./vb/types.php
  • ./vb/cache.php
  • ./vb/cache/db.php
  • ./vb/cache/observer/db.php
  • ./vb/cache/observer.php 

Hooks Called (70):
  • init_startup
  • friendlyurl_resolve_class
  • init_startup_session_setup_start
  • database_pre_fetch_array
  • database_post_fetch_array
  • init_startup_session_setup_complete
  • global_bootstrap_init_start
  • global_bootstrap_init_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • load_show_variables
  • load_forum_show_variables
  • global_state_check
  • global_bootstrap_complete
  • global_start
  • style_fetch
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • strip_bbcode
  • friendlyurl_clean_fragment
  • friendlyurl_geturl
  • forumjump
  • cache_templates
  • cache_templates_process
  • template_register_var
  • template_render_output
  • fetch_template_start
  • fetch_template_complete
  • parse_templates
  • fetch_musername
  • notices_check_start
  • notices_noticebit
  • process_templates_complete
  • friendlyurl_redirect_canonical
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • bbcode_parse_start
  • postbit_imicons
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • memberaction_dropdown
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • build_navigation_data
  • build_navigation_array
  • check_navigation_permission
  • process_navigation_links_start
  • process_navigation_links_complete
  • set_navigation_menu_element
  • build_navigation_menudata
  • build_navigation_listdata
  • build_navigation_list
  • set_navigation_tab_main
  • set_navigation_tab_fallback
  • navigation_tab_complete
  • fb_like_button
  • showthread_complete
  • page_templates