You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@flex.apache.org by jm...@apache.org on 2014/10/27 07:23:04 UTC
[04/50] [abbrv] git commit: [flex-utilities] [refs/heads/master] -
Add a bit more flexibility in loading load - mostly for better 3rd party
support
Add a bit more flexibility in loading load - mostly for better 3rd party support
Project: http://git-wip-us.apache.org/repos/asf/flex-utilities/repo
Commit: http://git-wip-us.apache.org/repos/asf/flex-utilities/commit/faa11c6a
Tree: http://git-wip-us.apache.org/repos/asf/flex-utilities/tree/faa11c6a
Diff: http://git-wip-us.apache.org/repos/asf/flex-utilities/diff/faa11c6a
Branch: refs/heads/master
Commit: faa11c6a3f011ef376094582553d4c9abfbf9cd6
Parents: e9c8726
Author: Justin Mclean <jm...@apache.org>
Authored: Mon Oct 13 10:47:18 2014 +1100
Committer: Justin Mclean <jm...@apache.org>
Committed: Mon Oct 13 10:47:18 2014 +1100
----------------------------------------------------------------------
TourDeFlex/TourDeFlex3/src/explorer.mxml | 7 ++++++-
TourDeFlex/TourDeFlex3/src/viewsource.mxml | 9 +++++++--
2 files changed, 13 insertions(+), 3 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/faa11c6a/TourDeFlex/TourDeFlex3/src/explorer.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/explorer.mxml b/TourDeFlex/TourDeFlex3/src/explorer.mxml
index 58e2240..b02c147 100755
--- a/TourDeFlex/TourDeFlex3/src/explorer.mxml
+++ b/TourDeFlex/TourDeFlex3/src/explorer.mxml
@@ -89,7 +89,12 @@
private function loadApp(application:String, source:String):void
{
- swfLoader.loadApp(application + ".swf");
+ if (application.indexOf(".swf") > 0) {
+ swfLoader.loadApp(application);
+ }
+ else {
+ swfLoader.loadApp(application + ".swf");
+ }
vs.loadSource(application, source);
}
http://git-wip-us.apache.org/repos/asf/flex-utilities/blob/faa11c6a/TourDeFlex/TourDeFlex3/src/viewsource.mxml
----------------------------------------------------------------------
diff --git a/TourDeFlex/TourDeFlex3/src/viewsource.mxml b/TourDeFlex/TourDeFlex3/src/viewsource.mxml
index a0b9ce5..ce66728 100755
--- a/TourDeFlex/TourDeFlex3/src/viewsource.mxml
+++ b/TourDeFlex/TourDeFlex3/src/viewsource.mxml
@@ -32,7 +32,12 @@
{
var files:Array = new Array();
// the first file shown will be the mxml source
- files[0] = appUrl + ".mxml";
+ if (appUrl.indexOf(".mxml") >= 0 || appUrl.indexOf(".as") >= 0) {
+ files[0] = appUrl;
+ }
+ else if (appUrl.indexOf(".swf") == 0) {
+ files[0] = appUrl + ".mxml";
+ }
if (srcUrl != null && srcUrl != "")
{
@@ -41,7 +46,7 @@
files = files.concat(otherSrc);
}
- for (var i:int ; i < files.length ; i++)
+ for (var i:int = 0; i < files.length ; i++)
{
tabs[i] = new SourceTab();
tn.addChild(tabs[i]);