justinmind-logo
 
Upvote 1

each random keystroke types a particular letter in order

In Progress Clmnt 4 years ago

Hi !

I want to have a specific text to appear each time any keystroke is pressed.


I've found this topic which is similar :

https://www.justinmind.com/community/topic/animate-text-input-typewriter

I've tried it but the problem is that the text doesn't wait for a keystroke to be pushed to appear.

It is more of an animation than an interaction.


I'd like to input a specific text and have it appear (be typed) every time a keystroke (any) is pressed.


Thanks a lot if anybody can help me with that !

Replies (1)
photo
1

What trigger are you using for the event? It should work correctly if you use an "On Key Up" trigger.

photo
1

Hi and thanks for your comment !

I tried and there still is the problem that if i just press one keystroke, it displays one letter after another without waiting for any other keystroke (like a regular non interactive animation - you press once and it plays). And there's also the problem that after the first keystroke is pressed, another keystroke pressed plays the animation from the beggining.


But maybe i'm not explaining clearly enough.

Basically, what i'd like to do is exactly like this site :

http://hackertyper.com/

except, instead of syllabes of codes, i'd like for each stroke to be a single letter from a predefined word of my choosing.

And, the essential thing is for it to wait for the next keystroke, as if using a regular text editor or web text entry...But not based on a duration value for it to continue to play, but to display the next letter on the next keystroke hit, etc...

I'm hoping i'm explaining correctly...


Thanks !

photo
1

Thanks for clarifying. In that case, you will need to create an expression that grabs the text you want to display on each key up, and moves and displays it somewhere else. In the attached example, here's what's happening:

1. On the Screen, we've created an "On Key Up" + "Set Value" event, setting the value to a paragraph at the top of the screen. The expression is:

aa28ff02debafb9fd98d8ec24f6b2585

First, it takes the value of whatever's already in the paragraph and adds a space next to it. Then, it grabs the text, starting at the first character, and ending at the first comma.

2. We've created a second "Set Value" action. The expression is:

0dd49824de00d1393197f8acb30cd779

This expression removes the value we just grabbed in the previous expression.

photo
1

Many thanks for your help !

I tested your file and this is what i'm looking for in terms of use.


That being said, i still have a few problems and i'm sorry not to be proficient enough to sort it.

- Would it be possible to have a normal kerning for the words, with spaces in between them ? And also, is it possible to format in an advanced way, like making whole paragraphs with it ?

- Would it be possible to use commas ?


To explain a little bit, i'm trying to use Justinmind to do some interactive on-set screens for movies & TV. Up until then, I used ActionScript 3 in Animate / Flash but Justinmind is easier to use and more future-proof in my opinion.

This kind of interface would be done in a very simple way in AS3 : I would type the text letter after letter with a new frame each time, and would simply put a Goto&Stop (currentframe+1) on the keystroke.


Thanks a lot for the time taken !

photo
1

No problem!

Sure, we can use commas. We can just replace the character between each word/sentence with one we're a lot less likely to use. We've changed it to ~ and have updated the events accordingly. I'm not sure what you mean by kerning in this case. Each time you add one of the words/sentences, it automatically adds a space.

Next, to add more texts, we need to add some conditions. Each condition (except the first) checks to see if the text that was just grabbed is empty, and if the the next text is not empty.

Texts with different formatting than the rest should be separated into their own text.

photo
1

Hi and thanks a lot,

i'm more than impressed with your project file, Justinmind really is powerful !

It's actually more than i can understand for now, i think i have to study conditions to understand it fully.


"I'm not sure what you mean by kerning in this case. Each time you add one of the words/sentences, it automatically adds a space."

I actually have to make letters appear most of the time, which forms words, as if typing manually in a word app...So there is my problem with the fact that it automatically adds a space. If I specified http://www.lsw.com, it appears like this in the output :

w w w . l s w . c o m

How could i simply remove those spaces and at the same time be able to have some ?

I hope i'm clear enough, i basically would like to type the text of this post for example, letter by letter for each keystroke, with spaces in between words of course...


Thanks again...

photo
1

Thanks for clarifying. For those, just remove the first part of the expression that adds a space and they'll be concatenated side by side without spaces. You'll need to make sure that any texts you want to be concatenated without spaces are in the same text you draw from for the event.

photo
1

I'm sorry Danielle, but for now i can't understand the conditions and precisely what is adding a space. I tried removing the first parts of the first condition with no result.

Could you please point me in the right direction ?

photo
Leave a Comment
 
Attach a file