Re: rotate a graphic in html or asp?

by "Phil Babcock" <pbabcock(at)bgsgroup.com>

 Date:  Wed, 29 Mar 2000 09:12:01 -0500
 To:  stephberg(at)videotron.ca,
"hwg-techniques(at)hwg.org" <hwg-techniques(at)hwg.org>
 References:  videotron
  todo: View Thread, Original
Ah yes, I am quite familiar with the adrotator.  But that is not exactly
what I meant.  I need to physically rotate one image by 90degrees, not
rotate it with other pictures.

*********** REPLY SEPARATOR  ***********

St=E9phane Bergeron wrote:

>At 04:43 PM 28/03/00 -0500, you wrote:
>>Is there a way, either in HTML (doubtful) or thru ASP to dynamically
rotate
>>an image?  I know I could create separate graphics *but* for this
>>application I need to do it with one graphic, rotated.
>
>This is easily achieved in ASP with the AdRotator component.  This 
>component should be installed on most if not all NT servers running IIS 4 
>and above.  The AdRotator object is set in two parts:  first is the code 
>you insert in the page where the image will appear and then you have to 
>write the schedule file which is a simple text file where you define the 
>images and the the relative frequency at which you want them to be 
>rotated.  The code which you add to the HTML goes like this:
>
><%
>Dim objRot, varImage
>Set objRot =3D Server.CreateObject("MSWC.AdRotator")
>varImage =3D objRot.GetAdvertisement("includes/RotSchedule.txt")
>Response.write varImage
>  %>
>
>Of course you should change the "includes/RotSchedule.txt" part to the 
>actual folder and file names you  set on your server for this.  The 
>schedule file is a plain text file should be written in the following 
>format (explanation below):
>
>border 0
>height 300
>width 250
>*
>images/img1.gif
>http://www.foo.com
>Text description
>25
>images/img2.gif
>http://www.foo2.com
>Text description
>25
>images/img3.gif
>http://www.foo3.com
>Text description
>50
>
>The schedule file is comprised of two parts.  The first part up to the * 
>symbol sets the basic properties of the image tag the component will 
>create.  The * symbol serves as a separator between the two parts and 
>should be alone on a single line with no blank lines above and below and
no 
>spaces before or after.  The second section has 4 parameters for each
image 
>which you repeat as many times as you have images to rotate.  The first 
>sets the path and filename for the image.  The second parameter is the URL

>the user will be directed to if they click on that particular image.  If 
>you don't want the image to be a link, insert a  -  (dash) symbol instead 
>but don't leave the line blank and don't omit it.  The third parameter is 
>the text description for the image that will be inserted in the ALT 
>attribute of the image tag.  Finally is the number that will set the 
>frequency at which the image will be displayed in relation to the other 
>images.  In the above example, the image "img3.gif" would be shown 50% of 
>the time which is twice as often as the two others.  You could also use
the 
>numbers 1, 1 and 2 to achieve the same effect or 1 for each image which 
>would give all 3 images the same importance.  There should be no blank 
>lines between the parameter definitions for each image.
>
>That's all there is to it and it works very well too.
>
>HTH!
>
>St=E9phane Bergeron

*********** END REPLY SEPARATOR  ***********
Phil Babcock
Lead Web Designer
BGS Group Inc.

HWG hwg-techniques mailing list archives, maintained by Webmasters @ IWA

This page is part of a preserved archive of archives.hwg.org. The site is no longer active and its content is not maintained. For enquiries about this archive, write to archive(at)iwanet.org.