A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: registrate characters

  1. #1
    Junior Member
    Join Date
    Jun 2000
    Posts
    26

    registrate characters

    I want to make an easter egg in a presentation i made.
    And i want it to occur when the user for example types
    "christmas" during the presentation. I know how to do
    an action when a user presses one key but is there a
    way to registrate a word and then do an action?

  2. #2
    Senior Member of Toon Army lucky-black-cat's Avatar
    Join Date
    Aug 2002
    Location
    Benarraba Andalucia Spain
    Posts
    303
    Hi

    You can use an input text field.

    You can then do a check on whether Christmas was the text that was input ... you still need a 'submit button'.

    Hope this helps.
    http://www.property-in-the-sun.com
    Cheap Holidays in Andalucia Spain for Flash Programmers from 2005!

  3. #3
    Senior Member
    Join Date
    Nov 2000
    Location
    Jerusalem, Isreal
    Posts
    254

    well... one way of doing that:

    ok...
    first make an input text field OUTSIDE the boundries of your stage on flash.
    give it a variable name - say, "egg".
    second phase, make a function that test that text field on the press of "enter".
    function easter () {
    if (egg != "" && egg == "christmas") {
    you easter code here
    } else {
    return;
    }

    that is the function...
    then to invoke the function make an EnterFrame event handler that triggers the function on the press on ENTER.

    that should be it... i think.
    tell me how it works...
    bye
    Matti Bar-Zeev,
    scriptaholic.

Posting Permissions

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




Click Here to Expand Forum to Full Width

HTML5 Development Center