Swiping Menu for ios : touch button problem

famekraftsfamekrafts Member, BASIC Posts: 834
edited September 2012 in Working with GS (Mac)
Ok I checked out the Multi menu video on youtube by ThsirtBooth.

It was done with mouse, I replicated it for IPAD but the problem I am having is with touch.

When I touch the screen (touch pressed), the drag actor should go to the position of the touch but that is not happening, simply because there is no proper touch expression command for that.

In the the video it was done for mouse position x, which is there but for touches there is Touch 1 expression which isn't the same as event "touch" in the when attribute condition.

How do I make the sliding menu for IOS?

Can anyone help?

Here is image

https://pbs.twimg.com/media/A2aShvpCYAAkk7A.jpg

Comments

  • famekraftsfamekrafts Member, BASIC Posts: 834
    As the Drag actor itself was moving when touched, I came out with a solution. I enlarged the drag actor to fit the total x and y size of the menu and interpolated it to such a way that if it goes out of screen( it is scrolling for some reason). it comes back to the same position even after sliding. Works great for now, but not sure if it will work for the second part, where I have to make the menu items clickable.

    also the size of the actor is huge 4096 width.

    I will still go for that small size if the touch event works.


  • famekraftsfamekrafts Member, BASIC Posts: 834
    edited September 2012
    nope I cannot work on the second part till I fix this part.

    How I can I use touch as event but there is no expression for the touch position?
  • SparkyidrSparkyidr Member Posts: 2,033
    edited September 2012
    As far as I am aware.......
    Mouse.position.x is the same as "touch1.x" isn't it?
    They should be interchangeable. I.E. you can use mouse.position.x to mean a touch's X.
  • famekraftsfamekrafts Member, BASIC Posts: 834
    But will the mouse work in ipad? I read somewhere here we should always use touch to avoid problems later for publihsing on ios? I cannot test on ipad till end of this month, so I will not be able to check whether mouse position x works or not.

    @Sparkyidr are you sure about it? used it any of your ios games?

    It will be messy if I have to change it later.

  • famekraftsfamekrafts Member, BASIC Posts: 834
    well i used the event as touch and expression as mouse position x, its not working.

    Should I use event also as mouse pressed?
  • kinzuakinzua Member Posts: 554
    @wickedsunny yup.. go for mouse pressed.. download @tshirtbooth 's file.. it's free.. :D u'll get a better idea..
Sign In or Register to comment.