Quick Links: Download Gideros Studio | Gideros Documentation | Gideros Development Center | Gideros community chat | DONATE
MovieClip frame order — Gideros Forum

MovieClip frame order

mike950fmike950f Member
edited February 2013 in General questions
Hi I was wondering if the drawing order can be controlled in a movieclip?
{
{1,1,sprite1},
{1,1,sprite2},
}
Does sprite1 always get drawn before or after sprite2?
Tagged:

Comments

  • ar2rsawseenar2rsawseen Maintainer
    edited February 2013
    Umm, why would you do this? :)
    Well MovieClip is not meant to be used that way and I actually don't know what will happen, maybe sprite2 will overwrite sprite1.
    But the right idea is to provide correct timeline (by increasing frame numbers), as:
    local mc = MovieClip.new{
        {1,2,sprite1},
        {3,4,sprite2}
    }
    Then sprite1 will always be before sprite2
  • lol :)
    Well I'm converting a flash game to gideros and movieclips in flash can have multiple layers per frame so I figured that's the best mapping I can do.
    It does work btw :) but the order doesn't appear to be deterministic :(
  • zvardinzvardin Member
    Accepted Answer
    You could group them with a parent sprite to provide layers and then use different movie clips to influence either a specific layer or the entire group.
  • ar2rsawseenar2rsawseen Maintainer
    Accepted Answer
    @mike950f did not know that, still can't really imagine how it should be but agree with @zvardin that you should make two layers of move clips and manage your animation that way :)
  • Would it be ok then to add the sprites in the movieclip to the movieclip's parent?
    I think that will work! Thanks guys!
Sign In or Register to comment.