A Flash Developer Resource Site

Results 1 to 5 of 5

Thread: Simulator?? Is something like this possible ?

  1. #1
    Junior Member
    Join Date
    Aug 2003
    Posts
    9

    Simulator?? Is something like this possible ?

    Hey everyone... first of all, great forum.

    Well this is going to be a bit long, but it would be kewl if some people could help me out.

    Basically I have never used Flash MX < Only Swish... don't hate me >, and right now i'm trying to figure out what tool I need to purchase at work, Flash MX, or Director MX.

    At work we use a system called AS/400 to view customer information... I guess the best way to describe it is to call it somewhat DOS based. Everything is accessible through one window, and Keyboard function keys. We need to create a simulator for training that would basically look like the actual system.

    Four years back our company outsourced this project and it cost over $15, 000 So we're trying to do things a little different The application they created execute in Macromedia Projector, so I'm guessing the file itself is a FLASH file, am I correct ?

    I guess I can take you through a couple screens, and it will make a little more sense...

    1st screen. Basically a logon screen, you enter you user name, and a password, and press F1 to logon.

    2nd screen. Two fields. You enter a customer account number and press F5 to view account information, and lets say F6 for help.

    and so on...

    What it appears they did when they created the simulation, is they simply took screen shots of all the system screens, and you're basically navigating between them with Function keys. The simulator is not at all connected to a system (obviously), and they assigned specific numbers, and user names for people to log on.

    so here are some questions (if this makes any sense at all :

    - Does this sound like it could be done in Flash
    - Is it relatively easy to make keyboard function keys work within a flash application? ... like F1, F5, SF5... and so on? Would it have to be launched in projector?
    - Do we need to get Flash MX, or Director MX to create something like this?


    Sorry for making this long, and I don't know if it makes any sense... so if you have any questions... or possibly example of something similar to this... that would be awsome.

    THANKS !!!

  2. #2
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    This would be pretty easy to do in Flash.

    First, take all your snapshots and save them as JPEG files (standard format, not progressive). Give all the snapshots names or id numbers. Then create a state diagram or table that shows all the possible states the software can be in. The diagram is you map of transitions between states. The transitions are defined by the key the user presses in each state. This is the blueprint for the ActionScript state machine you will write. The code starts in the "start" state and waits until it sees a key (or key combination) and then, based on the keypress, decides which state to move to (and which JPEG to display). This just repeats until the users hits the quit key that ends the projector.

    state: start
    display start screen
    on F1 goto logon state
    on F3 goto help state
    on F12 goto quit state

    state: logon
    display login screen
    on F1 goto begin state
    on F3 goto help state
    on F12 goto quit state

    state: begin
    ...
    ...

    There will obviously be transitions that appear in almost every state (like F3, F12). In those cases it's easier to assume that those transitions are always there and just identify the states where they should be left out (if any).

    The table above is just an example. Your own state map can be in any format that helps you identify all the states the system can be in. Finding all the states is crucial if you want to properly simulate the operation of the real system.

    Once you have the state map, translating it to ActionScript is just grunt work. However, there's an old "theorem" (actually, it's more like accepted wisdom) that states that any problem in computer science can be solved by adding a level of indirection. What happens if we try and find a way to apply the theorem to this problem?

    Instead of writing custom functions for each state (the easy but long way) we could store the state map in a format that can be used in Flash. Now the task becomes writing generic code to manage the current state and process state transitions when keys are pressed, a lot less code for a little up front effort. It pays off the first time you need to "tweak" the diagram. All you have to do is change the table instead of rewriting code.

    Setting up the architecture for a system like this is literally a weekend job if you know what you're doing with Flash. Perfecting it to handle all the special cases you'll run into (and you will) when you start letting people try it, shouldn't take more than a week if the system is a simple as you make it sound. That should keep the project cost under the $15K pain threshold

  3. #3
    Junior Member
    Join Date
    Aug 2003
    Posts
    9

    Thanks

    Thanks for the reply Northcode... it all looks great.
    Question for you though... I don't know how bored you are this weekend (or anyone else reading this)... but if I posted maby 2 screen shots here, could you enable the function keys, and post the actual flash file? This way I could take a look at it and see exactly how it was done.

    Thanks for your help !!!

  4. #4
    Senior Member
    Join Date
    Apr 2002
    Posts
    219
    I would recommend something like WebEx Check them out, they have a real good selection for these kind of projects... craete tutorial and so on.

    webex.com
    Got Windowless Projector? Visit Flash 'N Pack at :
    www.flashnpack.com

  5. #5
    Lifetime Friend of Site Staff Northcode's Avatar
    Join Date
    Dec 2000
    Location
    Whitehorse YT
    Posts
    3,766
    If you go looking, there are probably dozens of packages that will let you build demos and interactive tutorials. Most of them are very good, but make no mistake, you will have to learn and accept their way of doing things, and Jeebus help you if you need to do something they don't provide support for.

    If you have the time and the budget, Flash is a viable alternative and a lot more fun I've got no shortage of work to do, but go ahead and post a couple of screens (or send them to support@northcode.com) and I'll take a peek at them. I can show you how to do it with pure code, no tables (that's the "hard" but fast way) and you can decide how to proceed from there...

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