I'm trying to pop something above items that are calling for fullscreen like 
the VideoPlayer; but in my case I've extended the VideoPlayer and created a 
SkinnableComponent for it.

I've got a little bit of code that I'm using ubiquitously by a few different 
components and for some reason this video player is being seen as NOT an 
IVisualElementContainer but of course the addElement has to work with it vs 
addChild; so I'm unsure how I can or really SHOULD be checking for this? Here's 
the code:

debugger.trace(this,'test: ' + (note.getBody() is IVisualElementContainer));
var ui:UIComponent = note.getBody() as UIComponent;
if(note.getBody() is IVisualElementContainer){
        var n:IVisualElementContainer = note.getBody() as 
IVisualElementContainer;
        n.addElement(view);
}else{
        ui.addChild(view);
}


That first line outputs as false -- and forgive the note.getBody() - -that's 
the way PureMVC / Fabrication sends messaging around.  So I'm basically sending 
the view of the videoPlayerMediator out to be dealt with but for this the code 
throws an error:

Error: addChild() is not available in this class. Instead, use addElement() or 
modify the skin, if you have one.
        at 
spark.components.supportClasses::SkinnableComponent/addChild()[E:\dev\4.y\frameworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.as:1123]
        at 
com.creativity.player.view::OverlayPanelMediator/respondToFullScreenDisplayView()[/Users/Shared/__WORK/Adage
 Creativity Player 
Redone/src/com/creativity/player/view/OverlayPanelMediator.as:178]




Garry Schafer
grimmwerks
[email protected]
portfolio: www.grimmwerks.com/




Reply via email to