clipping questions

P

Pugi!

I am currently experimenting a bit with clipping (with banners).
1. Is it possible to do more then one clipping on a image. For example:
image of 400px x 80 px:
var TELLER = 0;
function unfoldPic() {
TELLER++;
if (TELLER <= 80) {
CURR_PIC.style.clip = 'rect(0px 400px ' + TELLER + 'px 0px)';
window.setTimeout('unfoldPic()', 30);
}
}
This reveals the new pic gently from top to bottom.
But I would like to do something like this.
var TELLER = 0;
function unfoldPic() {
TELLER++;
if (TELLER <= 10) {
CURR_PIC.style.clip = 'rect(0px 400px ' + TELLER + 'px 0px)';
CURR_PIC.style.clip = 'rect(10px 400px ' + (TELLER+10) + 'px 0px)';
CURR_PIC.style.clip = 'rect(20px 400px ' + (TELLER+20) + 'px 0px)';
CURR_PIC.style.clip = 'rect(30px 400px ' + (TELLER+30) + 'px 0px)';
CURR_PIC.style.clip = 'rect(40px 400px ' + (TELLER+40) + 'px 0px)';
CURR_PIC.style.clip = 'rect(50px 400px ' + (TELLER+50) + 'px 0px)';
CURR_PIC.style.clip = 'rect(60px 400px ' + (TELLER+60) + 'px 0px)';
CURR_PIC.style.clip = 'rect(70px 400px ' + (TELLER+70) + 'px 0px)';
window.setTimeout('unfoldPic()', 100);
}
}
To give the impression that there 8 blinds/layers opening/revealing the new
pic.
I am afraid that to accomplish this I will have to divide each image in 8
layers to be able to do this and address each and everyone of these layers
seperately.

2. Can one do clipping with something else then rect ? Ellipse, circle, ....

thanx,

Pugi!
 
V

VK

Pugi! said:
I am currently experimenting a bit with clipping (with banners).
1. Is it possible to do more then one clipping on a image.
To give the impression that there 8 blinds/layers opening/revealing the new
pic.
I am afraid that to accomplish this I will have to divide each image in 8
layers to be able to do this and address each and everyone of these layers
seperately.

Not necessary. You can have a matrix of non-transparent div's atop of
your image and shrink them in a loop. Microsoft transition does the
desired effect in one line of code, but unfortunately not supported by
anyone else.
2. Can one do clipping with something else then rect ? Ellipse, circle, ....

The same approach but use clipping images (of circles etc) atop of the
image you want to reveal.
 
P

Pugi!

VK said:
Not necessary. You can have a matrix of non-transparent div's atop of
your image and shrink them in a loop. Microsoft transition does the
desired effect in one line of code, but unfortunately not supported by
anyone else.


The same approach but use clipping images (of circles etc) atop of the
image you want to reveal.

Hmmmm, you gave me some ideas. Still have some questions, but will start new
thread.

Pugi!
 

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

No members online now.

Forum statistics

Threads
473,768
Messages
2,569,574
Members
45,051
Latest member
CarleyMcCr

Latest Threads

Top