A couple of Web Object questions...

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts
  • DomPredacom
    Forum Member
    • Mar 2004
    • 23

    A couple of Web Object questions...

    Hello all,

    Sorry about the essay, I only have 2 things to ask about! Hopefully someone will be able to help me out.

    1) I'm creating a CDROM prospectus for a University in the UK. There is a reasonably large amount of text, so have decided to use a Web Object for the text, for formatting etc. For those of you that don't know we have a new Disabilities Discrimination Act in the UK which means we are legally obliged to make all new media productions more accessible for disabled end users. One feature that a lot of websites now have is the ability to change the size of the text dynamically, using IE's in built capability to change text viewing size (View > Text Size > Smallest, Smaller, Medium, Larger, Largest). This usually appears as two buttons above the text box on a web site, see



    for an example.

    Simple question, can I create button objects that calls the relevant html / java within the web object?


    2) Because I want to be able to format the text and have pinned pics I am forced to use a web object rather than a Paragraph object. This does pose a problem though with the background. Is there anyway of make a web object transparent over the AMS background image, using alpha to let the BG image show thorugh? I have never been able to achieve this but have used a work around. If I cut out the part of the BG that is covered by the IE box, then use that new image as the BG image in the HTML doc, it sits nicely, and using Worm's amazing SetMask DLL (round of applause) I can even lose the crappy border. Only problem is that an html background image will automatically tile itself if the text passes beyond the boundaries of the image. You can get around this by using

    <STYLE>
    <!--
    BODY {background-attachment: fixed;}
    //-->
    </STYLE>

    in the HTML header which holds the BG image still and scrolls the text over the top.

    This is a great workaround and the finished article looks really nice...

    BUT... the project I'm currently working on has many many pages, with differemt subtle halftone images that sometimes creep behind the text a little. This means that I have to to the crop trick for every single BG image, and I'd rather not waste my time doing it if there's a quicker way or another workaround.

    Any feedback on either of these would be appreciated muchly!

    thanks a lot!
  • yosik
    Indigo Rose Customer
    • Jun 2002
    • 1858

    #2
    Second question first. No, there isn't a way to make transparent background in web object. Your work around is (alas) the way to do things.
    If you can plan in advance and allocate areas on your screen for the web object, and use inherit page feature of AMS, you could minimize, albeit not eliminate this task.

    As to your first question. A suggestion: why not work with css? BAsing your html pages on css, you could either chnge the content of a css file (which is a text file, right?) with AMS and reload your webobject content, or even change the css reference in your html page with a button in AMS and, again, reload it.

    Good luck
    Yossi

    Comment

    • rhosk
      Indigo Rose Customer
      • Aug 2003
      • 1698

      #3
      Yossi is correct in that css is the way to go for the accessibility issues. If you look at my website, I had a few complaints about the text being too small, so I incorporated a dynamic text size solution using css - even saves it to a cookie for their return and the size change is done throughout the site.

      Your background image problem, I really don't understand. If the image is "fixed" via webpage or behind as an AMS image object (which can't be done), I don't see what the difference is? It's not that you haven't conveyed it correctly, it's probably just too early in the AM for me. If I understand somewhat, maybe use div "layers" to help solve the problem? Image(s) could be on one layer and the text could be on others. One solution anyway.
      Regards,

      -Ron

      Music | Video | Pictures

      Comment

      • Worm
        Indigo Rose Customer
        • Jul 2002
        • 3971

        #4
        Once you have your page loaded. You can call a javasacript or vbscript function within the page by using the URL


        javascript:MyFunction()

        or

        vbscript:MyFunction()

        Comment

        • rhosk
          Indigo Rose Customer
          • Aug 2003
          • 1698

          #5
          Originally posted by Worm
          javascript:MyFunction()
          This is exactly how the dynamic text size script works. All that needs to be done is to call the js file in the specific page(s).
          Regards,

          -Ron

          Music | Video | Pictures

          Comment

          • DomPredacom
            Forum Member
            • Mar 2004
            • 23

            #6
            Thanks for all the advice, I've given up on the transparency thing, opted for a design change instead to make all the BGs the same.

            On the font resizing, I've played around with this over the last couple of days. I've got all of the html sorted and integrated the relevant Java and CSS. The .js (easydynfont.js btw) file is in my docs folder with the .html file.

            The JavaScript function addsize() is defined:

            addSize(add) adds "add" to the current font-size of the body. So if you send "1", the font gets bigger, and "-1" it gets smaller. Valid are any Integer values.

            SO I need to call "javascript:addSize(1)" to step up a size. Sorry not much of a coder, I've never called a JS in a Web Object in AMS like this before. What command should I use in the OnClick tab of the button? I've tried a few variations of

            Web.LoadURL("Web 1", javascript:addSize(1));

            but I don't think this is right, and AMS agrees with me!!

            Thanks,

            Comment

            • Worm
              Indigo Rose Customer
              • Jul 2002
              • 3971

              #7
              it's right, but you need quotes around the javascript

              Web.LoadURL("Web 1", "javascript:addSize(1)");

              Comment

              • DomPredacom
                Forum Member
                • Mar 2004
                • 23

                #8
                Thanks Worm.

                I've tried that too and have had no luck, I get an 'Object Expected' IE Warning at Line 1 Character 1 when I click on the button in a preview. its probably a screw up on my HTML somewhere.

                Also Worm, while you're about, I'm using the SetMask dll (which is great btw) but occasionally (and sporadically) I get a SetMask DEMO window open behind my app (I have 'always on top' turned on). I've inputted my reg info on all the instances. Its weird, sometimes it does it, sometimes its fine. Anyhoo, I'd better get back to troubleshooting this. Cheers!

                Comment

                • DomPredacom
                  Forum Member
                  • Mar 2004
                  • 23

                  #9
                  Finally got it sorted and operational. It took long enough, now 5am here! Worth it though, as this will feature in every CD-ROM I make from now on. I'll post a stripped down version on here soon so people can see it in action.

                  Thanks for all ur advice / tips.

                  Oh and btw Worm, I'd missed a digit off the ID number! Too much work, not enough zzzzzzzzzzzzzzzzzzzzzzzzzz!

                  Comment

                  • Worm
                    Indigo Rose Customer
                    • Jul 2002
                    • 3971

                    #10
                    Glad you got it all worked out, and I'm especially glad to hear that SetMask wasn't acting up

                    Comment

                    • DomPredacom
                      Forum Member
                      • Mar 2004
                      • 23

                      #11
                      This is an example of how to use AMS buttons to call JS in a Web Object, here giving you the option to dynamically change the size of the font - VV useful for the visually impaired. Here's an apz of a single page version. You can toggle the font size up and down. This uses CSS, Javascript and, of course, the mighty SetMask.dll

                      Enjoy!


                      Dom
                      Attached Files

                      Comment

                      Working...
                      X