• About WordPress
    • WordPress.org
    • Documentation
    • Learn WordPress
    • Support
    • Feedback
  • Log In
Skip to content

MonoFlauta

Indie Game Developer

Menu
  • Blog
  • Portfolio
    • Games
      • Happy Ghost Studio
      • Etermax
      • Silky Smooth Studio
      • Fun+Mono
    • Frameworks & Tools
      • Framework Goat
      • Twitch Mono Integration
      • Framework Mono
      • Narwhal Engine
    • Others
  • Store
  • About Me

Framework Mono – Managers/UpdateManager.as

The UpdateManager.as script will help you to call a big amount of functions without the problems of creating many enter frame listeners. Also, it will help you to make pauses.
Note: This script needs a public static instance inside Main.as of Mono.as.


Initial set up UpdateManager.as

In order to use it, first, you will need a public static instance of Mono.as in your Main class. Once you have it, you will be able to use it without any problem. You can create a new var with an instance of UpdateManager.as or you can just the one that is inside Mono and will let you have access from anywhere. For example, in case you want to do the second option (recommended), you should do the following:

 package
{
import Mono.Managers.UpdateManager;
import Mono.Mono;

import flash.display.Sprite;
import flash.utils.Dictionary;
      
      public class Main extends Sprite
      {      
            public static var mono:Mono;
            
            public function Main()
            {
                  mono = new Mono(stage);
                  mono.updateManager = new UpdateManager();
            }
      }
}

Now you will be able to access it from anywhere by accessing mono first.


Adding and removing callbacks

If you want to call a function once per frame you will need to add the function by doing this:

 Main.mono.updateManager.addCallBack(functionToCall);

And if you want to remove the function from that list, you will need to remove it by doing this:

 Main.mono.updateManager.removeCallBack(functionToCall);

Take in mind you will be to do this from anywhere.


Public Functions

  • addCallBack(call:function):void
  • removeCallBack(call:function):void

Private Functions

  • evUpdate(e:Event):void

Public Vars

  • isPaused:Boolean

Private Vars

  • _callBacks:Vector.<Function>

Powered by WordPress MonoFlauta 2025 | All Rights Reserved.

Manage Cookie Consent
To provide the best experiences, we use technologies like cookies to store and/or access device information. Consenting to these technologies will allow us to process data such as browsing behavior or unique IDs on this site. Not consenting or withdrawing consent, may adversely affect certain features and functions.
Functional Always active
The technical storage or access is strictly necessary for the legitimate purpose of enabling the use of a specific service explicitly requested by the subscriber or user, or for the sole purpose of carrying out the transmission of a communication over an electronic communications network.
Preferences
The technical storage or access is necessary for the legitimate purpose of storing preferences that are not requested by the subscriber or user.
Statistics
The technical storage or access that is used exclusively for statistical purposes. The technical storage or access that is used exclusively for anonymous statistical purposes. Without a subpoena, voluntary compliance on the part of your Internet Service Provider, or additional records from a third party, information stored or retrieved for this purpose alone cannot usually be used to identify you.
Marketing
The technical storage or access is required to create user profiles to send advertising, or to track the user on a website or across several websites for similar marketing purposes.
Manage options Manage services Manage {vendor_count} vendors Read more about these purposes
View preferences
{title} {title} {title}