FLEX-34501 add support for 3rd party components
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/44a07f54 Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/44a07f54 Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/44a07f54 Branch: refs/heads/master Commit: 44a07f5488f546d19c2efc3f20b023be10152d2e Parents: 3d905a5 Author: Justin Mclean <jmcl...@apache.org> Authored: Mon Oct 13 09:08:58 2014 +1100 Committer: Justin Mclean <jmcl...@apache.org> Committed: Mon Oct 13 09:08:58 2014 +1100 ---------------------------------------------------------------------- TourDeFlex/TourDeFlex3/src/explorer.mxml | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/44a07f54/TourDeFlex/TourDeFlex3/src/explorer.mxml ---------------------------------------------------------------------- diff --git a/TourDeFlex/TourDeFlex3/src/explorer.mxml b/TourDeFlex/TourDeFlex3/src/explorer.mxml index c8851b9..58e2240 100755 --- a/TourDeFlex/TourDeFlex3/src/explorer.mxml +++ b/TourDeFlex/TourDeFlex3/src/explorer.mxml @@ -42,8 +42,25 @@ compLibTree.dataProvider = explorerTree; noExamples = (explorerTree..node.(hasOwnProperty("@app") && @app.length() > 0)).length(); + + var loader:URLLoader = new URLLoader(); + var request:URLRequest = new URLRequest("3rdparty.xml"); + loader.addEventListener(Event.COMPLETE, load3rdParty); + loader.load(request); } - + + protected function load3rdParty(event:Event):void + { + var loader:URLLoader = URLLoader(event.target); + var newNode:XML = new XML(loader.data); + + if (newNode..node.length() > 0) { + explorerTree.appendChild(newNode.node); + compLibTree.dataProvider = explorerTree; + noExamples += (newNode..node.(hasOwnProperty("@app") && @app.length() > 0)).length(); + } + } + protected function checkParameters():void { var parameters:Object = FlexGlobals.topLevelApplication.parameters;