Results 1 to 10 of 10

Thread: JScript for rollover on pictures?

  1. #1
    Join Date
    Aug 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default JScript for rollover on pictures?

    Forum,

    I need help!

    I have a background image in black and white. I want to be able to move my cursor over a particular part of the image and have it come up in color and also be a link to another page. In other words, the black and white picture is of an art studio. When the customer moves his mouse over the image to a certain spot, which will have text on it, I'd like for that particular "spot" to come up in color, but the rest will remain in black and white.

    Is that possible?

    Thanks in advance!

  2. #2
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    I'd use Flash, if I were you.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  3. #3
    Join Date
    Aug 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default Rollover...

    Unfortunately, I don't know how to use Flash yet.


  4. #4
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    If you really want to do this, I suggest you learn Flash or Java. To do this in DHTML would be difficult or impossible.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  5. #5
    Join Date
    Aug 2005
    Posts
    6
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Ok...thanks for your help anyway!


  6. #6
    Join Date
    Aug 2005
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    Try these (hope it helps):

    <script language="JavaScript" type="text/JavaScript">
    <!--



    function MM_preloadImages() { //v3.0
    var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
    }
    //-->
    </script>
    <body onLoad="MM_preloadImages('your_mouse_over_picture_path.jpg')">
    <a href="when_you_click_on_it_link.html" target="_self"><img src="picture_when_no_mouse_over.jpg" name="Name _of_the_pic" width="100" height="100" border="0"></a>

  7. #7
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    No, this wasn't what s/he wanted to do.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  8. #8
    Join Date
    Aug 2005
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I think it is doable, the only thing he/she ll need to do is cut the picture in parts put rollover on parts he wants and than puzzle the pices back together. I did that myself once, and it is realy not that hard. But, yeah I agree with you flash would be the smartest choice.

  9. #9
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    Not really practical, though, and it introduces a whole ream of other problems. Some graphics suites will even cut the image for you.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends français | entiendo español | tôi ít hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  10. #10
    Join Date
    Aug 2005
    Posts
    21
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Default

    I was useing Fireworks today and I think the best and easyest way to do what he wants is "Rectangle Hotspot Tool"

    Read more here:

    http://ict.cas.psu.edu/Training/inst...rks/slice.html

Bookmarks

Posting Permissions

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