Forum Discussion
Fake a Blinking Cursor
This is very helpful! I'm going to try it today. A few questions.
What do you mean by this:
If you then need to MOVE your cursor as the user types (just like in DOS), then I would just use a state in Layer 1 for each position of your cursor (1,2,3,4,5... etc)
Do I set the layers to show the base layer?
How would the javascript go?
Thank you so much!
Sorry Kris, only now did I realise your questions were to me!
So yes, when you need to move that cursor when the user types, you will simply move from one state to another in Layer 1. Each position of the cursor will be set up as a different state in the layer.
Im not sure what you mean with this one - "do i set the layers to show the base layer?", but dont worry too much here. The base layer will show automatically, and this is where you will have your text input field. The additional Layer 1 and Layer 2 are only there to make a fake cursor blink.
Therefore, as long as you show Layer 1 when you start to type, the rest will take care of itself.
You asked about the javascript...
Ive attached an actual Storyline project file here with the JS in it.
It works!... and I messed around a little to refine it (for example I noticed when comparing it to DOS, that the DOS cursor doesnt blink uniformly, it actually doesnt blink when you type, so I have tweaked my SL file to mimic this behaviour)
It could do with more polish though! :)
Does this help for a solution?