Author Topic: Using a sprite as a container to hold other objects  (Read 1021 times)

KunoNoOni

  • "Never tell me the odds"
  • Active Member
  • ***
  • Posts: 170
  • Karma: +0/-0
  • Code is Love
    • View Profile
I know with actionscript I can create a sprite and within this sprite I can have it hold other sprites. Is this possible to do within flixel?

Like would I be able to create a FlxSprite and have it be the container for other FlxObjects, like sprites and textfields?

I'm not looking to load animations just single frame sprites.


-KunoNoOni
« Last Edit: Mon, Jan 9, 2012 by KunoNoOni »

photonstorm

  • Administrator
  • Key Contributor
  • *****
  • Posts: 1502
  • Karma: +1/-0
    • View Profile
    • Photon Storm
Re: Using a sprite as a container to hold other objects
« Reply #1 on: Mon, Jan 9, 2012 »
FlxGroup is used for this, but the association is pretty loose to be honest.
http://www.photonstorm.com



"Tell me and I will forget, show me and I might remember, involve me and I will understand" - Confucius

KunoNoOni

  • "Never tell me the odds"
  • Active Member
  • ***
  • Posts: 170
  • Karma: +0/-0
  • Code is Love
    • View Profile
Re: Using a sprite as a container to hold other objects
« Reply #2 on: Mon, Jan 9, 2012 »
Thank you much!


-KunoNoOni