Results 1 to 6 of 6

Thread: Typing Text Script options

  1. #1
    Join Date
    Jun 2006
    Location
    Carmona, Seville, Spain.
    Posts
    66
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default Typing Text Script options

    1) Script Title: Typing Text Script

    2) Script URL (on DD): http://www.dynamicdrive.com/dynamicindex10/text5.htm

    3) Describe problem: I'm finding Twey's Typing Text Script very useful for my students learning English. The students first study and learn a text then test themselves on it by attempting to say the words aloud just before they appear "typed" on the screen.

    For this reason, it would be useful to have a pause/play button so the typing can be halted and then resumed. I've searched on the Internet but it seems pausing javascript while running is not straightforward. Additionally and optionally, if possible, although I can control the speed as a variable in the programming, it would be useful if the students could speed up or slow down the appearance of the typing text via a button or similar.

    I'm using the "example2" version.

    Thanks in advance to any contributions made here.

    Mike

  2. #2
    Join Date
    Jun 2006
    Location
    Carmona, Seville, Spain.
    Posts
    66
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    So this is just not feasible, right? Please let me know. Thanks.

  3. #3
    Join Date
    Jun 2006
    Location
    Carmona, Seville, Spain.
    Posts
    66
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Still struggling with this. I have a start button just by calling the function. <button onclick="TypingText.runAll()"> Can't I have another button that will pause the text? And then resume? This is necessary as the texts are long and it gives time for the student to think.

  4. #4
    Join Date
    Jun 2006
    Location
    Carmona, Seville, Spain.
    Posts
    66
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    I'm surprised you just get ignored here. DD didn't used to be like that. Ho hum.

  5. #5
    Join Date
    Mar 2011
    Posts
    1,926
    Thanks
    59
    Thanked 105 Times in 103 Posts
    Blog Entries
    4

    Default

    Quote Originally Posted by green View Post
    I'm surprised you just get ignored here. DD didn't used to be like that. Ho hum.
    Hey Green. Sorry to hear that you feel that. Unfortunately DD Is just a user forum that relies on members of the community to help out. The original writer of that particular script is no longer around.

    What you're asking for is possible without any modifications to the script itself.
    Please check out the following example page that should have the features you asked for -

    HTML Code:
    <!DOCTYPE html>
    <html>
    <head>
    	<script type="text/javascript" src="TypingText.js">
    	/****************************************************
    	* Typing Text script- By Twey @ Dynamic Drive Forums
    	* Visit Dynamic Drive for this script and more: http://www.dynamicdrive.com
    	* Please keep this notice intact
    	****************************************************/
    	</script>
    
    </head>
    <body>
    	<p id="example2">This text has a <b>slashing cursor</b> at the end. <br />And this is on a new line, thanks to the <br> tag.</p>
    
    	<input type="button" id="pause" value="pause">
    	<input type="button" id="resume" value="resume">
    	<br />
    	<input type="text" value="100" id="typingSpeed"><input type="button" id="changeSpeed" value="Change Speed">
    
    	<script type="text/javascript">
    
    		typer = new TypingText(document.getElementById("example2"), 100, function(i){ var ar = new Array("\\", "|", "/", "-"); return " " + ar[i.length % ar.length]; });
    
    
    		document.getElementById("pause").onclick = function() {
    			typer.running = true;
    		};
    
    		document.getElementById("resume").onclick = function() {
    			typer.running = false;
    			typer.run();
    		};
    
    		document.getElementById("changeSpeed").onclick = function() {
    			var speed = document.getElementById("typingSpeed").value;
    			typer.interval = speed;
    		};
    
    		typer.run();
    
    	</script>
    
    </body>
    </html>

  6. The Following User Says Thank You to keyboard For This Useful Post:

    green (04-24-2019)

  7. #6
    Join Date
    Jun 2006
    Location
    Carmona, Seville, Spain.
    Posts
    66
    Thanks
    6
    Thanked 0 Times in 0 Posts

    Default

    Hey, Keyboard

    Came back to DD for a peek and found your post and solution for the typing text script. Just played around a little with the code and it seems fine. I'm looking forward to getting it up and running for my students. I really appreciate your contribution. Thanks very much.

    I hope Twey is continuing his fine work elsewhere.

Similar Threads

  1. Problem With Typing Text Script !!!
    By why not in forum Dynamic Drive scripts help
    Replies: 13
    Last Post: 02-25-2008, 02:47 AM
  2. Typing text
    By favorite_radio in forum Dynamic Drive scripts help
    Replies: 22
    Last Post: 04-25-2007, 08:29 AM
  3. Typing text
    By chechu in forum Dynamic Drive scripts help
    Replies: 8
    Last Post: 11-11-2006, 01:55 PM
  4. Typing text
    By chechu in forum HTML
    Replies: 4
    Last Post: 11-10-2006, 11:53 AM
  5. Typing Text Script Speed
    By backyarder1 in forum Dynamic Drive scripts help
    Replies: 2
    Last Post: 06-01-2005, 09:14 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •