It's a problem with the way you use the parentheses. Your code is:
(vidButtonBox.getChildAt(0) as VBox).(getChildAt(0) as
VBox).setStyle(backgroundAlpha,0);
Setting the ( after the accessor . is being interpreted as function call
(perhaps setting a filter? anyone knows?). You have to put the
Ok thanks that did the trick.
Haykel BEN JEMIA wrote:
It's a problem with the way you use the parentheses. Your code is:
(vidButtonBox.getChildAt(0) as VBox).(getChildAt(0) as
VBox).setStyle(backgroundAlpha,0);
Setting the ( after the accessor . is being interpreted as
function call
I have a VBox in mxml called vidButtonBox
mx:VBox id=vidButtonBox height=435 width=215
styleName=vidButtonBoxStyle paddingLeft=10 paddingRight=10
/mx:VBox
In action script, I create a VBox with a Vbox child
var vidArea:VBox = new VBox;
var vidButton:VBox=newBbox;
You get the message because getChildAt returns a DisplayObject which does
not have a getChildAt method (that's what the error message is saying). You
have first to cast the object returned from the first getChildAt call to a
DisplayObjectContainer or a subclass of it (in your case it's a VBox).
Haykel BEN JEMIA wrote:
You get the message because getChildAt returns a DisplayObject which
does not have a getChildAt method (that's what the error message is
saying). You have first to cast the object returned from the first
getChildAt call to a DisplayObjectContainer or a subclass of it
5 matches
Mail list logo