Saturday, January 30, 2010

Xxx Coloring Sheets How Can I Use Javascript To Join Images?

How can I use Javascript to join images? - xxx coloring sheets

I take several pictures from the edges of the screen, and meet in the middle to create a larger image. Is there a way to take this with Javascript (or) another tool and get to do a Web site?

A simple example: Suppose there are four colored squares, one in each corner of the screen:


......... .. XX XX
....................
....................
....................
....................
......... .. XX XX


Over time, the spots are moving gradually towards others, towards the middle of the screen:

.... .... XX XX
.................
.................
.... .... XX XX

Get closer:

.... XX .. XX
...............
.... XX .. XX

And finish combined in the middle, forming a large square of four colors:

XXX
XXX

What does that mean?

2 comments:

E.M.Bed said...

In this way the images move diagonally in the center to:

\\ \\ \\ \\ \\ \\ \\ \\ U0026lt, style type = "text / css">
# (TopLeft
position: absolute;
left: 0px;
top: 0px;
)
topright # (
position: absolute;
left: 0px;
top: 0px;
)
# Topright (
position: absolute;
left: 0px;
bottom: 0px;
)
bottomright # (
position: absolute;
left: 0px;
bottom: 0px;
)
\\ \\ \\ \\ \\ \\ \\ \\ U0026lt; / style>

\\ \\ \\ \\ \\ \\ \\ \\ U0026lt; div id = topleft> \\ \\ \\ \\ \\ \\ \\ \\ u0026lt; img src = image1.jpg> \\ \\ \\ \\ \\ \\ \\ \\ u0026lt; / div>
\\ \\ \\ \\ \\ \\ \\ \\ U0026lt; topright div id => \\ \\ \\ \\ \\ \\ \\ \\ u0026lt; img src = image2.jpg> \\ \\ \\ \\ \\ \\ \\ \\ u0026lt; / div>
\\ \\ \\ \\ \\ \\ \\ \\ U0026lt; bottomleft div id => \\ \\ \\ \\ \\ \\ \\ \\ u0026lt; img src = image3.jpg> \\ \\ \\ \\ \\ \\ \\ \\ u0026lt; / div>
\\ \\ \\ \\ \\ \\ \\ \\ U0026lt; bottomright div id => \\ \\ \\ \\ \\ \\ \\ \\ u0026lt; img src = image4.jpg> \\ \\ \\ \\ \\ \\ \\ \\ u0026lt; / div>

\\ \\ \\ \\ \\ \\ \\ \\ U0026lt; script language = javascript>
var time = 1000;
var = 100 pixels;

setTimeout ( 'moveall ()', time);

moveall function () (
tl = document.getElementById ( 'topleft');
var tr = document.getElementById ( 'topright');
BL = document.getElementById ( 'topright');
var br = document.getElementById ( 'topright');
tl.style.posLeft + = pixels;
tl.style.posTop + = pixels;
tr.style.posRight + = pixels;
tr.style.posTop + = pixels;
bl.style.posLeft + = pixels;
bl.style.posBottom + = pixels;
br.style.posRight + = pixels;
br.style.posBottom + = pixels;
setTimeout ( 'moveall ()', time);
)
\\ \\ \\ \\ \\ \\ \\ \\ / U0026lt script>

You can take the 3 things that right for images, including:

1. Background - change CSS values for the position of the best images that appear on the meeting at the middle end.
2. - The time variable is the speed happens to the movement. 1000 equals 1 second.
3. Movement in pixels - the pixels of the variable is moved, the number of pixels per second. You can adjust this change to an individual.

Z Programmer said...

Use 4 divisions with absolute position (1) per image, the width / height ratio and Y-position on the page properly configure the division meet and move where you want with javascript.For example: \\ \\ \\ \\ \\ \\ \\ \\ u0026lt; div id = "div1" style = position: absolute; left: 0; top: 0; "> src =" your \\ \\ \\ \\ \\ \\ \\ \\ u0026lt; image img "> \\ \\ \\ \\ \\ \\ \\ \\ u0026lt; / div>
Then in javascript
var NS4 = (document.layers)? true: false;
var IE4 = (document.all & & document.getElementById)? true: false;
Var IE5 = (document.all & & document.getElementById)? true: false;
if (IE4 | | IE5) document.all [ "div1"]. style.left value = x;
if (NS4) document.layers [ "div1"]. left = value of x;
if (IE4 | | IE5) document.all [ "div1"]. style.top = YValue;
if (NS4) document.layers [ "div1"]. YValue = top;
the shift can create script using the X and Y values for the 4 different images. I think it works, but I have not tried.

Post a Comment