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?
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}}
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
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.
@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
Comments
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:
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
I think that will work! Thanks guys!