User Tag List

Results 1 to 7 of 7

Thread: Auto-Typer Device (Old Printing Style)

  1. #1
    No Products Registered

    Join Date
    Jun 2008
    Posts
    3
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Auto-Typer Device (Old Printing Style)

    This is something I stumbled upon using TGF2 and I thought I would share this cute little tool with you all.

    In old fictional styled, usually fake, computers, they would print one letter at a time very quickly. Another example of this was in the X-Files, where the location and time of a scene would print one letter at a time on the screen.

    I had originally developed a system using a string, and each paragraph I would manually type the text, each paragraph adding the next letter. Then later building a system where:

    Code:
    IF every 1 second THEN add 1 to Counter 1
    
    IF always THEN set paragraph of String to value of Counter 1.
    It worked, but typing the paragraphs was a pain and took far to long and I usually made mistakes.
    No good.

    But, I found a much better system. Its faster and uses much less memory and can use a nearly unlimited amount of text.


    Objects:
    2 strings.
    1 counter.


    Write all the text you want in the first paragraph of the string. Lets call that DataString.

    Leave one string blank, default "Text", or whatever you want. It doesnt matter. Lets call that PrintingString.

    The counter can be left alone. You will probably want it out of sight or set to invisible. Lets leave it as Counter 1.

    Heres the code to use.

    Code:
    IF always THEN Change alterable string of PrintingString to
    Left$(paragraph$( "DataString", 1), value( "Counter 1" ))
    
    IF every (the time you want each letter to appear) THEN add 1 to Counter 1.
    Here is how the code works.

    The first code:
    Code:
    IF always THEN Change alterable string of PrintingString to
    
    Left$(paragraph$( "DataString", 1), value( "Counter 1" ))
    This will keep the text of PrintingString to constantly be the code I have below it. Here is how to create the code:

    Click the Left$ button in the expression editor (its located in the middle to the right of the number pad). The Left$ function will return only a designated amount of characters starting to the left of the string. The word ClickTeam with a value of 4 will return Clic.

    Next, the Left$ function will ask for a string and a value. The string is what will be displayed from the left and the value is how many characters will be displayed. For the string, use DataString, since all your text is written there. You can do this by clicking:
    Retrieve data from an object > Right click DataString > Text of a paragraph.
    The expressions editor will then ask for a value, this is the paragraph you want it to display.
    By default, if you typed all your data on paragraph 1. However, you could make several paragraphs and make it chose by a counter, or random, or any other expression.

    Next, the value of the Left$ is the number of character you want to be shown. This does not have to be a firm number. Due to the amazing flexibility of the expression editor you can set the characters to be displayed to a counter's value, as we have in this example.

    The second piece:

    Code:
    IF every (the time you want each letter to appear) THEN add 1 to Counter 1.
    This simply adds 1 to your counter every second, minute, tenth-of-a-second, or whatever you chose to set for the speed of how the text is to be displayed.

    I hope this will help anyone looking to add this sort of style to their creation, or just to have fun tinkering with it. It really shows you the incredible things you can do with the expressions editor and a little imagination.

    Please feel free to ask any questions or give any comment.

    Happy Creating!
    -Damian.

  2. #2
    Forum Moderator Fusion 2.5 DeveloperHTML5 Export ModuleiOS Export ModuleSWF Export Module
    DavidN's Avatar
    Join Date
    Jun 2006
    Location
    Boston, MA, USA
    Posts
    4,044
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Auto-Typer Device (Old Printing Style)

    "Typewriter text" is probably one of the most requested effects from beginners on this board - at least, I remember a whole spate of topics about it a while ago. This article on them is thorough and well explained - thanks for putting it up.

  3. #3
    Clicker Multimedia Fusion 2 DeveloperSWF Export Module

    Join Date
    Jun 2006
    Posts
    6,773
    Mentioned
    1 Post(s)
    Tagged
    0 Thread(s)

    Re: Auto-Typer Device (Old Printing Style)

    Moved to the Articles forum.

  4. #4
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Auto-Typer Device (Old Printing Style)

    Nifty trick: You can enhance it like this:

    Original String

    "Dave!&&&&&&&&&&&&&
    Don't worry about me,&&& you go on,&& I'll catch up later!"

    What you do

    Make it so on every beat (e.g. 'every 0.02 seconds', every 4 frames, whatever) the system adds the next character to the onscreen display. BUT, it skips '&' (or some other character, you could use a less common one, like '¬' ).

    The result is a pause, where the system finds an &, but prints nothing. Since the pause is the time it takes to generate a single letter, you can work it out like this, e.g.

    I'm drawing 1 letter per 4/100ths of a second (every 0.04 secs).
    In one second, I could draw 25 characters (1 second / 0.04 seconds per character = 25 characters per second)

    So for a 2 second delay, I need 50 '&' characters.

    That's how I always do it, and it adds a subtle beauty of pause to your dialogue. You'll notice that Zelda games do this (ocarina of time, anyone?).

    Have a go!!

  5. #5
    RayMarble
    Guest

    Re: Auto-Typer Device (Old Printing Style)

    Wouldn't it be simpler if you could just have the text you want to appear on screen in paragraphs and then just copy it from there one letter at the time directly to alterable string of the string object? At least that's how I do it and it works flawlessly - using only one object (the string object itself) and no counters or "temp" string objects etc.

  6. #6
    Clicker Multimedia Fusion 2

    Join Date
    Sep 2006
    Location
    Britain, South Coast
    Posts
    1,030
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Auto-Typer Device (Old Printing Style)

    Yeah, I do that too, it's a lot simpler.

    If you don't want to do the '&' stuff (to allow pauses) you can also do thus:

    EVERY [time delay]
    --- Text: set alterable (display) string to:

    'left$(paragraph$("string", 1), len(string$("string")+1)'

    Voila, that should do it.


  7. #7
    Clicker Multimedia Fusion 2 DeveloperiOS Export ModuleSWF Export Module

    Join Date
    Feb 2007
    Location
    Queensland, Australia
    Posts
    317
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Re: Auto-Typer Device (Old Printing Style)

    For Dines' & method I've always coded my own pause which is 20 frames or so, because it's silly to type 50 &'s or whatever you use.

Similar Threads

  1. auto rotations not working with vector on device
    By Nicholas Martin in forum Android Export Module Version 2.0
    Replies: 7
    Last Post: 8th April 2013, 08:54 PM
  2. layout for printing?...
    By Sevennemesis in forum Multimedia Fusion 2 - Technical Support
    Replies: 1
    Last Post: 1st November 2012, 03:01 PM
  3. URGENT : Printing extension
    By arthurh in forum Beta Flash Extensions
    Replies: 4
    Last Post: 11th October 2012, 01:44 PM
  4. Printing more than screen
    By crugh in forum Multimedia Fusion 2 - Technical Support
    Replies: 7
    Last Post: 16th September 2007, 06:20 AM
  5. Printing
    By Tommy in forum Multimedia Fusion 2 - Technical Support
    Replies: 0
    Last Post: 19th February 2007, 03:54 PM

Posting Permissions

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