Rotating Many Elements, Partially Resolved

R

Ren

This is what I've got. It rotates every ">" of each piece but
unfortunately also rotates the first element in the array at the same
time.

function _setRotateMe(x) {this.rot = x ; this.refresh()}
function rotateMe(x)
{
response = characters[x].rot
oldHTML = document.getElementById('rotateMe1').innerHTML ;
response = "<b style='-moz-transform:rotate(90deg)'>"+oldHTML+"</
b>";
document.getElementById('rotateMe1').innerHTML = response ;
if (response != null)
{characters[x].setRotateMe(response)}
}

function _ref()
{
boxContents="<span class=piecestyle onClick=rotateMe("+this.index
+")><b id=rotateMe1>"+this.rot+"</b></span>

/*cut off here to save space
 
R

Ren

function Character(name, type)
{
this.x=0
this.y=0
this.index=null
this.name=name
this.rot=">"
this.setRotateMe=_setRotateMe

/* this is also part of my code, any help will be deeply appreciated.
 
G

Garrett Smith

Ren said:
This is what I've got. It rotates every ">" of each piece but
unfortunately also rotates the first element in the array at the same
time.
[...]
/*cut off here to save space
To improve chances of eliciting a helpful response, post the whole code,
reduced as much possible to express the problem, formatted to width 72
chars. Please see FAQ entry on #posting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
474,079
Messages
2,570,574
Members
47,205
Latest member
ElwoodDurh

Latest Threads

Top