• 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 – Visual/Artist.as

IconoThe Artist.as script will help you creating basic figures without needing to write the whole code. Just call any of it static functions and it will return you a sprite of the figure you asked. Note: This class doesn’t need an instance of Mono.as


Basics of Artist.as

In order to use Artist.as and get figures sprites, the only thing you will need to do is to call any of its static functions.

For example, imagine you want to add a black square into the stage from the Main.as. In order to do that, you will need to do the following:

 stage.addChild(Artist.rectangle(0, 0, 100, 100, 0x000000, 1, 0, 0x000000, 1));

Just call the static function of artist called “rectangle”. It will ask you the x position, the y position, width, height, fill color, fill alpha, line thickness, line color and line alfa. Note that you will only need to give the position and size of the rectangle in order to use it. The rest of the options are optional.

Once you called this function, a sprite will be returned and you will be able, for example, to add it as a child to the stage.

Similar to this one, you can use any of the other functions inside of artist.


Public Static Functions

  • rectangle(posX:int, posY:int, width:int, height:int, fillColor:int=0x000000, fillAlpha:Number=1, lineThickness:Number=0, lineColor:int=0x000000, lineAlpha:Number=1):Sprite
  • roundedRectangle(posX:int, posY:int, width:int, height:int, radius:int, fillColor:int=0x000000, fillAlpha:Number=1):Sprite
  • circle(posX:int, posY:int, radius:int, fillColor:int=0x000000, fillAlpha:Number=1, lineThickness:Number=0, lineColor:int=0x000000, lineAlpha:Number=1):Sprite
  • ellipse(posX:int, posY:int, width:int, height:int, fillColor:int=0x000000, fillAlpha:Number=1, lineThickness:Number=0, lineColor:int=0x000000, lineAlpha:Number=1):Sprite
  • line(xI:int, yI:int, xF:int, yF:int, lineThickness:Number=1, lineColor:int=0x000000, lineAlpha:Number=1):Sprite

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}