How can I create a scrollable text box, that scrolls when finger drags

StormyStudioStormyStudio United KingdomMember Posts: 3,989
edited November -1 in Working with GS (Mac)
Good morning,

I've searched the forum/wiki. (possibly not using right search term).

I want to create a tips page for my current game.

The page has a piece of static title text, and 'Back' button and the tips are created on one tall image (png with alpha), and there is a static background.

I want to make it so the user can click and drag down through the text , just like on the the iphone web browser, ipod music selection etc etc. Would only need to work in the 'x' axis.

Tried a few things, but nothing works as yet. Possibly due to a sleepless night looking after my new baby daughter (now 4 whole days old) ....not all bad as she has been the inspiration for my first proper game. Plus she's pretty damn gorgeous.

Any hints, would be great.

Cheers

Jon

Comments

  • scitunesscitunes Member, Sous Chef Posts: 4,047
    Congrats! (hopefully she didn't get your arms ;-> )

    I have tried the same thing you are working on and this is what I came up with. Create two boolean attributes (scrollup and scrolldown or something). Then create two button actors. In each actor have a rule that says when pressed change scrollup to true (same for other button with other attribuute).

    Then create am actor called scrollcamera. In this actor put a control camera behavior. Then a rule that says when scrollup is true move DOWN. This makes the camera move down which makes the textbox in the background appear to move up. Do the opposite for when scrolldown is true. It's not the same as using your finger in your iTunes playlists but it gets the job done and if you make a nice looking pair of buttons it can come out very professional.

    good luck. let me know if you do get it to work like iTunes.
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    cool, thanks for the post. Will have think about a possible itunes way, otherwise your ideas will be the way forward.

    Cheers Jon
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    struggling to get it to work still...

    can't see where its gone wrong...
  • StormyStudioStormyStudio United KingdomMember Posts: 3,989
    sorted....deleted it all and started again....(made it nice and simple in the end) seems that it did'nt like have one button for up and one button for down, seemed to cancel each other out. But when I used 'mouse position over' rather than 'mouse button down' on the buttons it seems to work fine.

    Cheers

    Jon
Sign In or Register to comment.