A Flash Developer Resource Site

Results 1 to 3 of 3

Thread: Need suggestions on logical approach

  1. #1
    Junior Member
    Join Date
    Jan 2002
    Posts
    8

    Need suggestions on logical approach

    If this is not the correct area to post in, I apolozige. I am just looking for some input/suggestions on the most efficient way to proceed.

    A while ago, I put together a sort of simulator for a product. The real product is a touch screen menu system. The one that I put together was very basic and was just a short demo of the actual product. There were about 50 screens total and just gave a brief overview of the product. I was just beginning in Flash at that time and there was a lot of goto’s and everything was placed individually, including each letter symbol for each word on each button. Since then, I have been requested to expand this project. Instead of 50 screens, there will possibly be several thousand. Placing everything individually as I did before just is not feasible and will get very confusing. My actionscript abilities are better now and I can usually figure out what I need to do to make something happen. When I can’t, I just search the boards. Right now, I am just looking for some advice on a logical approach.

    Here is a basic overview of the button portion of what I am working on.

    Buttons:
    Each screen consists of up to 9 rows of buttons. The possible buttons for each row will be either: 1 large, 1 or 2 medium and 1, 2 or 3 small. In each instance, the button can be either on, off or hidden (black letters on white for on, white letters on black for off) with only 1 button on at any given time (whatever was last clicked).

    Button Text:
    Each of the buttons display various words. There are a fixed number of character positions available for each size button (Large-30, Medium-15, Small-10). The possible combination of words is unknown and large; therefore I cannot just create a bunch of buttons with the words and go from there.

    The advice I am seeking. What would you suggest as being the most efficient way of handling this project in regards to showing the correct buttons and text for the buttons through actionscript. I am using text symbols instead of text. This project is going to just keep being built upon and I would like advice from the experts on what would be the most logical way to begin so that updating and adding new areas is relatively painless in the future.

    Thank you in advance for any advice you can offer.

  2. #2
    Funky Fly Flasher poyla's Avatar
    Join Date
    Dec 2000
    Posts
    228
    Sounds to me like you should build a menu movie and use tell targett on your buttons to tell that movie where to go, and when. Pretty easy to update too.
    IF this is too vauge let me know and I can give you an example.
    -poyla

  3. #3
    Senior Member SJT's Avatar
    Join Date
    Mar 2000
    Location
    London, UK
    Posts
    2,563
    This is a classic example to use object orientated programming in.

    Briefly, you want really to make a button class, and then several subclasses to adapt the button class to the different possible scenarios you outlined.

    You can then give the button class methods to set it's own text, and set up a control object to control the state of the buttons (which one is currently pressed, etc), which the buttons can all listen and message to.

    Check out the tutorials at macromedia, and look through senocular's threads in the as forum about oop.

    http://www.macromedia.com/devnet/mx/flash/

    You might also like to check out some of the books in the recommended reading section.
    Sam



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