Scrolling Text Object (No plugin, no masking)

Discussion and feedback on Construct 2

Post » Wed Aug 06, 2014 4:16 pm

I have searched the forums and have not found a solution not involving masking or a third party plugin, so I am posting this in hopes that someone else may find it useful.

I am working on a project that has need of a scrolling Text Object (not text box). I didn't really want to install a third party plugin to accomplish this (it appears that they do exist,) and masking was not workable, so I started looking at a different solution. This, while not the most elegant or attractive, definitely accomplishes a "scrolling" type of effect that is sufficient to allow the text object's overflow content to be readable.

Basically I am storing the full value of the text object in an instance variable (TextHolder), and then establishing a value (ScrollSize) on creation based on the width of the text box. When you scroll your mouse wheel or click the up/down arrows, it parses "TextHolder" and sets the visible text as needed, removing or adding "ScrollSize" characters as needed to move the text up or down. I am using a third instance variable (ScrollIndex) to keep track of how many times the text has been scrolled and ensure that it cannot be scrolled too far in either direction.

I've attached the capx to illustrate this method.

I hope this is helpful to someone, and I'd love to hear if someone has an idea on how this method could be improved upon.

-VocoRobo
You do not have the required permissions to view the files attached to this post.
B
4
Posts: 15
Reputation: 232

Return to Construct 2 General

Who is online

Users browsing this forum: No registered users and 6 guests