Gamua / Starling-Framework

The Cross Platform Game Engine
http://www.starling-framework.org
Other
2.87k stars 826 forks source link

MovieClip with changing frame size #790

Closed gilamran closed 8 years ago

gilamran commented 8 years ago

I want to be able to use MovieClip but I want to get the real size of it during animation, currently it takes the first frame size. I can call readjustSize to make it update the size according to the current texture's size. The problem is that I'm getting the error [Starling] Warning: frames inside the texture's region are unsupported. if I use atlas (With frames). should I just ignore this warning?

Thanks Gil Amran

PrimaryFeather commented 8 years ago

Hm, you should get that warning only when the frame is inside the texture (i.e. its size would indicate that some parts of it should be cut away, which is not supported). How did you create those frame textures? Do you get the same warning when you display such a texture in a standard image?

(Sorry for the late reply, BTW!)

gilamran commented 8 years ago

I've used the frames to "move" the sprite. obviously that wasn't the right thing to do. I've fixed it on my side. thanks!

PrimaryFeather commented 8 years ago

Ah, perfect! Yeah, I must admit I am myself not 100% happy with the way frames work — but I didn't find any better way to integrate that texture cropping thing, even though I gave it a lot of thought. g

In any case, I'm glad to hear you solved it! Good luck with the rest of the project, and don't hesitate to contact me again if something else causes you troubles.