GetDotted Domains

Viewing Thread:
"Layers help..."

The "Freeola Customer Forum" forum, which includes Retro Game Reviews, has been archived and is now read-only. You cannot post here or create a new thread or review on this forum.

Tue 20/05/03 at 18:20
Regular
Posts: 787
Hi,

Does anyone know, using JS, if you can add or subtract from or to the value of the 'top' and 'left' in real time, seemingly moving a layer by, say, clicking the mouse with if(event.button==1){LAYER CODE CONTENT}.

Cheers.
Thu 22/05/03 at 10:10
Regular
"You've upset me"
Posts: 21,152
Turbonutter wrote:
> Yeah I took both of Thau's from webmonkey.

:-)

The beginners one was good but I didn't think he explained everything all that well in the Advanced one. So I looked around for others and took bits of them all :-)
Thu 22/05/03 at 00:20
Regular
"Eff, you see, kay?"
Posts: 14,156
Yeah I took both of Thau's from webmonkey.
Wed 21/05/03 at 19:07
Regular
"You've upset me"
Posts: 21,152
Turbonutter wrote: >
> Webmonkey?

The beginners one yah. The advanced was a hybrid really. A bit of webmonkey and HTML Goodies and some from pageresource.com
Wed 21/05/03 at 16:25
Regular
"Eff, you see, kay?"
Posts: 14,156
RastaBillySkank wrote:
> cjh wrote:
> Where do you learn all your stuff??
>
> Trial and error mostly.
>
> I took two JS tutorials. A beginners one and an advanced one. And that
> was it.

Webmonkey?
Wed 21/05/03 at 12:17
Regular
"You've upset me"
Posts: 21,152
cjh wrote:
> Where do you learn all your stuff??

Trial and error mostly.

I took two JS tutorials. A beginners one and an advanced one. And that was it. If I think up an idea for a script I work my way around it, applying what I learnt in the tutorials and what other stuff I've picked up from looking at source code and try and make the script. I try and try again until I've got no more ideas. And if it still doesn't work I either look on the Net or I come here for help.

Like Rob said, mostly it's practice.
Wed 21/05/03 at 10:00
Regular
"Eff, you see, kay?"
Posts: 14,156
Practise, I imagine. There's not much better than experience, and the Internet is no better place to get it.

When you look at the Internet, what you're looking at is the sum total and collection of the history of mankind's knowledge and experiences in one gigantic library. Anything the has ever been known before is learnable on the Internet. All you need is a stepladder.
Tue 20/05/03 at 20:17
Regular
"It goes so quickly"
Posts: 4,083
Where do you learn all your stuff??
Tue 20/05/03 at 19:58
Regular
"You've upset me"
Posts: 21,152
Oh and this will move it right obviously. If you want it left subtract i from the left. You can change the top attribute as well.
Tue 20/05/03 at 19:57
Regular
"You've upset me"
Posts: 21,152
layer.style.position+=i;


Should be layer.style.left+=i

whoops.
Tue 20/05/03 at 19:56
Regular
"You've upset me"
Posts: 21,152
Rickoss wrote:
> Hi,
>
> Does anyone know, using JS, if you can add or subtract from or to the
> value of the 'top' and 'left' in real time, seemingly moving a layer
> by, say, clicking the mouse with if(event.button==1){LAYER CODE
> CONTENT}.
>
> Cheers.

Yup. Tis simple.


var i=0;
var timer;

function moveLeft()
{
if (i < 250)
layer.style.position="relative";
layer.style.position+=i;
i++
}
else if (i == 250)
{
clearTimeout(timer)
}
timer=setTimeout("moveLeft()",10)
}

then just make the layer in CSS and give it a relatie position. Make the call and it'll start moving. Simple.

Freeola & GetDotted are rated 5 Stars

Check out some of our customer reviews below:

Everybody thinks I am an IT genius...
Nothing but admiration. I have been complimented on the church site that I manage through you and everybody thinks I am an IT genius. Your support is unquestionably outstanding.
Brian
Many thanks!!
Registered my website with Freeola Sites on Tuesday. Now have full and comprehensive Google coverage for my site. Great stuff!!
John Shepherd

View More Reviews

Need some help? Give us a call on 01376 55 60 60

Go to Support Centre

It appears you are using an old browser, as such, some parts of the Freeola and Getdotted site will not work as intended. Using the latest version of your browser, or another browser such as Google Chrome, Mozilla Firefox, or Opera will provide a better, safer browsing experience for you.