0

How to control videodisplay functions like videodisplay.stop, pause(), close etc from the presentation model? But I need to control it from Presentation model. Custom events is not my option, as that is costly.

ketan
  • 19,129
  • 42
  • 60
  • 98

2 Answers2

0

Take a peek at my code behind approach: you could just give the model an id and call methods on it. But i really don't think custom events are too costly.

Community
  • 1
  • 1
Florian Salihovic
  • 3,921
  • 2
  • 19
  • 26
0

I used the Binding tag to solve a similar problem (calling centerAt on an ESRI Map) :

<fx:Binding source="model.videoState" destination="videoState"/>
<fx:Script>
    <![CDATA[
        private function set videoState(value:String):void
        {
            // do whatever is to be done

This avoid custom events, and preserve the pattern : your presentation model does not know about the video display.

Romain F.
  • 766
  • 10
  • 15