Starling lacks MovieClip usage, what graphic do I use? - actionscript-3

I've just recently added the Starling Framework to my new project. However, I've noticed that I can't use MovieClips with it.
There is no Starling equivalent to the Flash import flash.display.MovieClip;
So what graphic type does Starling expect users to use?

flash.display.MovieClip is not a graphics-type, it's a container.
In Starling, a MovieClip is a way to display animations, a timeline of images/textures.

Related

Calling sprites from texture atlas without using starling in action script 3

Is there anyway to use a texture atlas without using starling framework in flash?
Everywhere i looked for related tutorials it's all about starling framework. I suppose there must be a way to embed the texture atlas without using starling.
The starling movie clip is a bit different from actionscript3 movie clip, so that's where i'm having problems.

How classes in Adobe Flash Professional works?

I start before 1 year to use CS6 and I found some tutorials that explain how to make pltaformer games, I try a lot of tutorials they work great but for the code they use the timeline.
So, I make a game using the timeline but when I published it and running to my android device I have a lot of lag issues.
After a research I realized that coding in the timeline is a bad idea, also it's better to use Starling for making apps for mobile devices.
So I want to start again to learn how classes working.
I make a new project and I have 5 classes (Main, Level1, Hero, Ground and Enemy). I want the hero to interact with Ground (for gravity) and with Enemy (for hitTest), also Enemy have gravity so they must interact with the Ground.
The concerns are :
In which class I must write the hitTest function?
I have to write in Ground class the hitTest for Hero and the Enemy and in the Hero class to write the collision between the Hero and the Enemy
Or all of this functions must be write in Main class?

easeljs Movieclip vs Sprite

i am new to easel js. When we convert a flash/AS3 project to an HTML5Canvas project using adobe flash cc, the animations and movieclips will become easeljs Movieclip. But in easeljs we can use Sprite to show animation. But using movieclip is easy since flash will generate it.
My question is whether is there any benefit of using easeljs Sprite instead of easeljs Movieclip in terms of performance?
Sprite and MovieClip are totally different in EaselJS.
In Flash, MovieClips extend Sprites, so they have similar functionality.
In EaselJS, a Sprite displays frames of a SpriteSheet, and a MovieClip is a content Container, which understands the concepts of frames, including timelines and frame actions.
MovieClips are generally only used with Flash CC output, although you can make them manually. Ideally, Flash could export Sprites and SpriteSheets as well when it makes sense - however because of the nature of Flash timeline animations, this would be incredibly difficult to determine when and how to export Sprites/SpriteSheets vs MovieClips.
Strictly speaking on performance, Sprites should be better performing because they use a single (or a few) bitmap(s) for all frames, which gets GPU benefits. Multiple, large images (which happens with different sprites, or just single sprites with lots of large frames that span across images) can actually cause performance issues when the GPU switches textures.
There is also a SpriteSheetBuilder class (and example) that you can refer to, which takes Flash CC output, and generates a run-time SpriteSheet, giving you the performance benefits of Sprites, with the complex vector/image output of Flash CC.
Hope that clears things up somewhat.

Overlay flash displayobject on Starling Stage3D

I'm using Starling to build a space shooter game in ActionScript, and I'd like to draw simple lasers using the normal graphics primitives that Flash provides.
How can I set the translation matrix for Flash to be the same as for any given Starling DisplayObject?
transform.matrix = starlingDO.getTransformationMatrix(starlingDO.root);
comes close, but it seems it does not take into account viewport scaling of Starling.
Have you tried using the Starling Graphics Extension here https://github.com/StarlingGraphics/Starling-Extension-Graphics ?
It's easy to use and you don't have to use native Flash display objects.

OSMF Widget based on MXML and AS3

I have been searching several days for an example of how to make a OSMF Widget writing some code with MXML (At least the layout code) and some code in AS3.
It is my first time working with this tech.
I have wrote some Widgets for OSMF in AS3, but now I have a design (Write in MXML) which I need to draw in the OSMF ChromeApplication.
I have been reading some OSMF source code and it seems that ChromeApplication extends Sprite, so my problem can be reduced to draw a MXML in a Sprite.
So my questions are:
Is it possible to create a MXML element with AS3 code and add it to a Sprite?
If it is possible, how do I do that?
If not, What is the best aproach to have some MXML Classes inside OSMF?
Use UIComponent and s:VideoPlayer for OSMF integration as noted in the above comments.