How to map starling.event.Event with the Command?
I have an issue with Starling and Robotlegs 2. I want to dispatch an event that extends starling.event.Event from View using Mediator. The problem is that such an event cannot be mapped with a Command. Only the event that extends from the flash.events.Event. How can I do that?
Comments are currently closed for this discussion. You can start a new one.
|?||Show this help|
|ESC||Blurs the current field|
|r||Focus the comment reply box|
|^ + ↩||Submit the comment|
You can use
Command ⌘ instead of
Control ^ on Mac
Support Staff 1 Posted by Ondina D.F. on 12 Oct, 2015 11:04 AM
Starling Events are different from the flash.event.Event. Also, Starling has its own EventDispatcher, so the robotlegs shared event dispatcher can't hear the events dispatched on the Starling one.
The solution is to find a way of 'translating' the starling events into custom flash events and to dispatch the custom flash events on the robotlegs' shared dispatcher.
The shared event dispatcher can be injected into mediators or even into views, if need be.
But, there are already a few Starling extensions available for robotlegs 2 which were built to solve the problem of Starling's Event, EventDispatcher and automatic mediators creation.
I don't know about the state of these projects, whether they are still maintained, whether they work with the latest version of robotlegs 2 and so on. You'll have to try them out and see which one is working for you best. I'd start with Andreas' clock example.
Robotlegs extension to enable simple mediator mapping to a Starling Stage instance:
Robotlegs extension to enable simple mediator mapping to an Away3D View3D instance:
RobotLegs 2 clock example (with feathers-ui/starling) - using Jamie's robotlegs2-starling-viewmap :
Alessandro 's Extension - allows you to use Robotlegs with Starling and Feathers like you'd use with a regular display list
Vjekoslav 's Example for SARS integration:
For robotlegs version 1:
Omar's Robotlegs plugin that adds some Robotlegs classes to support usage with the Starling framework.
I hope this helps.
Daniil closed this discussion on 12 Oct, 2015 01:59 PM.