A Flash Developer Resource Site

Results 1 to 10 of 10

Thread: disable clicking-through?

  1. #1
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404

    disable clicking-through?

    hey,
    does anybody know how I can disable clicking through an object so it doesn't effect anything under-neath the object when pressed, anyone know how I can fix this, if nig13 replies lol which I bet you will :P cause your a flash wizard:

    when I click anywhere on the box my character would pretty much walk under it, is there a simple solution?
    Last edited by AS3.0; 02-05-2012 at 09:35 PM.

  2. #2
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    did someone call me ;D??

    just give the movieclip button properties, like make it clickable but do nothing, and hide the hand cursor:

    Actionscript Code:
    game.clip.char.onPress = function(){ }
    game.clip.char.useHandCursor = false;

    but this will affect all of the movieclip, so maybe you should cut out those unnecessary blank spaces in the bitmap for the character :P

    Hooope this helps
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  3. #3
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    oh I see exactly what you did there I think. But I think you misread what I was asking I meant when I click my box my character would walk under it so wouldn't it be like:

    game.tile0.onPress = function(){
    }

    or idk im going to try but im not good at reading tonypas part of the code lol at most I only know how to edit his code abit

    And I already had the usehandcursor = false on almost everything it just makes things look better to me lol. Only thing that hand cursor looks good on is like an X button and stuff like that.


    wait ive come up with something, I made a test on another as2 thing and if a button is over another button the button underneath wont be pressed because the top button blocks it, I was trying to do that but than I realized the tiles are dynamically attached so I probably have to give the button the highest depth?

    nope that didnt work either.

    And thanks dude, if this game ever gets far enough to make money you are the first one i'd share it with,
    even if it makes 1 dollar you get 50 cents
    Last edited by AS3.0; 02-06-2012 at 12:52 AM.

  4. #4
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    I am still not sure about what you want `(>.<)"

    maybe more details 'n' stuff :P?

    and no need to share the earnings with me, I just think it's fun to help you
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  5. #5
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Ok when I go to buy something from that guy as seen in the picture the Hatchet shop pops up. so the problem is if I click somewhere on my hatchet box my character walks to the tile I clicked on under the hatchet shop box. So I dont want my shop GUI thing to allow you to click through it. Idk how to explain it anymore.

  6. #6
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    make an invisible button as huge as your shop, inside it, in the bottom-most layer, and disable hand cursor xD??
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  7. #7
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Nah I tried that for some reason it works on a separate flash document i tried it on but not here. w.e no worries not really a big problem just had some OCD over it :P if you ever come across the answer help heh

  8. #8
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Hey nig, using tonypas iso code do you happen to know how I can click lets say a tree and the character would walk like infront of it. I have alternatives but I think if that is possible it would make game play easier in my game.

  9. #9
    Prid - Outing Nig 13's Avatar
    Join Date
    Jul 2006
    Location
    Norway
    Posts
    1,864
    sorry, I have no idea. I am not daring to read through his tutorials, because they seem so complicated and complex, even though I know I can understand if I Just read, but my brain is telling me otherwise :P

    Just a tip, though, if a tree is pressed, maybe you can check if any of the tiles nearby are free, right?
    Last edited by Nig 13; 02-07-2012 at 04:27 AM.
    I am back, guys ... and finally 18 :P

    BRING BACK THE OLD DESIGN!! OR AT LEAST FIX THE AS TAGS

  10. #10
    Client Software Programmer AS3.0's Avatar
    Join Date
    Apr 2011
    Posts
    1,404
    Yeah w.e eventually ill just try to learn that than xD

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center