Results 1 to 7 of 7

Thread: [DHTML] Image Warper

  1. #1
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default [DHTML] Image Warper

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

  2. #2
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    Couple questions, why are you using eval? and what is the point of the new keyword?

  3. #3
    Join Date
    Jun 2005
    Location
    英国
    Posts
    11,876
    Thanks
    1
    Thanked 180 Times in 172 Posts
    Blog Entries
    2

    Default

    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;.
    Twey | I understand English | 日本語が分かります | mi jimpe fi le jbobau | mi esperanton komprenas | je comprends franšais | entiendo espa˝ol | t˘i Ýt hiểu tiếng Việt | ich verstehe ein bisschen Deutsch | beware XHTML | common coding mistakes | tutorials | various stuff | argh PHP!

  4. #4
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    Thanks Twey I'll look into those measures.

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

  5. #5
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    blm126: If you said 1 + i, without brackets or eval, the string would literally be 1 than whatever variable i was.

    Ex:

    If I is one:
    11

    If I is two:
    12

    etc.

    It wouldn't actually add the string, which in this case is what I want to do
    - Mike

  6. #6
    Join Date
    Sep 2005
    Posts
    882
    Thanks
    0
    Thanked 3 Times in 3 Posts

    Default

    yes, I know that. but what I didn't get is why you were using eval instead of brackets

  7. #7
    Join Date
    Jul 2006
    Location
    Canada
    Posts
    2,581
    Thanks
    13
    Thanked 28 Times in 28 Posts

    Default

    I dunno. I felt like it
    - Mike

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •