Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 16
  1. #1
    New Coder
    Join Date
    Jan 2003
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    onMouseover command??

    I had an idea to have a nice animated gif pop up when the user had their mouse over a specific button. and then play another gif (possibly the first one in reverse) when the mouse leaves the button.

    how would i go about doing this?

    ~PlystirE~
    CHAOS! DISORDER! MAYHEM!
    My job here is obviously done.
    ~ Plystire

  • #2
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    this is the mouseover event inside of an anchor link.
    button 2 is your mouseover image, button 1 is the original.
    change "image" in the code to another variable if you use it more than once in one page.
    this isnt a very effecient way of going about it, but its simple.
    Code:
    <a onmouseover="document.image.src='button2.gif'"
    onmouseout="document.image.src='button1.gif'">
    <img src="button1.gif" border="0" name="image"></a>

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #3
    New Coder
    Join Date
    Jan 2003
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Lightbulb idea

    ok i made a gif the way i want it, but it took me a LONG time to make it...i would hate to make one like it for EVERYsingle button...

    i want to make a function that will...

    1. resize an image to the size i want
    2. draw green and darkgreen lines towards the corners of that image

    thx

    ~PlystirE~
    CHAOS! DISORDER! MAYHEM!
    My job here is obviously done.
    ~ Plystire

  • #4
    New Coder
    Join Date
    Jan 2003
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Thumbs down

    so no one wants to help me, or does no one know how to do this?

    i really need this to finish my site. I have not found a tutorial anywhere discussing EXACT image location and/or how to do this all using javascript.

    ~PlystirE~
    CHAOS! DISORDER! MAYHEM!
    My job here is obviously done.
    ~ Plystire

  • #5
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    josh maybe i just misunderstand you
    lines around the corners? how about a border?

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #6
    New Coder
    Join Date
    Jan 2003
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    not "around" corners...i want a line to be drawn...ANYwhere for all i care...just as long as i know how it was done

    anyone know programming? like BASIC? something like

    LINE (x,y)-(x2,y2), color

    which would draw a line from x,y to x2,y2 which is colored whatever color was put in the color spot

    hope this helps to clear things up

    ~PlystirE~
    CHAOS! DISORDER! MAYHEM!
    My job here is obviously done.
    ~ Plystire

  • #7
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    you could create a transparent image of a line and absolutely position it down to the pixel.

    or maybe you could learn something from this script?
    http://www.dynamicdrive.com/dynamici.../crosshair.htm

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #8
    New Coder
    Join Date
    Jan 2003
    Posts
    11
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i wasn't really hoping to have to create an image for each line

    what if i wanted the line to go from the top left to the bottom right or the top right to the bottom left? iw ould have to make an image for each case

    i was going to have my image loop through a for loop or two and have it resized accroding to those...then have it draw the line to the new corner locations of the image.

    /_/
    |_|/

    i guess sorta like that

    cept better looking

    ~PlystirE~
    CHAOS! DISORDER! MAYHEM!
    My job here is obviously done.
    ~ Plystire

  • #9
    Regular Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    197
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I have done stuff like that with netpbm and ImageMajick but these are unix commands, i used perl to do this stuff

    Grab any (gif) image off the web and
    cut,
    resize,
    paste text or another image inside it,
    change color map and set transparency color.

    If you havent got server side access, you gonna have to use something else but if you have access to a server this is a solution.
    ez

    oh and if you want to reconstuct your gifs into animatied gifs you might wanna try gifmerge which is also a unix command line animated gif constructor which if i recall supports transparent colors...
    Last edited by ez4ne12c; 01-17-2003 at 03:33 AM.
    Animation Rule #64
    Poor quality images are often artistic,
    Poor quality sound is ALWAYS annoying.

  • #10
    Senior Coder
    Join Date
    Jul 2002
    Posts
    1,628
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by ez4ne12c

    If you havent got server side access, you gonna have to use something else but if you have access to a server this is a solution.
    PHP can use the gd library

    Moderator: General web building

    Get out from under them, resist and multiply.
    Get out from under precipice and see the sky.

  • #11
    Regular Coder
    Join Date
    Jun 2002
    Location
    Atlanta, GA.
    Posts
    313
    Thanks
    0
    Thanked 0 Times in 0 Posts
    ok i made a gif the way i want it, but it took me a LONG time to make it...i would hate to make one like it for EVERYsingle button...

    i want to make a function that will...

    1. resize an image to the size i want
    2. draw green and darkgreen lines towards the corners of that image

    thx
    A picture is worth a thousand words.
    Why not post the animated GIF and then people can see what you are aiming for and if it is possible in JavaScript.
    Just in case
    Here is a link to my Optimised Animated Rollovers tutorial.

  • #12
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Drawing lines from arbitrary points to other arbitrary points in a document is not in the scope of normal client-side JavaScript. You could however rely on a plugin and it's scripting abilities, and then you can chose between either Flash or SVG. But then they don't integrate as nicely into the rest of your document.

  • #13
    Regular Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    197
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I thought php was server side...

    anyways as i said perl is "A" solution..


    RoyW.. making animated gifs is hard work no matter how you do it.. unless you have some repetative tasks to do on images that can be automated or interactive tasks that a 'user' can perform.. you are gonna have to bite the bullet
    ez

    ps. next on my todo list
    - gain a dangerously small amount of knowledge about php
    Last edited by ez4ne12c; 01-17-2003 at 08:49 PM.
    Animation Rule #64
    Poor quality images are often artistic,
    Poor quality sound is ALWAYS annoying.

  • #14
    Senior Coder
    Join Date
    Jun 2002
    Location
    frankfurt, german banana republic
    Posts
    1,848
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by ez4ne12c
    I thought php was server side...
    That's correct, although PHP-GTK and PHP-CLI are blurring the line somewhat. And that's why cg9com suggested a different solution for drawing lines on server-side, in case the original poster hasn't got Perl.

  • #15
    Regular Coder
    Join Date
    Jun 2002
    Location
    Australia
    Posts
    197
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah ive gotta get into php,
    sometimes perl is a bit like looking at line noise..

    I didnt know that php use gd,
    unfortunately my sys admin didnt want to have to install gd... grrrrrrr... last time i asked....

    ez
    ps cg9com that gd link looks good .. thanks
    Last edited by ez4ne12c; 01-17-2003 at 09:08 PM.
    Animation Rule #64
    Poor quality images are often artistic,
    Poor quality sound is ALWAYS annoying.


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

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