All Downloads are FREE. Search and download functionalities are using the official Maven repository.

scaffold.libs_as.starling.utils.execute.as Maven / Gradle / Ivy

// =================================================================================================
//
//	Starling Framework
//	Copyright 2011-2015 Gamua. All Rights Reserved.
//
//	This program is free software. You can redistribute and/or modify it
//	in accordance with the terms of the accompanying license agreement.
//
// =================================================================================================

package starling.utils
{
    /** Executes a function with the specified arguments. If the argument count does not match
     *  the function, the argument list is cropped / filled up with null values. */
    public function execute(func:Function, ...args):void
    {
        if (func != null)
        {
            var i:int;
            var maxNumArgs:int = func.length;

            for (i=args.length; i




© 2015 - 2024 Weber Informatics LLC | Privacy Policy