468,115 Members | 2,103 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,115 developers. It's quick & easy.

clipping questions

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!
Mar 15 '06 #1
2 1365
VK

Pugi! wrote:
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.

Mar 15 '06 #2

"VK" <sc**********@yahoo.com> schreef in bericht
news:11*********************@j33g2000cwa.googlegro ups.com...

Pugi! wrote:
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.


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

Pugi!
Mar 15 '06 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

1 post views Thread by John Hunter | last post: by
14 posts views Thread by Doug van Vianen | last post: by
reply views Thread by phil cunningham | last post: by
2 posts views Thread by zeyais | last post: by
9 posts views Thread by Andy Baxter | last post: by
2 posts views Thread by Rune Jacobsen | last post: by
5 posts views Thread by didacticone | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.