I have a question about the above topic. is it ok to retrieve a mediator in a proxy class and perform some kind of action on it?? here is what is going on. i have a connection proxy class, which makes connection to fms server. when the connection is made, i attempt to grab the camera by using
Camera.getCamera( _camera );
now if a camera exists.. i want to do something like this
if (_camera)
{
localVideo.video.attachCamera(_camera);
}
but localVideo is the id of an mxml component for the mediator whose proxy i am trying to construct. thats why i want to know...can i do this instead in the proxy
eg
_myMed = facade.retrieveMediator ( VideoPublisherMediator.NAME ) as VideoPublisherMediator;
that way the above if statement will look like this
if (_camera)
{
_myMed.localVideo.video.attachCamera(_camera); <- retrieved mediator to use in proxy
}
can i do that? or is it bad practice? OR! can i dispatch/sendnotification that from the proxy and pass in the camera object in the body so the view can take over from there?
please help.
thanks