View Full Version : [DHTML] Image Warper
08-21-2006, 02:13 AM
1) CODE TITLE: Image Warper
2) AUTHOR NAME/NOTES: Michael Burt
3) DESCRIPTION: Visually warps the image specified. Instructions on how to use are on the page below.
4) URL TO CODE: http://www40.brinkster.com/mburt/scripts/warp_image.htm
08-21-2006, 02:27 AM
Couple questions, why are you using eval? and what is the point of the new keyword?
Answers, could be wrong but it's a guess:
why are you using eval?To prevent the numbers being concatenated as a string. This isn't necessary, remove "eval" and simply use the brackets to make sure the addition is processed before the concatenation.
and what is the point of the new keyword?There is no point, here. mburt, new is only useful if you intend to assign properties to the created object.
Also, flexibility could be improved by using position: relative; rather than position: fixed;.
08-21-2006, 02:35 PM
Thanks Twey I'll look into those measures.
I forgot to take out the "new". I was going to make the images elements, and assign properties through the new function, but I changed my mind and forgot to take it out :)
08-21-2006, 02:38 PM
blm126: If you said 1 + i, without brackets or eval, the string would literally be 1 than whatever variable i was.
If I is one:
If I is two:
It wouldn't actually add the string, which in this case is what I want to do :)
08-23-2006, 09:38 PM
yes, I know that. but what I didn't get is why you were using eval instead of brackets
08-25-2006, 06:46 PM
I dunno. I felt like it :p
Powered by vBulletin® Version 4.2.2 Copyright © 2014 vBulletin Solutions, Inc. All rights reserved.