• make font bold

    Author
    Topic
    #430504

    Hi, i copied the below code from a free code source for a circling mouse trailer. My task is to make the font in “var msg=’artuS rewolF amrahD’;” bold, can somebody teach me how to insert another code to make my wordings in the mouse trailer bold? i don’t know how to do so.

    Thanks for your help.

    Longish code moved to attachment by HansV – the tags caused problems.

    Viewing 1 reply thread
    Author
    Replies
    • #1005415

      Hi Boat

      This is a bit of a massive task as the script has been specifically coded in a way that it is very difficult to adapt the code without upsetting the variables.

      Nice gizmo but it does not like to work in Firefox…before we rattle onto this task could you just clarify is the a MUST have or a WOULD LIKE to have grin

      • #1005444

        Hi Jerry, thanks for your concern. the mouse trailer i would like to have and it has so inevitably become must have preference. anyway, do what you have and at your pleasure.

        Thanks for your help.

    • #1005418

      This is rather crusty old code… the Netscape part is basically irrelevant for anyone using a modern browser, so I will ignore that. For the IE part, find this and change the weight to bold:

      font-weight:regular

      To make it work in Firefox, well, I will leave that to others.

      • #1005554

        HI, can you tell me more with your comment, “the Netscape part is basically irrelevant for anyone using a modern browser”
        i tried open the web with the mouse trailer and it ok from 2 pcs. is this your mean some pcs cannot open the web that has the mouse trailer code?

        about the code “font-weight:regular”

        i do tried before in between lines below with “font-weight:bold” but it just don’t work, thanks for your comment.

        var msg=’artuS rewolF amrahD’;
        var font=’Times New Roman,Impact,Arial Black,Verdana’;
        var size=3; // up to seven
        var color=’#fffafa’;

        • #1005586

          Hi boat

          To answer two of your questions:

          1. The Netscape bit of the code is more or less redundant as very few people use Netscape these days. The Netscape line of browsers was discontinued some time ago, and replaced with Firefox.

          2. Different browsers interpret code (including html and javascript) in slightly different ways. So it’s not a question of trying the code on several computers (if they’re running the same browser), but of trying the code on several browsers. You can have more than one browser installed on a single computer at a time, so you don’t really need to test it on multiple computers (unless you think the operating system or hardware may make a difference, but I doubt that’s the case for an application like this).

          Hope that helps,

        • #1005722

          Some more answers.

          (1) The way the code looks for Netscape is to see whether the browser supports the document.layers collection. I think this is not applicable to Firefox or the later members of the Mozilla suite or to recent versions of Netscape. This was really used in the days of version 4.x of Netscape. For more recent versions, one should use document.getElementById (also works with IE versions 5.x and higher).

          (2) I’m not sure what you did here. Did you change the word “regular” to “bold”? That is the part that applies to IE. Try just changing that and ignoring the other variables. Most of those other variables seem to be used in the Netscape part of the script.

          • #1005814

            thanks guys. you guys really expert in your knowledge. i don’t know how to differentiate what kind of browsers there are or how to get them but i will say what i see. i saw before when i open website, there was a logo on upper right page. once it was a logo of a big ‘N’ i think that is what you guys meant Netscape, and now i see a logo of microsoft windows on my upper right page. and i know i see most pcs now use internet of this kind. now this script attached above can play in this kind of internet. nevertheless, if cannot make bold, then i will choose another font type instead that looks darker than the one Times New Roman i am using. nevertheless i am using Times New Roman all these while that is why i like Times New Roman.

            • #1005936

              Can you provide a link to a page where this script is actually working? I can’t get it to do anything. Thanks.

            • #1006010

              sure jscher2000. here you go: http://www.dharmaflowersutra.net
              can you see the mouse trailer there anyway, cause i want to know also. thanks.
              you see i use bold italic Times New Roman for the wordings all while there so if the mouse trailer wordings using the same, it would be nice for what i think.

            • #1006020

              The script was written by Tim Tilton and is available at Dynamic Drive: http://www.dynamicdrive.com/dynamicindex13/circletext.htm%5B/url%5D.

              After testing, I realized that you have a nearly white text color in your originally posted script. If you change the color from #fffafa to #000000 (black) you will see that the script works in IE. I should have noticed this before, but there was so much other code…..

              Now, I changed font-weight:regular to font-weight:bold, but the circling is so fast that I can’t tell whether it made any difference…

            • #1006043

              hi. yes i get the code from there. sorry about the color. and you can change the speed lower to var speed=.9; as i used it in my website. i use FrontPage to do the web and will get error if i use font-weight:bold between the code lines.

            • #1006053

              Hi Boat

              I have had a little play with this and changing font-weight to bold does work without error. I am using IE 6 sp2 (Although it does try to block the content as it sees the script underlying it).

              I have attached the code in a text file for you to look at but be aware the Lex the Lounge Lizard adapts the code slightly so that it can be displayed in the Lounge correctly. Open the file and read his instructions on how to clean it up.

            • #1006094

              Hi Jerry,
              can i know what changes have you made other than the original one cause i still cannot get it. thanks.

            • #1006107

              I just followed Jeff’s advise and changed these parts (in bold):

              v// your message here
              var msg=’Jezza Bear‘;

              var font=’Verdana,Arial’;
              var size=3; // up to seven
              var color=’#000000′;

              // This is not the rotation speed, its the reaction speed, keep low!
              // Set this to 1 for just plain rotation w/out drag
              var speed=.9;

              ….lots of code here……

              if (ie){
              document.write(‘

              ‘);
              for (i=0; i <! n; i++)
              document.write('’+props+msg[i[+’

              ‘);
              document.write(‘

              ‘);
              }

              ….the rest of the code here….

            • #1006240

              Hi Jerry, thanks for the briliant changes.
              and i can make the font italic also by adding font-style:italic in lines below. thanks for your hard work and others as well.

              document.write(”+props+msg[i[+’‘);

            • #1006242

              thumbup

    Viewing 1 reply thread
    Reply To: make font bold

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: