Duh - sorry - I can trace this out now and I see component.skin.

On Feb 11, 2013, at 1:10 AM, grimmwerks wrote:

> Hmm -- so how do I find the 'skin' part? I was reading about parent vs owner 
> but both of these point to root1, which isn't the actual component...
> 
> Following the PureMVC/Fabrication thing, I've got the mediator sending it's 
> view -- which *should* be an instance of my COVideoPlayer class which extends 
> VideoPlayer but utilizes the skin:
> 
> <video:COVideoPlayer id="videoPlayer" width="100%" height="100%" 
> skinClass="com.creativity.player.skins.video.COVideoPlayerSkin" 
> visible="true" />
> 
> So I'm not sure why the SkinnableComponent is the thing being sent around:
> 
> From the mediator:
> 
> public function get component():COVideoPlayer
> {
>       return viewComponent as COVideoPlayer;
> }
> 
> sending it out:
> 
> //sendNotification(PlayerConstants.FULL_SCREEN_DISPLAY_VIEW, component);
> 
> On Feb 11, 2013, at 12:45 AM, Alex Harui wrote:
> 
>> The only child of a SkinnableComponent is supposed to be Skin and other
>> children go in the skin.  There is no interface for SkinnableComponent, so I
>> guess you have to test for it and add to its skin?
>> 
>> 
>> On 2/10/13 9:03 PM, "grimmwerks" <[email protected]> wrote:
>> 
>>> 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\fram
>>> eworks\projects\spark\src\spark\components\supportClasses\SkinnableComponent.a
>>> s:1123]
>>> at 
>>> com.creativity.player.view::OverlayPanelMediator/respondToFullScreenDisplayVie
>>> w()[/Users/Shared/__WORK/Adage Creativity Player
>>> Redone/src/com/creativity/player/view/OverlayPanelMediator.as:178]
>>> 
>>> 
>>> 
>>> 
>>> Garry Schafer
>>> grimmwerks
>>> [email protected]
>>> portfolio: www.grimmwerks.com/
>>> 
>>> 
>>> 
>>> 
>> 
>> -- 
>> Alex Harui
>> Flex SDK Team
>> Adobe Systems, Inc.
>> http://blogs.adobe.com/aharui
>> 
> 
> 
> Garry Schafer
> grimmwerks
> [email protected]
> portfolio: www.grimmwerks.com/
> 
> 
> 
> 


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




Reply via email to