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