PDA

View Full Version : I Need Help With The 3d Spinning Message



pinoyscrplaya517
10-28-2004, 07:36 PM
Hey! Well let's see. I am having trouble with this code because it won't show up on my xanga when I put it into my website stats. Can anyone tell me why it won't show up or can anybody tell me what I have to do to get this following code on my xanga:

<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
<style type="text/css">
v\:* { behavior: url(#default#VML); }
</style>

<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("Dynamic Drive", "#1 DHTML site online", "Visit us for free scripts", "Enjoy")

// Set the outline-color. Add as many colors as you like
var outlinecolor=new Array("black", "black")

// Set fillcolors 1. Add as many colors as you like
var fillcolor1=new Array("gray", "green", "white", "green")

// Set fillcolors 2. Add as many colors as you like
var fillcolor2=new Array("blue", "olive", "black", "lime")

// Set the letter marking the circle
var circlemark=new Array("-")

// Set the width of the outline
var strkweight=2

// Set the waiting time between the messages (seconds)
var pause=2

// Set the strength of the opacity (transparency of letters)
var strengthopacity="60%"

// Set the size of the circle (values range from 0.1 to 1)
var circlesize=0.5

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

// 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

var innerwidth=Math.floor(circlesize*outerwidth)
var innerheight=Math.floor(circlesize*outerheight)

var posleft=(outerwidth-innerwidth)/2
var postop=(outerheight-innerheight)/2

var path=new Array()
var i_message=0
var i_outlinecolor=0
var i_fillcolor1=0
var i_fillcolor2=0
var i_messagelength=0
var longestmessage=0
pause*=1000

var ie=document.getElementById&&document.all?1:0

for (i=0;i<=message.length-1;i++) {
if (message[i].length>longestmessage) {
longestmessage=message[i].length
}
longestmessage+=4
}

for (i=0;i<=message.length-1;i++) {

var emptyspace=""
var i_emptyspace=(longestmessage-message[i].length)/2
for (ii=0;ii<=i_emptyspace;ii++) {
emptyspace+=circlemark
}
message[i]=emptyspace+" "+message[i]+" "+emptyspace
}

function changeform() {
if (keepinview=="yes") //DD added
document.getElementById("roofid").style.top=mytruebody.scrollTop //DD added
if (i_outlinecolor >= outlinecolor.length) {i_outlinecolor=0}
if (i_fillcolor1 >= fillcolor1.length) {i_fillcolor1=0}
if (i_fillcolor2 >= fillcolor2.length) {i_fillcolor2=0}
document.getElementById('strokeid').color=outlinecolor[i_outlinecolor]
document.getElementById('fillid').color=fillcolor1[i_fillcolor1]
document.getElementById('fillid').color2=fillcolor2[i_fillcolor2]
if (i_message < message.length) {tick()}
else {document.getElementById('textpathid').string=""
document.getElementById("roofid").style.display="none" //DD added
}
}

function tick() {
if (i_messagelength <= message[i_message].length) {
var messagestringend=""
var messagestring=message[i_message].substring(0, i_messagelength)+messagestringend
document.getElementById('textpathid').string=messagestring
var timer=setTimeout("tick()",50)
i_messagelength++
}
else {
clearTimeout(timer)
i_messagelength=0
i_message++
i_outlinecolor++
i_fillcolor1++
i_fillcolor2++
var timer=setTimeout("changeform()",pause)
}

}

if (ie) {
document.write('<div id="roofid" style="position:absolute;left:0px;top:0px;width:'+outerwidth+'px;height:'+outerheight+'px;overflow:hidden;">')
document.write('<v:oval id="tc" style="position:absolute;top:'+postop+'px;left:'+posleft+'px;width:'+innerwidth+'px;height:'+innerheight+'px">')
document.write('<v:shadow on="t" opacity="'+strengthopacity+'"/>')
document.write('<v:stroke id="strokeid" weight="'+strkweight+'pt" color="blue"/>')
document.write('<v:fill id="fillid" on="True" color="'+fillcolor1[0]+'" color2="'+fillcolor2[0]+'" opacity="'+strengthopacity+'" opacity2="'+strengthopacity+'" type="gradient"/>')
document.write('<v:path textpathok="t"/>')
document.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>

pinoyscrplaya517
10-28-2004, 07:38 PM
Hey it's me again (the one who started this thread)! The code I put wasn't supposed to have smilies but for some reason when I started the thread they put smilies.

ddadmin
10-28-2004, 08:34 PM
Hi:
For future reference and per our rules/sticky, please do not post the entire source code of the script, simply the link to the page on DD in question. FYI you can disable smilies from showing in a post by checking the "Disable smilies" checkbox at the end of the form when posting.

pinoyscrplaya517
10-31-2004, 04:44 PM
Someone Help Me Please!!!!!!!!sheesh!!

cr3ative
10-31-2004, 04:52 PM
Calm down dear.

Can you post a link to an example for us of it not working? Just saying "it doesn't work" and pasting a chunk of code really doesn't help us help you.

cr3ative

pinoyscrplaya517
10-31-2004, 11:19 PM
Here's my xanga! See it does not work. When I put the DHTML code in it moves my xanga to the left instead of centering it. Then, it does not even show the 3D spinning message.

http://www.xanga.com/home.aspx?user=pinoyscrplaya517

cr3ative
11-01-2004, 02:39 PM
There's more than one script running on this page, it could well be a conflict.

Also, you have not implemented the code correctly. The <xml>, the very first bit needs to be in the head.

In my opinion you really need to get rid of the on-enter popup message. That just made me want to leave, not enter :p

cr3ative

pinoyscrplaya517
11-03-2004, 07:26 PM
Hey! Can you please tell me how to put the code on correctly. For example, where do u put everything. Can u please not be so vague as your last post when you said you put the very first bit of <xml> in the head.

cr3ative
11-03-2004, 07:39 PM
This:

<xml:namespace ns="urn:schemas-microsoft-com:vml" prefix="v"/>
<style type="text/css">
v\:* { behavior: url(#default#VML); }
</style>

Needs to be inbetween your two existing tags <head> and </head>. Put it anywhere inbetween those two tags in the HTML code.

There may also be a script conflict. That is when two scripts use the same function/variable names and get very confuzzled.

cr3ative

pinoyscrplaya517
11-07-2004, 01:44 AM
I still don't understand what to do. What are the <head> tags?

pinoyscrplaya517
11-07-2004, 02:01 AM
Can I give you my password and screename for my xanga, so you can do it.

cr3ative
11-07-2004, 08:08 AM
I can only do this if I have direct HTML access; does Xanga do this?

If so, PM me the details, but please allow a week or so, I'm very busy.

cr3ative

pinoyscrplaya517
11-07-2004, 01:02 PM
I think so. Thank you so much!

cr3ative
11-07-2004, 01:30 PM
Right, well I've tried to implement the script but Xanga doesn't allow me to place the script in the correct place for it to work.

Sorry!
cr3ative

pinoyscrplaya517
11-08-2004, 05:11 AM
I am very sorry to bother you like this, and I know that you said it didn't work. I don't know what I am doing wrong because I was able to put it on my xanga before. It was the same code I think. This is fustrating. I got the same 3D Spinning Message on my xanga before from a site called Xanga Add-Ons. I had to start a new xanga because mine was broken, and it deleted all my codes. At the same time Xanga Add-Ons shut down its website, so I wasn't able to retrieve my code. I think there should be a way because the code on Xanga Add-Ons was submitted by a person from Dynamic Drive. I am going to give it up soon, but I want this thing so badly!

cr3ative
11-08-2004, 01:51 PM
The problem is that xanga does not allow direct html access, it only allows us to insert code where IT wants it.

cr3ative