I’m trying to create a simple utils class that I can use the methods of but not instantiate:
package com.ukfast.utils
{
import flash.display.DisplayObject;
public dynamic class Arrange
{
/* //////////////////////////////////////////// */
/* ////// Define Private Variables /////// */
/* //////////////////////////////////////////// */
private static var instance:Arrange;
/* //////////////////////////////////////////// */
/* ////// Define Public Functions /////// */
/* //////////////////////////////////////////// */
public function Arrange()
{}
public function center(object:DisplayObject)
{
object.x = (object.stage.stageWidth / 2) - (object.width / 2);
object.y = (object.stage.stageHeight / 2) - (object.height / 2);
}
}
}
Ideally I would import the class then call the center function like this: Arrange.center(object);
Is this possible?
Thanks,
eb_dev