tag:robotlegs.tenderapp.com,2009-10-18:/discussions/robotlegs-2/13222-how-to-map-starlingeventevent-with-the-commandRobotlegs: Discussion 2015-10-12T17:10:20Ztag:robotlegs.tenderapp.com,2009-10-18:Comment/381611422015-10-11T15:12:22Z2015-10-11T15:12:23ZHow to map starling.event.Event with the Command?<div><p>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?</p></div>Daniiltag:robotlegs.tenderapp.com,2009-10-18:Comment/381611422015-10-12T11:04:46Z2015-10-12T17:10:20ZHow to map starling.event.Event with the Command?<div><blockquote>
<p>The problem is that such an event cannot be mapped with a
Command. Only the event that extends from the flash.events.</p>
</blockquote>
<p>That's right.</p>
<p>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.</p>
<p>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.<br>
The shared event dispatcher can be injected into mediators or even
into views, if need be.</p>
<p>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.</p>
<p>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.</p>
<p>Jamie's<br>
Robotlegs extension to enable simple mediator mapping to a Starling
Stage instance:<br>
<a href="https://github.com/jamieowen/robotlegs2-starling-viewmap">https://github.com/jamieowen/robotlegs2-starling-viewmap</a></p>
<p>Robotlegs extension to enable simple mediator mapping to an
Away3D View3D instance:<br>
<a href="https://github.com/jamieowen/robotlegs2-away3d-viewmap">https://github.com/jamieowen/robotlegs2-away3d-viewmap</a></p>
<p>Andreas'<br>
RobotLegs 2 clock example (with feathers-ui/starling) - using
Jamie's robotlegs2-starling-viewmap :<br>
<a href="https://github.com/brean/robotlegs2-starling-clock-example">https://github.com/brean/robotlegs2-starling-clock-example</a></p>
<p>Alessandro 's Extension - allows you to use Robotlegs with
Starling and Feathers like you'd use with a regular display
list<br>
<a href="https://github.com/alebianco/robotlegs-utilities-starling">https://github.com/alebianco/robotlegs-utilities-starling</a></p>
<p>Vjekoslav 's Example for SARS integration:<br>
<a href="https://github.com/Vj3k0/robotlegs-bender-example-SARS-integration">
https://github.com/Vj3k0/robotlegs-bender-example-SARS-integration</a></p>
<p>For robotlegs version 1:<br>
Omar's Robotlegs plugin that adds some Robotlegs classes to support
usage with the Starling framework.<br>
<a href="https://github.com/s9tpepper/robotlegs-starling-plugin">https://github.com/s9tpepper/robotlegs-starling-plugin</a></p>
<p>I hope this helps.<br>
Ondina</p></div>Ondina D.F.