Scrolling Text

I need some help creating an expression that would move text across face, like a news ticker tape. Anyone know how it can be done?

I am not sure, but if the linear placement is also controlled with the sweep option for movement effect, like rotation has, then it could work. If you put tag [s]*x in the expression for placement, the text will move, but if the sweep does not apply, then it will jump x pixels not more often than once a second, which would not look good.


btw. if the text is long it either moves quickly or takes too long to read and the screen can go down menawhile. Earlier I made me two step ticker with 2s interval. its not ideal, but I got used to it back then. snapshot

1 Like

I was playing again with new GWD on my other PC and found, that once you add [s] into expression field of the placement, there will show field with movement effect, so even linear movement can be set as sweep. Problem I had was, the sweep also applied on the part when the position resets. Tried with text about 300px long, with expression like (0-[s]%3)*100. The text was moving acceptable speed to the left, then faster but still sweeping back (instead jumping) to start position. I like the idea of scrolling text, will play with it some more :slight_smile:

Hi Peter,

Can you explain the expression in plain old English? It gives me headache just looking at it :dizzy_face:
Thanks

Hello, was it (0-[s]%3)*100 that gives you headache?
100 is number of pixels I wanted it to move per second. Then it starts with 0, because I had bad experience with starting minus sign (wanted to add graduating negative value to fixed X coordinate for movement from right to left). And [s]%3 gives reminder of division by 3, values in order 0, 1, 2, 0 every following second. I just don’t know, how to make it sweep from 0 to 2 and jump back from 2 to 0. Maybe I will have to use 2 same texts shifted from each other by one second and hidden for the returning part.

Thanks for the explanation. What is [s] variable’s value when used in Placement?

I’ve been playing around with conditional timeline loop (show/hide) to hide the returning part, but it doesn’t work that well.

It’s it possible to use four expressions to create a rectangular path like this?
image

1 Like

No matter where, variable [s] has values 0-59 and [s]%3 makes 0,1,2 out of it. But that is not so much important here. What I didn’t know and discovered later is, that the sweep effect shifts the movement in the position one second behind current position. Try to make image rotate by [s]*6, apply a sweep movement effect and watch seconds on digital clock in same face. It reaches the position given by expression in moment, when it actually changes to next one. I don’t say it is bad, just unexpected. Unexpected, because when you add two second hands and set one of them to sweep, they meet on the exact second moment, not one second after. The ticking hand is chasing the sweeping.

1 Like

I managed to make 3 texts to sweep scroll in one row with expressions like (0-[s]%3)*160, (0-([s]+1)%3)*160, (0-([s]+2)%3)*160. It needed to hide the first second on the timeline. I would add the example here, would be easier as to explain by words, but I dont see option for sharing files on this forum.

1 Like

I’ve replicated it based on your screenshot. This method is still showing the returning part, right?

After playing around with conditional time, I don’t think returning part can be hidden with conditional time time. Because conditional timeline puts expression on hold (expression is not running) while expression object is hidden by the timeline.

No, it is not showing returning part. The condition line hides it, if first second in each 3s loop is hidden. I will post the example on old forum, when I get to my other PC.

I found out that the returning part behaved different in 1.8.0 than now in 1.8.1.
Will play some more and try to document it.

2 Likes

Ok, played with it some more, reinstalled 1.8.0 back, restarted PC, then recorded screen. Result is here https://youtu.be/rJLFowkqXbQ. Done such video first time, so its not polished. If you are willing to test the sample file on actual watch (I don’t have such), you can find it here: https://developer.samsung.com/forum/board/thread/view.do?boardName=SDK&messageId=380224&messageNumber=105782 and if you do, please let us know how it worked.

2 Likes

Hey, in case you have found an answer, please share with me as well! I’m also looking for information on it.
Thanks.

Thanks Peter for sharing! It looks great! My experiment of 1.8.1 is doing exactly the same thing in your video. I’ll play with 1.8.0 when I get some free time. I wonder what changed in 1.8.1, perhaps we should suggest GWD team to revert position expression back to 1.8.0.

Could you try your or my experiment on a watch? Maybe there it behaves differently. Maybe even some more wicked way :slight_smile:

This looks like a bug to me, we requested files not just images. I’ll see what I can do to fix this.

Ron
Samsung Developer Program

1 Like

Perhaps we should also suggest, that the sweep movement starts right away, not one second belated.

I’m not sure that is possible, I’m not a Tizen developer (not much of any programmer any more) but it looks like you use the one second tick events to start a function and you can’t go to a previous tick event.

Ron
Samsung Developer Program

I am not sure either, and I don’t mind to add the extra second into my expression (maybe that’s the way how the original sweep second hand component was made), it just isn’t intuitive nor is it documented.

Good point! I just tested my own experiment on the watch with 1.8.1. Results are mixed, returning part (after end of scroll) is always visible in GWD emulator. On the actual watch, conditional timeline actually hides return part, BUT not always. Some builds of the identical file have shown returning part, really strange.