PDA

View Full Version : 3D Spinning Message placement



inabizagain
03-07-2007, 05:34 PM
1) Script Title: 3D Spinning Message

2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex10/circlemsg.htm

3) Describe problem: Is there a way to place this in a certian spot on a web page, so it is not actually in the center of the page?


Thank you for your help..

jscheuer1
03-07-2007, 10:44 PM
Yes but, first realize that this is an IE only effect. Now, what you can do is set the width and height of the spinner here (from the script):


// Do not edit below this line

mytruebody=(!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body //Dynamicdrive added object

var outerwidth=mytruebody.clientWidth
var outerheight=mytruebody.clientHeight

Like so:


var outerwidth=350
var outerheight=200

Also, make sure this is set to no:


// Always keep messages in view even if page is scrolled? (DD added option)
var keepinview="yes"

Next, put a division around the script with position relative and with the same dimensions you used for the spinner:


<div style="position:relative;width:350px;height:200px;">
<script type="text/javascript">

/***********************************************
* 3D Spinning Message Script- By Copyright (c) 2003 Peter Gehrig
* Website: http://www.24fun.com
* Script available at/modified by Dynamic Drive (http://www.dynamicdrive.com)
* This notice must stay intact for use
***********************************************/


// Add as many messages as you like
var message=new Array("Dynam . . .

. . . .write('<v:textpath id="textpathid" on="t" id="mytp" style="font-family:\'Arial Black\'; " fitpath="t" string=""/>')
document.write('</v:oval></div>')
if (window.attachEvent) //DD added code
window.attachEvent("onload", changeform) //DD added code
else
window.onload=changeform
}
</script>
</div>



Now you can put it wherever you want it in the flow of the page, just as if it were a paragraph.

inabizagain
03-08-2007, 06:24 PM
Perfect! Thank you so much! :) :o