Is an array, the best solution for this problem?

Hello

I work a demo where a couple of small games come in a Panel. There is a main menu which you bounce around to select the things (games as well as other applications.)

When one party runs, it takes up the entire jury. When two or more run, they run in a format "mini." In addition, when a game is running, a special 'return to the game' button in the main menu.

It is a click by dog and pony, see the demo. It is not a production application, but it should work well enough to be played with internal clients. So it must work well.

At this moment I have a few variables put in place as follows:

var gameActive:Boolean = false;
var gameDual:Boolean = false;

In the launch menu and my game function, I check these (and one or two others) variables to see if I should do things like show a mini-version of the game or show return to the play button. I added many features, it becomes a bit difficult to handle.

At stake is the games. Let's say that I only have two. I could make a table and then load in the name of the game, when a game is started. I could check this table in my functions to see not only if the games is launched, but the game is launched so I can use the full or mini games as the case may be.

Is this a good approach, or is there a better way? I'm rusty with my code and not super comfortable, making things right now. But I could go on like this if it was the best.

There's not much to it.  This is the only 3 things that you are likely to need to do with your associative array:

var yourAA:Object = {};

function addAAItem (aa:Object, o: DisplayObject) {}

AA [o.Name] = o;

}

function removeAAItem (aa:Object, {o: DisplayObject}

AA [o.Name] = null;

}

function aaLength(aa:Object):int {}

var i: int = 0;

for (var s:String in aa) {}

i ++ ;

}

Return i;

}

Tags: Adobe Animate

Similar Questions

  • What is the best solution for this idea...

    I have a task I'm trying to test and understand what would be the best solution for this, any recommendations would be appreciated.

    Devices at your fingertips:

    -2 ESXi hosts

    -1 iSCSI SAN OpenFiler (new just installed the app)

    2 ESXi hosts run a small amount of virtual machines that are all in the same domain.  I want to have a file server (or a repository somewhere) that houses a folder with easily accessible software (OS, Office, etc.) on the field.

    According to me, that if I made a virtual machine with a large hard drive and share the software, this would not be the best way because it would be dependent on the OS.  Someone has talked about doing a separte VMDK for it and then install it on the operating system on the virtual machine. This way I could always remove the and mount it somewhere else.

    It seems a bit weird to me that the software within this "shared folder" will also be sitting on the data store (if I create a virtual machine and need to use the OS/etc).  Not that doubles the space for the same software (in the comments, then the data store)?

    What is the best approach to make this action which can be accessed at the prompt (mostly windows) in the field?

    What is the best way to stay away the software doubles in action and on the data store?

    Please forgive me if I put interpereted your question.

    The problem you seem to face is that you must mount the ISOs of VMS software and physical systems that are on the field.

    (please, correct me if I'm wrong on this)

    If this is the case, then the best way to do would be to create sharing NFS on the openfiler, if you use openfiler to main databases also then he would be better for sharing this was separated to prevent the other help to be able to tamper with the VMDK and VMX files for your virtual machines.

    This could then be mounted in ESX to access the ISOs. While being easy to install on Linux and Windows machines to access the ISOs.

    If you have questions about NFS mounting in windows, so, this link may help

    http://sagehacks.WordPress.com/2009/01/21/HOWTO-mount-NFS-shares-under-Windows-7

    If you are needing to access the VMs software and it is mainly the downloading ISOs then th ISO directly to the data store is possible.

    This allows you to use ESX to mount the ISO on the virtual machine.

    On the point that the software will use double disk space when you install the software on a machine virtual car will be on the network share and the VMDK virtual machines in the data store. That's right, and that's by design.

    Each virtual machine under ESXI is 'independent' (http://www.vmware.com/virtualization/virtual-machine.html)

    This means that each virtual computer must have its own copy of the application.

    This perspective reflection of each virtual machine as a separate system of 'physical '. They interact with each other as if they were physical systems.

    Each VMDK resembles a physical hard disk. Being accessible (in most configurations) 1 VM at a time.

    So if you had a set of physical systems connected to a domain and I wanted to install an application on each one, then each would have its own local copy of the application. It's the same thing with virtual machines.

    However

    If you configure a set of physical machines so that you run the software from a network share. It is possible to do the same thing using virtual machines using the exactly the same configuration. However, the chiefs more associated to this are important in both cases.

    Concerning

    Cyclooctane

  • Premiere Pro is mess up my audio/video synchronization. Use Handbrake really the only solution for this problem?

    Premiere Pro is mess up my audio/video synchronization for the images that I downloaded from my iPhone 6 s + (.) MOV files). The files play fine, but once that I put them in Premiere Pro, the audio falls slowly behind the video, probably to cause "variable frame rate." phone I've seen other threads where people had the same problem, and the universal response, I saw was freeware download called 'Handbrake' to convert the frame rate of variable to fixed... but is not sit right with me.

    Uses 3rd party freeware really the only solution for this problem? Video editing software Adobe Professional-grade not really have the ability to solve this problem? If so, what should I do to prevent all Premiere Pro ruin all my pictures to import?

    Hi Christafarian,

    Premiere Pro is mess up my audio/video synchronization for the images that I downloaded from my iPhone 6 s + (.) MOV files).

    You wouldn't be the first. I'm sorry.

    The files play fine, but once that I put them in Premiere Pro, the audio falls slowly behind the video, probably to cause "variable frame rate." the phone

    I found:

    • If you pull the iPhone in a well-lit environment, it records at a constant speed.
    • In lighting challenged environments, you get images image variable rate.

    I've seen other threads where people had the same problem, and the universal response, I saw was freeware download called 'Handbrake' to convert the frame rate of variable to fixed... but is not sit right with me.

    For this project, you're probably stuck with transcoding with Handbrake or another method not Adobe. Our coders simply do not handle variable frame rates.

    Uses 3rd party freeware really the only solution for this problem?

    With Premiere Pro and this project, you have no other choice. For future projects, look into purchasing a high end video camera application where you can shoot at a constant rate regardless of the stage lighting.

    Video editing software Adobe Professional-grade not really have the ability to solve this problem? If so, what should I do to prevent all Premiere Pro ruin all my pictures to import?

    If you like Premiere Pro to support variable frame rates, please create a feature request. Otherwise, I hope my tips will help you in the future.

    Thank you
    Kevin

  • How can you fix error code 57F so microsoft updates can be downloaded? What is the best solution to this problem?

    57F error code

    Windows Update Forum:

    It comes with Vista, upgrade install and activate Forum.

    You will get the best help for any problem of Update/Service Pack in the Windows Update Forum; the link below:

    http://social.answers.Microsoft.com/forums/en-us/vistawu/threads

    When you repost here, kindly include the Error Codes, and exactly what is happening when you try to update.

    In this way, you will receive the best help.

    See you soon.

    Mick Murphy - Microsoft partner

  • Is alcohol the best solution for the cleaning of the product

    Sometimes you print quality problems. You cannot print the colors, bad impression or bad imagingin during the scan images.

    You go through all the troubleshooting steps away as cartrides, glass, rollers of the printer cleaning and replacement of cartridges.

    Ask yourself what you should used during the cleaning of the unit?

    WATER and a LINT cloth, would be the best solution for cleaning. You can absorb the water on the cloth and clean the printhead, cartridges, the scanner glass, rolls and any other area that needs to be specific to the unit.

    ALCOHOL IS NOT AN OPTION. This can damage the strips and the contacts on the cartridges and the print head. The next time you need to clean your product, water is the best option.

    Hope this helps everyone.

  • I have the latest version of Firefox are installed (which has been updated), but the site says that it is the older. Is there a solution for this problem?

    I have the latest version of Firefox are installed (which has been updated), but the site says that it is the older. Is there a solution for this problem?

    You have a corrupted user agent which identifies you like Firefox/3.0.11

    • Mozilla/5.0 (Windows; U; Windows NT 6.1; UK; RV:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 WebMoney Advisor

    See:

  • I have a toshiba laptop purchased recently. After the scheduled updates it does not recognize the wireless network. I have to do a system restore. is there a solution for this problem?

    I have a toshiba laptop purchased recently.  After the scheduled updates it does not recognize the wireless network. I have to do a system restore.  is there a solution for this problem?

    Hello

    Make sure you have the latest network adapter drivers fron toshiba

    http://www.CSD.Toshiba.com/cgi-bin/TAIS/support/JSP/home.jsp

    and if windows update is at the origin of the problem change how to get updates to uncover the problem update

    When you have found the issue, a right click on it then invited uac then hide

    read the information on the link below

    http://www.bleepingcomputer.com/tutorials/tutorial140.html

    Download updates but let me choose whether to install them - if you select this option, Windows will download the updates on your computer, but not install them automatically. If you want to install updates, then you must install them manually. You should only select this option if you have a reason to not install updates automatically. Only advanced users should use this option.

    Check for updates but let me choose whether to download and install them - if you select this option, you'll be alerted when there are new updates available for download and install. You can then choose to download and install the updates that you want. This option should really be reserved for people who know exactly which updates they need, or those who have little access to the Internet.

  • When I turn on the system of its display in the moniter as NTLDR missing.please give me the solution for this problem.

    When I turn on the system of his displayiing on the moniter as NTLDR missing. Please give me the solution for this problem

    Hello

    NTLDR is not used for installation of Vista, it's a vestige of WinXP / 2K. If it is listed as "missing", then your boot sector is damaged and must be repaired. The steps are described here: http://support.microsoft.com/default.aspx/kb/927392?p=1

    Good luck, Rick Rogers, aka "Crazy" - Microsoft MVP http://mvp.support.microsoft.com Windows help - www.rickrogers.org

  • The older of the camera, there was a scene or stage spot. What is the best replacement for this scene selection

    The older of the camera, there was a scene or stage spot.  What is the best replacement for this scene selection

    The best replacement for staging Spotlight is probably the Night Portrait setting.

  • Can someone solve or give me a solution for this problem...?

    Hello world!

    Can someone solve or give me a solution for this problem...?

    We used two folders Source & Finalwork. We get image Source folder and path of silo put & moved to Finalwork folder.

    Is it possible to check if the two colors of Embedded images folder profile identical or not.

    -yajiv

    Could you elaborate what you mean by that

    We get image Source folder and path of silo put & moved to Finalwork folder.

    Perhaps with a screenshot to illustrate the task?

    // 2012, use it at your own risk;
    #target photoshop
    var theFolder = Folder.selectDialog ("select source folder");
    if (theFolder) {
    var theFiles = theFolder.getFiles(/\.(jpg|tif|eps|psd)$/i)
    };
    var theOtherFolder = Folder.selectDialog ("select target folder");
    if (theOtherFolder) {
    var theOtherFiles = theOtherFolder.getFiles(/\.(jpg|tif|eps|psd)$/i)
    };
    var missingFiles = new Array;
    var unmatchedProfiles = new Array;
    // work through files;
    for (var m = 0; m < theFiles.length; m++) {
              var check = false;
              var theFile = theFiles[m];
    // find name of the same name;
              for (var n = 0; n < theOtherFiles.length; n++) {
                        var theOtherFile = theOtherFiles[n];
    // if one is found;
                        if (theFile.name == theOtherFile.name) {
                                  check = true;
                                  var oneFile = app.open(File(theFile));
                                  var otherFile = app.open(File(theOtherFile));
    // check profiles;
                                  if (oneFile.colorProfileName == otherFile.colorProfileName) {
                                            }
    // collect umages with unmatched profiles;
                                  else {unmatchedProfiles.push(theFile)};
                                  };
                        };
    // collect missing files;
              if (check == false) {alert ("hahaha");missingFiles.push(theFile)}
              };
    // alert of problems;
    if (unmatchedProfiles.length > 0) {
    alert ("the corresponding files for these do have a different color space:\n"+unmatchedProfiles.join("\n\n"));
    };
    if (missingFiles.length > 0) {
    alert ("these files miss corresponding ones:\n"+missingFiles.join("\n\n"));
    };
    //////
    ////// get psds, tifs and jpgs from files //////
    function getFiles (theFile) {
        if (theFile.name.match(/\.(jpg|tif|psd|pdf|)$/i)) {
            return true
            };
              };
    
  • right to sentences overturned left from left to right in pdf to excel export... you have a solution for this problem?

    I found a problem when converted from pdf to excel in Arabic or Hebrew, it gives me the right sentences overturned left from left to right...

    you have a solution for this problem?

    Known problem (I submitted the bug a few years report - also applies to export to Word, PowerPoint, etc.) for that (unfortunately) there is not yet a date, release or resolution plan.

    -Dov

  • Need the best solution for the special case

    My version of oracle is 11.2.0

    My name of the table is nitkhush and have a column named long_string of long data type

    The values of the tables are

    LONG_STRING

    Vincent
    Murali
    Bharath
    Nitesh
    Perron
    Married


    I know its not appropriate to use the long type, but again I want to understand the concept, so I've used and should
    output is


    Vincent Kumar
    Murali Kumar
    Bharath Kumar
    Nitesh Kumar
    Perron Kumar
    Married Kumar


    I tried this query
    Select 'Kumar ' | long_string nitkhush but error is ORA-00932: inconsistent data types: expected NUMBER got LONG so I tried to convert in varchar2 pl/SQL

    DECLARE
    LONG temp_long;
    temp_var VARCHAR2 (4000);
    BEGIN
    SELECT 'Kumar ' | long_string
    IN temp_long
    OF nitkhush;

    temp_var: = SUBSTR (temp_long, 1, 4000);
    Dbms_output.put_line (temp_var);
    END;

    but still unable to do as I thought store at length and then using SUBSTR function it will convert and store it in a variable of type varchar2 data but it does not, and according to my knowledge CAST do not long support for the conversion of varchar2 so someone can give me best solution but I need complex queries wholesale as it should be as short as simple to understand so that all the world can understand it easily... And also through the procedure, I tried so that execution of the procedure but still unable to... I tried throgh procedure also all as written above...
    Thank you
    Nitesh Perron.

    If you have to / want to change the default value of a column, you should not update the system tables but use an alter table command
    And by the way, it works

    begin
      for r_col in ( select *
                     from user_tab_columns
                     where table_name = 'MY_TABLE'
                     and data_default is not null
                   )
      loop
        dbms_output.put_line( r_col.data_default || 'Anton' );
      end loop;
    end;
    
  • Is the time capsule the best solution for me?

    Dear Apple Support,

    I'm looking for a good solution for the following:

    -economy of mey Macbook Air 13 "wireless backup

    -Storage of files from various media (videos, basically)

    -Playback of multimedia files (iphoto library and mkv videos) on my Smart TV (wifi capable, and endowed with a multimedia player)

    I think a Time Capsule and Apple TV, but before buying it, I want to be sure those will satisfy the above requirements.

    Thank you for your answer!

    Kind regards

    Tamas

    If you format a drive for mac to use as a Time Machine backup format there is a chance your smart TV will be able to read this disc.

  • Aspire v3 - 772 g nvidia gtx 760 m. who are the best drivers for this graphics card?

    I have used so many drivers for this graphics card... some of them drop fps, others are late or whatever... I would like to know which are the best drivers to use? SRY for my English. Thank you

    Click the help button at the top of this page. Choose your country. Click on drivers and manuals. Click on laptop aspire v3 - 772 g. Choose Win8 or Win8.1. Nvidia VGA drivers listed are recommended.

    Jack E/NJ

  • What is the best plan for this situation

    I was looking at the pricing for the CC apps plans and I'm not sure who would fit better.

    Long story short, I was hired for a new company to start and my job will be to do graphic design work.
    I'm going to need both Photoshop and Illustrator for this. Two unique licenses for businesses will run on nearly €60, whereas a full license of CC will be close to €70. Is there not a better option for someone who just wants a few applications, or better, I'll pay for the full package of CC? Also, I'm not sure if the business is the ideal solution, is there a distinction between small and large firms?

    You can use individual plans in a commercial enterprise. The software will be linked to your personal ID from Adobe.

    Business plans are a misnomer. They should only be referred to as creative cloud for teams. They allow centralized deployment and management of software. Not related to the individual Adobe ID.

Maybe you are looking for