Results 1 to 4 of 4

Thread: html program to create image flip

  1. #1
    Join Date
    Jan 2009
    Posts
    35

    html program to create image flip

    I have to write the html program for image flip. In am describing what I want to display. I want image to change when cursor is over the picture and when the mouse come out this image, the image flip back.

    How can we achieve this output? Please give solution with HTML code.

  2. #2
    Join Date
    May 2008
    Posts
    2,012

    Re: html program to create image flip

    Hi friend,

    I don't no the exact coding but we can create image flip in HTML using Javascript. To achieve this you will have to use event concept. I think something like mouseOver() events may helpful in this.Fire the events code for position of the mouse and the area of the image which you want to flip.

    I hope this hints may help you code this program successfully.

  3. #3
    Join Date
    Apr 2008
    Posts
    2,005

    Re: html program to create image flip

    I have successfully run this program to create image flip on my pc. Below is the code for that program

    program code:

    <SCRIPT language="JavaScript">
    <!--

    if (document.images)
    {
    pic1on= new Image(100,25);
    pic1on.src="ses2.gif";

    pic1off= new Image(100,25);
    pic1off.src="ses1.gif";
    }

    function lightup(imgName)
    {
    if (document.images)
    {
    imgOn=eval(imgName + "on.src");
    document[imgName].src= imgOn;
    }
    }

    function turnoff(imgName)
    {
    if (document.images)
    {
    imgOff=eval(imgName + "off.src");
    document[imgName].src= imgOff;
    }
    }

    //-->
    </SCRIPT>
    Include this coding in the body:

    <A HREF="index.html" onMouseover="lightup('pic1')" onMouseout="turnoff('pic1')">
    <IMG SRC="http://forums.techarena.in/images/ses1.gif" name="pic1" width="100" height="25" border="0"></A>
    Last edited by kelfro; 19-11-2009 at 01:42 PM.

  4. #4
    Join Date
    May 2008
    Posts
    2,297

    Re: html program to create image flip

    To make image flip program using html use below hints

    To change image when mouse is over the image use below code:

    function flipon(imgName)
    {
    if (document.images)
    {
    imgOn=eval(imgName + "on.src");
    document[imgName].src= imgOn;
    }
    }
    To change image when mouse is out of the image area use below code:

    function turnoff(imgName)
    {
    if (document.images)
    {
    imgOut=eval(imgName + "off.src");
    document[imgName].src= imgOut;
    }
    }

Similar Threads

  1. Is it possible to create a page flip book from PDF files.
    By Ardiana in forum Windows Software
    Replies: 6
    Last Post: 27-12-2011, 02:19 PM
  2. Image Flip Book Viewer
    By Indrani in forum Windows Software
    Replies: 2
    Last Post: 24-06-2009, 08:40 PM
  3. How to create Image Rollovers in HTML
    By Daniel craig in forum Software Development
    Replies: 3
    Last Post: 14-05-2009, 11:59 AM
  4. Create a desktop shortcut for 3D Aero Flip
    By Baker in forum Customize Desktop
    Replies: 3
    Last Post: 28-03-2009, 10:28 AM
  5. how do i make a flip(negative)image of picture
    By shivinder in forum MS Office Support
    Replies: 1
    Last Post: 07-10-2008, 04:53 PM

Tags for this Thread

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
  •  
Page generated in 1,713,434,460.79078 seconds with 17 queries