Best practices for something like this

Working on a project after learning of "Garbage collection" and some other things of this forum (thank you all) I was wondering if someone could look over this piece of code and tell me if Im using best practices or if it's just sloppy as hell and im going to this topic wrong.

ALSO, I understand to delete eventListeners and children dynamically added to the scene. But you need to remove things such as interpolations and timers...

If I have something with identifier = gcnew instantiate something ();  Do I always need to remove what little whatever it is to keep everything clean?

package {

  import flash.display.MovieClip;
  import flash.utils.Timer;
  import flash.events.*;
  import fl.transitions.Tween;
  import fl.transitions.easing.Elastic;
  import fl.transitions.easing.Back;
  import fl.transitions.TweenEvent;

  public class ShooterProtoMAIN extends MovieClip {
  //MAIN MENU ASSETS
  public var MainMenu:mcMainMenu;
  public var MenuCredits:mcCredits;
  public var StartGameBttn:bttnStartGame;
  public var MainMenuTitle:mcTitle;
  public var MainMenuTitleTween:Tween;
  public var MenuCreditsTween:Tween;
  public var StartGameBttnTween:Tween;
  //PLAYER ASSETS
  public var Player:mcPlayer;
  public var PlayerReticle:mcReticle;
  public var ReadyCheck:mcReadyCheck;
  public var PlayerBase:mcBase;
  public var PreRoundTimer:Timer;
  public var PlayerControlEnabled:Boolean = false;
  public const PlayerMoveSpeed:Number = 3;

  public function ShooterProtoMAIN () {
  // constructor code
  }

  //MAIN MENU BEFORE GAME BEGINS
  private function MainMenuScreen () {
  //BUILD OUR MENU SCREEN
  MainMenu = new mcMainMenu ();
  stage.addChild (MainMenu);
  MainMenu.x = stage.stageWidth / 2;
  MainMenu.y = stage.stageHeight / 2;
  MainMenuTitle = new mcTitle ();
  stage.addChild (MainMenuTitle);
  MainMenuTitle.x = stage.stageWidth / 2;
  MainMenuTitleTween = new Tween(MainMenuTitle,"y",Elastic.easeOut,-50,100,1,true);
  MenuCredits = new mcCredits ();
  stage.addChild (MenuCredits);
  MenuCredits.x = stage.stageWidth / 2;
  MenuCreditsTween = new Tween(MenuCredits,"y",Elastic.easeOut,850,750,1,true);
  StartGameBttn = new bttnStartGame();
  stage.addChild (StartGameBttn);
  StartGameBttn.y = stage.stageHeight / 2;
  StartGameBttnTween = new Tween(StartGameBttn,"x",Elastic.easeOut,-50,stage.stageWidth / 2,1,true);
  StartGameBttn.addEventListener (MouseEvent.CLICK, StartTheShow);
  }

  private function StartTheShow (event:MouseEvent):void {
  MainMenuTitleTween = new Tween(MainMenuTitle,"y",Back.easeIn,100,-50,1,true);
  MenuCreditsTween = new Tween(MenuCredits,"y",Back.easeIn,750,850,1,true);
  StartGameBttnTween = new Tween(StartGameBttn,"x",Back.easeIn,stage.stageWidth / 2,-150,1,true);
  StartGameBttnTween.addEventListener (TweenEvent.MOTION_FINISH, MainMenuTweenFinished);
  }

  private function MainMenuTweenFinished (event:TweenEvent):void {
  MainMenuRinse ();
  BeginGame ();
  }

  //CLEANER FUNCTION FOR MAIN MENU;
  private function MainMenuRinse () {
  stage.removeChild (MainMenu);
  MainMenu = null;
  stage.removeChild (MenuCredits);
  MenuCredits = null;
  StartGameBttn.removeEventListener (MouseEvent.CLICK, StartTheShow);
  StartGameBttnTween.removeEventListener (TweenEvent.MOTION_FINISH, MainMenuTweenFinished);
  stage.removeChild (StartGameBttn);
  StartGameBttn = null;
  }

who will most likely have no problems, but this is not (IMO), the best way to configure your project if it is your document class.

codification that looks like it must be a class MainMenuScreen, which controls the display and the removal of the display of the main menu.

Tags: Adobe Animate

Similar Questions

  • Best practices for Smartview when upgrading from Excel 2003 to Excel 2007?

    Anyone know the best practice for Smartview during the upgrade from Excel 2003 to Excel 2007?


    Current users have Microsoft Excel 2003 with Smartview 9.3.1.2.1.003.

    Computers are upgraded to Microsoft Excel 2007.


    What is the best practice for Smartview in this situation?

    1. do nothing with Smartview and just install Excel 2007.

    2. install Excel 2007 and then uninstall and reinstall Smartview

    3 uninstall Smartview, Excel 2007 installation and then install Smartview

    4 something else?


    Thank you!

    We went with option 1 and it worked very well. Be aware that OAS Treaty substantially slower in Excel 2007 to 2003. Many users have been/is unhappy about the switch. We have not tested SV v11 yet, so I don't know if it has improved performance with Excel 2007 or not (hopefully it does).

  • I would like to know the "best practices" for unplugging my computer permanently to the internet and other updates.

    Thank you for taking the time to read this. I would like to know the "best practices" for unplugging my computer permanently to the internet and other updates. I thought I would do a clean install of Windows XP, install my Microsoft Works again and nothing else. I would like to effectively transforming my computer into a word processor. He continues more and more slow. I get blue screen errors, once again. I received excellent Microsoft Support when it happened before, but since my computer is around 13 years, I think it is not worth the headache to try to remedy. I ran the Windows 7 Upgrade Advisor, and my computer would not be able to upgrade. Please, can someone tell me how to make it only a word processor without updates or internet connection? (I already have a new computer with Microsoft Windows 7 Home Premium, it's the computer that I use. The old computer is just sitting there and once a week or so I updates.) I appreciate your time, thank you!

    original title: old computer unstable

    http://Windows.Microsoft.com/en-us/Windows-XP/help/Setup/install-Windows-XP

    http://www.WindowsXPHome.WindowsReinstall.com/sp2installxpcdoldhdd/indexfullpage.htm

    http://aumha.NET/viewtopic.php?f=62&t=44636

    Clean install XP sites
    You can choose which site to reinstall XP.

    Once it is installed, then you do not have to connect what anyone, however, some updates may be required to perform the work, test this by installing work and see if you get an error msg. Except that you should be fine.

  • On Mac computers, they have a program called IMovie... is there something like this for Windows 7?

    On Mac computers, they have a program called IMovie... is there something like this for Windows 7? If yes where can I find it? Thanks a bunch! I'm new to these forums, hope so I ask in the right place!

    Original title: film making program

    Yes, you are in the right place.

    So that in my view not as powerful as iMovie, you can download the following Windows Essentials to add applications such as Movie Maker, Messenger and SkyDrive Photo Gallery on your computer.

  • Best practices for managing exceptions and success messages.

    Hey people,

    These days I've been shooting packages to clean my application. And question came to my mind, ' should I treat my exceptions the right way?


    So I want to ask you met guys, what is the best practice for this? (I want to learn it until it's too late )

    Currently I have a function that returns "OK" if all goes well.


    return('OK');  

    Can I manage my exceptions like this

      EXCEPTION
        WHEN OTHERS THEN
          ROLLBACK;
          RETURN (SQLERRM);
    
    

    At THE SUMMIT, I have a process that calls the function and then checks if the function returned "OK".

         IF cRet not LIKE 'OK%' THEN
          RAISE_APPLICATION_ERROR(-20000,cRet);
         END IF;
    
    

    And in 'process Error Message' I put "#SQLERRM_TEXT #" so that I can see what error occurred.

    Question aside, how do you manage your messages of success?

    Currently in 'process success Message' put something along the lines "Action completed successfully". What to do about all the processes.

    Do you want to do differently?

    I really want to hear what you have to say since I'm tired of feeling like this is a terrible way to manage these things.

    Hi Para,

    Para wrote:

    I don't know of situations where my service throw exceptions like no_data_found.

    and I need to know that the process is not so I can get to see my # #SQLERRM_TEXT.

    I got this by increasing the error in the application (which I think is a bad way to go) if the return is anything other than 'OK '. I get my application error in the process of the apex, and not in my service.
    And I want to show the inline error in the notification. (Which I am currently with my approach).

    You can use APEX_ERROR. ADD_ERROR in your PL/SQL process to throw exceptions in Oracle APEX.

    Reference: Re: Re: error in the processing of the page management

    Kind regards

    Kiran

  • Best practices for the integration of the Master Data Management (MDM)

    I work on the integration of MDM with Eloqua and are looking for the best approach to sync data lead/Contact changes of Eloqua in our internal MDM Hub (output only). Ideally, we would like that integration practically in real time but my findings to date suggest that there is no option. Any integration will result in a kind of calendar.

    Here are the options that we had:

    1. "Exotic" CRM integration: using internal events to capture and queue in the queue changes internal (QIP) and allows access to the queue from outside Eloqua SOAP/REST API
    2. Data export: set up a Data Export that is "expected" to run on request and exteernally annex survey via the API SOAP/REST/in bulk
    3. API in bulk: changes in voting that has happened since the previous survey through the API in bulk from Eloqua outside (not sure how this is different from the previous option)

    Two other options which may not work at all and who are potentially antimodel:

    • Cloud connector: create a campaign questioning changes to schedule and configure a connector of cloud (if possible at all) to notify MDM endpoint to query contact/lead "record" of Eloqua.
    • "Native" integration CRM (crazy): fake of a native CRM endpoint (for example, Salesforce) and use internal events and external calls to Eloqua push data into our MDM

    Issues related to the:

    1. What is the best practice for this integration?
    2. Give us an option that would give us the close integration in real-time (technically asynchronous but always / event-based reminder)? (something like the outgoing in Salesforce e-mail)
    3. What limits should consider these options? (for example API daily call, size response SOAP/REST)

    If you can, I would try to talk to Informatica...

    To imitate the integrations of native type, you use the QIP and control what activities it validated by internal events as you would with a native integration.

    You will also use the cloud api connector to allow you to set up an integration CRM (or MDM) program.

    You have fields of identification is added objects contact and account in Eloqua for their respective IDs in the MDM system and keep track of the last update of MDM with a date field.

    A task scheduled outside of Eloqua would go to a certain interval and extract the QAP changes send to MDM and pull the contacts waiting to be sent in place of the cloud connector.

    It isn't really much of anything as outgoing unfortunately use Messaging.  You can send form data shall immediately submit data to Server (it would be a bit like from collections of rule of integration running of the steps in processing of forms).

    See you soon,.

    Ben

  • Best practices for network configuration of vSphere with two subnets?

    Well, then I'll set up 3 ESXi hosts connected to storage shared with two different subnets. I configured the iSCSI initiator and the iSCSI with his own default gateway - 192.168.1.1 - targets through a Cisco router and did the same with the hosts configured with its own default gateway - 192.168.2.2. I don't know if I should have a router in the middle to route traffic between two subnets since I use iSCSI ports linking and grouping of NETWORK cards. If I shouldn't use a physical router, how do I route the traffic between different subnets and use iSCSI ports binding at the same time. What are the best practices for the implementation of a network with two subnets vSphere (ESX host network: iSCSI network)? Thank you in advance.

    Install the most common iSCSI would be traffic between hosts and

    the storage is not being routed, because a router it could reduce performance.

    If you have VLAN 10(192.168.1.0/24) iSCSI, VLAN 20 (192.168.2.0/24) ESX

    MGMT and VLAN 30 (192.168.3.0/24) comments VMs and VLAN 40 (192.168.4.0/24)

    vMotion a deployment scenario might be something like:

    NIC1 - vSwitch 0 - active VMK (192.168.1.10) MGMT, vMotion VMK (192.168.4.10)

    standby

    NIC2 - vSwitch 1 - current (VLAN30) guest virtual machine port group

    NIC3 - vSwitch 2 - active VMK1 (192.168.1.10) iSCSI

    NIC4 - vSwitch 2 - active VMK2 (192.168.1.11) iSCSI

    NIC5 - vSwitch 1 - current (VLAN30) guest virtual machine port group

    NIC6 - vSwitch 0 - MGMT VMK (192.168.2.10) standby, vMotion

    VMK (192.168.4.10) active

    You would place you on VLAN 10 storage with an IP address of something like target

    192.168.1.8 and iSCSI traffic would remain on this VLAN. The default value

    gateway configured in ESXi would be the router the VLAN 20 with an ip address of

    something like 192.168.2.1. I hope that scenario help set some options.

    Tuesday, June 24, 2014 19:16, vctl [email protected]>

  • expressions - best practices for duplication of layers

    Hello

    I have a set quite complex of expressions on several layers.  These layers together form an overall effect for a footage item.  For practical reasons, I have these expression related to an object null controller so I can control them from a single location.  Now that I put it in place, I want to duplicate the layer group (element of film, various effects and controller object null) several times.  I made a pattern for an effect of images I want to duplicate several times so I find myself with many pieces of images with the effect applied.  When I duplicate the layer group, I'd love to put in place so that the variables of the expression will now point to the duplicated object controller.  I noticed that this problem occurs if the expression is a simple selector from one property to another.  Basically, a direct connection.  But if I try to store this selection of pick whip in a variable to be manipulated far, this feature no longer.  So my question is, how do I create a set up that will allow me to duplicate the layers and as if they were a whip simple direct sampling of one property to another update expressions?  Is this possible?  If not, how can I best configure this to allow me to complete my final result?

    Thank you!

    -Justin

    If you set things up so that your layer names ending with a space and a number, so that they increment when you duplicate them, you should be able to use the layer name to navigate to other layers in the game. For example, if your layers are named "layer 1", "layer 2", etc. and your levels of control are named "master 1", "master 2", etc., you could do something like this in your expressions to construct the name of the control on the fly layer:

    n = name.split("");

    CTRL = thisComp.layer ("Ctrl" + n [n.length - 1]);

    Dan

  • Just improved m tips on best practices for sharing files on a Server 2008 std.

    The field contains about 15 machines with two domain controllers, one's data is the app files / print etc...  I just upgraded from 2003 to 2008 and want to get advice on best practices for the establishment of a group of file sharing. Basically I want each user to have their their own records, but also a staff; folder. Since I am usually accustomed to using windows Explorer, I would like to know if these actions can be done in the best conditions. Also I noticed on 2008 there is a feature of contacts. How can it be used? I would like to message or send an email to users their file locations. Also, I want to implement an admin at a lower level to handle the actions without making them far in on the server, not sure.

    I read a certain bbut I don't like test direct more because it can cause problems. So basically a way short and neat to manage shares using the MMC, as well as the way that I approach their mail from the server of their actions. Maybe what kind of access cintrol or permissions are suitable also for documents. Also how can I have them use office templates without changing the format of the model.

    THX

    g

    Hello 996vtwin,

    Thank you for visiting the Microsoft Answers site. The question you have posted is related to Windows Server and would be better suited to the Windows Server TechNet community. Please visit the link below to find a community that will support what ask you:

    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

    Hope this helps J

    Adam
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think

  • Request for advice: generally speaking, what is the best practice for managing a paid and a free application?

    Hi all

    I recently finished my first app of cascades, and now I want to inspire of having a more feature rich application that I can then sell for a reasonable price. However, my question is how to manage the code base for both applications. Any have any "best practices", I would like to know your opinion.

    You use a revision control system? This should be a prerequisite...

    How the different versions of the application will be?

    Generally if you have two versions that differ only in terms of having a handful of features disabled in the free version, you must use exactly the same code base. You could even just it for packaging (build command) was the only difference, for example by adding an environment variable in one of them that would be checked at startup to turn paid options.

  • [ADF, JDev12.1.3] Best practices for maintaining a form validation

    Hallo,

    in my application, I need to create a registration form which contains fields that must be validated (for example they should follow a format like e-mail, phone number, tax code,...).

    If the data inserted by the user are ok, a new record in my custom db table Users will be created.

    I would like to know which are the best practices for maintaining the validation, which means the place where the controls must be made and a message to the user who fills out the form when something goes wrong.

    The best vo or EO or managed bean? Or some controls should be put in the OS, others in the VO and other in the managed bean?

    I would be happy if you could give me some examples.

    Thank you

    Federico

    Assuming you want the validation on the value of the field to any screen data can be entered in (and possibly web services that rely on the same BC ADF) then put the validation on the definition of the attribute in the EO.

    If you want to add a little more friendliness and eliminate some of the network traffic to the server, you can also implement the validation client in your page - for example by using the regular expression validator.

    https://blogs.Oracle.com/Shay/entry/regular_expression_validation

  • Best practices for color use in Adobe CC?

    Hi all

    Is there an article that describes the best practices for use of color in Adobe CC?

    I produce a mixture of viewing online (PDF, for the most part) and real world print projects - often with the obligation for both. I recently updated my PANTONE + bridge books for the first time in ages and I am suddenly confused by the use of Lab colors in the Adobe Suite (Illustrator and InDesign).

    Everything I found online, looks like Lab color mode preferred to use because it is device independent. And perceptual (on screen), it looks much closer to the color, it is trying to represent. But when I mark a Spot color Illustrator rectangle using laboratory coordinates, to the sides of a rectangle using PANTONE + bridge CP and then export it to PDF, the version of CP to mix CMYK color corresponds exactly to my Pantone book - while the version of laboratory (after converted to CMYK using the ink Manager) is far away.

    I have this fantasy to manage only a single Illustrator or InDesign file for both worlds (PDF) printed and online. Is not possible in practice?

    Any info describing the basic definitions of the color modes - or even a book tracing more than use them in the real world - would be much appreciated!

    Thank you

    Bob

    Here are a few best practices you can already do.

    1 make sure that your color settings are synchronized on all applications.

    2. use a CMYK profile appropriate for your print output. Lab spot colors convert to CMYK values based on the CMYK icc profile.

    3. include icc profiles when save or export pdf files

    In theory, your imagination is possible today. It requires color management and the use of icc profiles. You can place RGB images in InDesign and use Pantone colors in your objects. The problem lies in the printers. If a printer uses a RIP with built in Pantone library, the colors will match when printing. Unfortunately, this kind of CUT is more expensive and not enough printers use them. Most of them is always manually approximate CMYK values composition given Pantone colors.

  • What are the best practices for a new employee to learn inside the instance of their business of Eloqua as efficiently as possible?

    We have companies everything changed at some point in our lives. And we all go through the process in the first weeks, where you feel new and are just trying to figure out how not to get lost on your way in the mornings.

    On top of that, trying to familiarize yourself with your new company Eloqua instance can be a daunting task, especially if it's a large organization.

    What are the best practices for new employees to learn as efficiently and effectively as possible?

    I am in this situation right now. Moved to a much larger organization. It is a huge task trying to understand all the ins and outs not only society, but also of the eloqua instance, especially when she is complex with many points of integration. I find that most of the learning happens when I really go do the work. I spent a ton of time going through the programs, documentation, integrations, etc., but after awhile, it's all just words on a page and not absorbed.

    The biggest thing that I recommend is to learn how and why things are made the way they are currently, ask lots of questions, don't assume not that things work the same as they did with your previous employer.

    Download some base in place level benchmarks to demonstrate additional improvement.

    Make a list of tasks in the long term. As a new pair of eyes, make a list of things you'd like to improve.

  • Best practices for HP DL385p G8

    Trying to find documentation for the implementation of a HP DL385p G8 for VMware Server. I would like to find a guide to best practices for this server? Been looking for but not found anything. I would like to find things are should hyperthreading turned on and so on. I use the ESXI from HP image for pilots, that all work but just want to find the settings.

    Thank you

    Hello

    you will find on this blog: BIOS settings in a VMware ESX (i) / vSphere environment. VirtualKenneth & #039; s Blog - hqVirtual | Quality rental a detailed explanation on all the BIOS settings and why you should enable or disable it.

    hope that helps.

  • Best practices for adding form fillable form designer EULA & forcing acceptance by the user

    What are created the best practices for adding a license agreement end user to a form with LiveCycle Designer. and to force the user to signify the acceptance of the EULA before access inside the form?

    Time, I have the kludged with a series of four message boxes (which is necessary because my LICENSE agreement, like most) is too long to fit in a single messageBox).  3 first message boxes have OK/Cancel buttons.  If the user clicks OK, she gets the following message EULA box; If she clicks cancel the form closes.  The last post (fourth) area a Yes/No buttons with the corresponding behavior.  It seems that the work (I think?), but it's ugly.  Is there an "easy way" to do it with a single drop-down dialog box "I agree" and "I refuse" custom buttons?

    I've seen references to Tools like this but they are marked as obsolete or abandoned due to security or other unspecified concerns.

    Best, Blake

    Another way might be, keep the form pages hidden at the beginning and only display a single page that has text box that contains the EULA with accept and refuse to scroll buttons. IF someone refuses, you can keep the rest of the hidden form or display message boxes to force acceptance of the EULA.

    If anyone agrees, you can simply hide the EULA page, and display form pages.

    I hope that used here too scripting required to reach it either.

Maybe you are looking for