I've created a light version of DOS in flash a few months ago :P
It works with a commandline pretty much as how you described your
application. In my case the first word of the command typed in was a
method, optional attributes were the arguments. It was first filtered,
then sent to the class's __resolve method. There it called the
function, if available, with the optional arguments.

At the bottom of this page you can try it out:
http://portfolio.mediamonkey.nl/Misc/Misc.html

If you're interested I could send you some code.
Greets, Bart

2006/8/22, Palmer, Jim <[EMAIL PROTECTED]>:

I have yet to battle with manifesting something of the sort. I really like your 
idea of using a variable watch.

I've had much better luck capturing keys on just pure movie clips. I think you 
have greater control over user input if you're using a MovieClip.onKeyDown 
instead of capturing input on a TextField.type='input'.

You could have a root movieclip that contains the onkeydown event handler as 
well as a textfield.type='static' that you could render every new character.

cut and paste might be an issue.

holding the key down might be an issue (could resolve with chained 
setinterval()).

I'm sure there are other caveats that might be encountered with trying to 
simulate a textfield.type='input' but I think it might be a viable option.

--
Jim Palmer ! Mammoth Web Operations

> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of Dan
> Efergan
> Sent: Tuesday, August 22, 2006 10:19 AM
> To: Flashcoders mailing list
> Subject: [Flashcoders] OS style command prompt
>
>
> The other post "Word Processor in Flash" reminded me of a problem I
> had a while back which I'm sure someone on this list would have an
> idea how to get round.
>
> I was trying to build a Flash application that behaved much like a
> command line OS.  So it consisted of an input text field, which
> printed text and waited for commands to be written into it before
> performing certain procedures.
>
> The crux of the problem involved catching input commands, such as
> delete, enter etc, before they were applied to the Text field itself
> so they could be interpreted and more importantly controlled.
>
> I tried running a watch on the textfield variable,  which so nearly
> let me do everything I wanted but wouldn't allow me to disallow the
> functionality (delete would still delete even though you got
> a chance
> to view the changes before they were applied).
>
> Does anyone have examples of this kind of functionality already
> built?  I assume a constant updated variable of the content must be
> created to allow switching back to previous states if the user does
> something that's not allowed.  A running example would be a
> great help.
>
> Thanks,
>
> Dan Efergan
> [EMAIL PROTECTED]
>
>
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to