1. Computer problem? Tech Support Guy is completely free -- paid for by advertisers and donations. Click here to join today! If you're new to Tech Support Guy, we highly recommend that you visit our Guide for New Members.

Slowing down DHTML effects in Frontpage

Discussion in 'Software Development' started by cahallyburton, Sep 29, 2003.

Thread Status:
Not open for further replies.
Advertisement
  1. cahallyburton

    cahallyburton Thread Starter

    Joined:
    Oct 7, 2001
    Messages:
    144
    I'm using the "fly in" DHTML effect for text in FP 2000. My text "flies in" across the page too fast. Is there a way to adjust the speed?
     
  2. lola2001

    lola2001

    Joined:
    Jan 29, 2001
    Messages:
    1,972
    You can change the speed right in the code.
     
  3. cahallyburton

    cahallyburton Thread Starter

    Joined:
    Oct 7, 2001
    Messages:
    144
    Where in the code?
     
  4. lola2001

    lola2001

    Joined:
    Jan 29, 2001
    Messages:
    1,972
    Can you send a snippet of the code that relates to this? It hard to say without seeing it. I'm assuming it's javascript; there should be someplace that indicates speed.
     
  5. cahallyburton

    cahallyburton Thread Starter

    Joined:
    Oct 7, 2001
    Messages:
    144
    Sure, and thanks for your help:

    <p align="right" dynamicanimation="fpAnimflyLeftFP1" id="fpAnimflyLeftFP1" style="position: relative !important; visibility: hidden" language="Javascript1.2"><font color="#FFFF00" face="Harlow Solid Italic" size="7">High&nbsp;
    </font></td>
     
  6. lola2001

    lola2001

    Joined:
    Jan 29, 2001
    Messages:
    1,972
    You must have left some of the code out. I'm attaching some code that will do the same thing only make it easier for you. Just follow the directions I have placed in the code indicated by // in front of the comment. Good luck.
     
  7. lola2001

    lola2001

    Joined:
    Jan 29, 2001
    Messages:
    1,972
    Oops. Here is attachment.
     

    Attached Files:

  8. cahallyburton

    cahallyburton Thread Starter

    Joined:
    Oct 7, 2001
    Messages:
    144
    This is the code with my variables in it, but I'm getting a javascript error that I think has to do with an object in the crossheader section. Please take a look and see what I've done wrong. Thanks.

    <script>
    //set style for NS4 to ''
    //change the -400 to pause before bringing in the message - higher for faster, lower for slower
    //change "welcome to our website" to your own words.
    //change font face to what you like and font color if you want like this: <font color="red">


    if (document.layers)
    var ns4def=''
    </script>

    <h1 id="flyin" style="position:relative;left:-100;font-style:italic" style=&{ns4def};><font face="Harlow Solid Italic">High</font></h1>


    <script language="JavaScript1.2">

    /*
    Fly-in Header script (credit must stay enclosed)
    By javascriptkit.com
    For this and over 400+ JavaScripts,
    Visit http://www.javascriptkit.com
    */


    if (document.getElementById||document.all)
    var crossheader=document.getElementById? document.getElementById("flyin").style : document.all.flyin.style

    //change the +20 to +10 or +5 to make slower

    function animatein(){
    if (parseInt(crossheader.left)<0)
    crossheader.left=parseInt(crossheader.left)+5
    else{
    crossheader.left=0
    crossheader.fontStyle="normal"
    clearInterval(start)
    }
    }

    if (document.getElementById||document.all)
    start=setInterval("animatein()",50)


    </script>
     
  9. lola2001

    lola2001

    Joined:
    Jan 29, 2001
    Messages:
    1,972
    Everything worked fine for me. What kind of error are you getting? I just inserted your code into an existing HTML page (between the body tags) and it worked fine.
     
  10. cahallyburton

    cahallyburton Thread Starter

    Joined:
    Oct 7, 2001
    Messages:
    144
    Not sure what the problem is now. I took care of the Javascript error, but for some reason Frontpage omits the code between <h2 id="flyin"
    and
    <font face=....

    so that the text isn't animated. This happens even when I enter the codem anually into the html. I can click the Normal or Preview tabs and that line simply disappears from within the code. I'm feeling awfully stupid!
     
  11. lola2001

    lola2001

    Joined:
    Jan 29, 2001
    Messages:
    1,972
    Don't feel stupid, silly things happen to all of us! I don't know too much about front page but I'm sure it is a glitch with the program. Dreamweaver doesn't do things like that. You could try copying all the code into notepad and upload from there. Take out all references to FrontPage though and don't forget to save it as an .html. Let me know what happens.
     
  12. Sponsor

As Seen On
As Seen On...

Welcome to Tech Support Guy!

Are you looking for the solution to your computer problem? Join our site today to ask your question. This site is completely free -- paid for by advertisers and donations.

If you're not already familiar with forums, watch our Welcome Guide to get started.

Join over 733,556 other people just like you!

Loading...
Similar Threads - Slowing down DHTML
  1. openreel
    Replies:
    0
    Views:
    261
Thread Status:
Not open for further replies.

Short URL to this thread: https://techguy.org/168375

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice