How can i make a text in the app that the user is able to scroll down and up ?

samnextsamsamnextsam Member Posts: 33
edited February 2012 in Working with GS (Mac)
How can i make a text in the app that the user is able to scroll down and up ?
Best Regards Sam

Comments

  • chaleychaley Member, PRO Posts: 226
    I've been wondering the same thing. I have a "shop" in my game and it'd be great to have a scrolling window instead of multiple screens.
  • Braydon_SFXBraydon_SFX Member, Sous Chef, Bowlboy Sidekick Posts: 9,273
    This might interest you.

    http://gshelper.com/?p=516
  • samnextsamsamnextsam Member Posts: 33
    Hi thanks for the help,
    but when i put in the text and scroll, it doesn't stay there,
    The scrolling just get reseted.
    Pleas help have to get scrolling work.
    Best regards sam
  • ashtmjashtmj Member, PRO Posts: 405
    I think you want this:
    you'll only need to use the y or x, which ever way you are making the text scroll.
  • samnextsamsamnextsam Member Posts: 33
    edited February 2012
    Hi
    Thanks for the help
  • samnextsamsamnextsam Member Posts: 33
    Hi
    Thanks for the help i was able to create a scroll. But the problem is when i take away my finger,
    when i am trying to scroll the text again it won't work then. help pleas,
    Best regards Sam
  • ashtmjashtmj Member, PRO Posts: 405
    edited February 2012
    no problem, but really the thanks goes to tshirtbooth.
    did you make sure in otherwise you set drag to false?
  • samnextsamsamnextsam Member Posts: 33
    Hi
    Okay but thanks anyway.
    Yes i have done.
    I don't now why when i take away my finger from the screen and try to scroll again it won't work then.
    Do i have to ad something ?
    best regards sam
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I decided to try to make scrolling text and was successful: http://dl.dropbox.com/u/19602014/ScrollingTextv0.2.zip. I haven't commented it and it is based on quite a bit of trial and error where the math is concerned, but maybe you can find something useful from it.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • samnextsamsamnextsam Member Posts: 33
    HI
    Thank's, for the help.
    Best regards Sam
  • robert.mccarthyrobert.mccarthy Member Posts: 165
    Hi All,

    Found this post, and it helps me a lot with my vertical (Y only) scrolling text.

    However, I want it to stop being able to be scrolled when it reaches certain areas (i.e. the end)...how do I set limits to do this?

    Thanks again,
  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    I'm not entirely sure how to do that. I wasn't happy with the way it continues to scroll at the top and bottom edges, but I didn't work out a solution. I may think something up but in the meantime, anyone else (@MotherHoose) have a good idea?

    I played around with self.position.y on the text actor but if I use a condition for the top edge (e.g. y=34), I can either not ever scroll or I can always scroll.

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

  • tatiangtatiang Member, Sous Chef, PRO, Senior Sous-Chef Posts: 11,949
    edited March 2012
    @robert.mccarthy: Okay, I solved the problem. Just needed to add a rule to the text actor that says if self.Position.Y<34 then change attribute self.Position.Y to 34; and a rule that says if self.Position.Y>440 then change attribute self.Position.Y to 440.

    Here's the new version: http://dl.dropbox.com/u/19602014/Scrollingtextv0.3.zip

    New to GameSalad? (FAQs)   |   Tutorials   |   Templates   |   Greenleaf Games   |   Educator & Certified GameSalad User

Sign In or Register to comment.