in touchevents how do i shortin this up a bit


Last Updated: 2013-01-27 17:51:27
  1. flyhigh427

    flyhigh427 Well-Known Member

    hey i need to make this 21 times in my touchevent.
    my question is how/or whats the best way to replace the 0,32,416,480,
    with 21 sets of numbers?
    thanks

    [HIGH]
    if​
    (event.x >= 0 && event.x <= 32 &&
    event.
    y >= 416 && event.y <= 480) {
    if (markercancel==true){
    setmarker=false;
    markercancel=false;
    }
    else{
    markercancel=true;
    markerset=1;
    setmarker=true;
    }

    }
    [/HIGH]

    Advertisement

Share This Page