Oct 12, 2011
Today I finished creating a set of classes for the Robotlegs framework that allow you to use the Starling Framework with Robotlegs.
Robotlegs is a great lightweight application development framework that works great with traditional Flash and Flex based projects. With the release of the Starling Framework we can now leverage the new Stage3D APIs in Flash to create 2D experiences that are GPU accelerated. This means we can now build even richer user experiences in Flash than we ever have before! Because Starling is based on Stage3D the Context class that comes with Robotlegs does not work out of the box with the Starling framework. Using the robotlegs-starling-plugin that I have uploaded on GitHub you can now bring these two great frameworks together and start building great Stage3D experiences with Starling!
Awesome. I'd be interested in a list of the things you had to do to build your library. Robotlegs v2 will not require you to extend framework classes to add functionality. If we had a list of the integration points we could ensure that RL2 integrates with Starling more easily.
Well, the main issue with Robotlegs 1 not working out of the box with Starling is that Starling is not based on the traditional DisplayList, that's one part. The other part is also around the face that Starling does not extend the native Event class, it has its own starling.events.Event class as well as its own EventDispatcher, which unfortunately doesn't implement the IEventDispatcher either because the Starling implementation uses its own starling.display.DisplayObjectContainer. The DisplayObjectContainer is also the reason why I needed to create different interfaces that don't expect flash.display.DisplayObjectContainers in order to map views to mediators. I had to make a StarlingMediator as well so it could work with starling.display.DisplayObjectContainer. So the majority of the issues were based around the absence of flash.display.DisplayObjectContainer when working with Starling.
hi omar, recently i downloaded your work, and i think it is a really brilliant idea..
but i found a problem, i can't find the command class on your robotlegs+starling library, which is exist on the original robotlegs, is it any substitute class like you do on context and mediator?
Hi Dimas, glad you're enjoying the plugin.
The plugin classes I created work along with Robotlegs 1.5.1, I have not tested them with other version but I wouldn't expect them not to work. That is, you still use Robotlegs with the same classes as you normally would, except you use StarlingContext instead of Context, and StarlingMediator instead of Mediator. You will also have to map the starling.event.Event objects that get dispatched from the Starling framework into flash.event.Event objects so you can use the Robotlegs event bus. Let me know if you have any other questions about it.
hi omar..
i have another question.. when i'm using the plugin i got error :
"[Fault] exception, information=Error: Injector is missing a rule to handle injection into property "mediatorMap" of object "[object LoadConfigCommand]". Target dependency: "org.robotlegs.core::IMediatorMap", named ""
"
that error appeared when the contextevent.startup_complete was dispatched.. but it was ok before i ported my project to use starling and robotlegs .. any help?
Is there any code you can show me so I can see what you're seeing? Maybe an .fxp file you can send me with some code that does this?
Hi Omar,
i have question about mediators ( the example of use Straling with Robolegs from https://github.com/s9tpepper/robotlegs-starling-plugin)
question: SecondViewMediator not work, i dont see any trace from this mediator. trace("SecondViewMediator.onRegister()");
Hey Taras,
There's a change that needs to get merged into the Starling framework repo so that when a view gets added to the display it bubbles the event so the view mapper can auto map the view's mediator. The changes have been made by @ripcurlx in his branch that I linked below. We're hoping this pull request gets merged soon.
https://github.com/ripcurlx/Starling-Framework
Thanks for u respond. Now I need your advice for use it. How I can combine or use your plagin for classic (nativ) flash object, I try create classic context and starlingcontext but models object was different for both context trees.
Great Robotlegs Integration. The dependency injection is functional, but non-native.
Adobe's Flash Platform roadmap is out! Included are ActionScript 4.0 revelations. From a language design standpoint, Adobe uses the following assumptions as a guide for next-generation ActionScript development; a) longterm productivity, b) high performance, & c) hardware utilization.
What would Robotlegs developers love to see in AS4? Native dependency injection?
READ ALL THE DETAILS!
http://www.rivellomultimediaconsulting.com/actionscript-4-revealed/