Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- TypeError: Error #2007: Parameter child must be non-null.
- at flash.display::DisplayObjectContainer/getChildIndex()
- at mx.core::Container/getChildIndex()[E:dev3.0.xframeworksprojectsframeworksrcmxcoreContainer.as:2409]
- at mx.containers::ViewStack/set selectedChild()[E:dev3.0.xframeworksprojectsframeworksrcmxcontainersViewStack.as:557]
- <?xml version="1.0" encoding="utf-8"?>
- <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
- <mx:Script>
- <![CDATA[
- [Bindable]
- private var targetViewName:String = "content";
- ]]>
- </mx:Script>
- <mx:ViewStack id="viewStack" width="100%" height="100%"
- selectedChild="{Container(viewStack.getChildByName(targetViewName))}">
- <mx:Panel id="welcome" width="100%" height="100%" />
- <mx:Panel id="content" width="100%" height="100%" />
- </mx:ViewStack>
- </mx:Application>
- <?xml version="1.0" encoding="utf-8"?>
- <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
- <mx:Script>
- <![CDATA[
- import mx.core.Container;
- [Bindable]
- private var targetViewName:String = "content";
- private function onClick() : void
- {
- viewStack.selectedChild = Container(viewStack.getChildByName(targetViewName)) ;
- }
- ]]>
- </mx:Script>
- <mx:ViewStack id="viewStack" width="100%" height="100%" >
- <mx:Panel id="welcome" width="100%" height="100%" title="welcome"/>
- <mx:Panel id="content" width="100%" height="100%" title="content" />
- </mx:ViewStack>
- <mx:Button click="onClick()" label="click" />
- </mx:Application>
- selectedChild="{this[targetViewName]}">
- <?xml version="1.0" encoding="utf-8"?>
- <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
- <mx:Script>
- <![CDATA[
- [Bindable]
- private var targetViewName:String = "content";
- ]]>
- </mx:Script>
- <mx:TabNavigator id="viewStack" width="100%" height="100%" creationPolicy="all"
- selectedChild="{this[targetViewName]}">
- <mx:Panel id="welcome" width="100%" height="100%" label="welcome" />
- <mx:Panel id="content" width="100%" height="100%" label="content" />
- </mx:TabNavigator>
- </mx:Application>
- <mx:TabNavigator id="viewStack" width="100%" height="100%" creationPolicy="all" >
- <mx:Panel id="welcome" width="100%" height="100%" label="welcome" />
- <mx:Panel id="content" width="100%" height="100%" label="content" addedToStage="viewStack.selectedChild = this" />
- </mx:TabNavigator>
- <mx:Script>
- <![CDATA[
- import models.ModelLocator;
- [Bindable]
- private var model:ModelLocator = ModelLocator.getInstance();
- ]]>
- </mx:Script>
- <mx:ViewStack id="videoViewStack" width="100%" height="100%" selectedChild="{this[model._videoViewStack]}" >
- <viewsVideos:AllVideos id="AllVideos" label="Videos"/>
- <viewsVideos:MainVideo id="MainVideo" label="Video"/>
- </mx:ViewStack>
Add Comment
Please, Sign In to add comment