forked from: ApplicationDomain.currentDomain isn't ApplicationDomain.currentDomain !
/**
* Copyright 9re ( http://wonderfl.net/user/9re )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/nfXY
*/
// forked from imajuk's ApplicationDomain.currentDomain isn't ApplicationDomain.currentDomain !
package {
import flash.display.Sprite;
import flash.text.TextFormat;
import flash.text.TextField;
import flash.text.TextFieldAutoSize;
import flash.system.ApplicationDomain;
public class FlashTest extends Sprite {
public function FlashTest() {
/**
* ApplicationDomain.currentDomain って
* まともに動いてます ?
*/
var output:XML =
<html>
<p><font size='12'><u>ApplicationDomain.currentDomain doesn't work ??</u></font></p><br/>
<p>
<b>(loaderInfo.applicationDomain == ApplicationDomain.currentDomain)</b><br/>
should be <b>true</b> but actually
<b>{(loaderInfo.applicationDomain == ApplicationDomain.currentDomain)}</b>
</p>
<br/>
<p>
<b>(ApplicationDomain.currentDomain == ApplicationDomain.currentDomain)</b><br/>
should be <b>true</b> but actually
<b>{(ApplicationDomain.currentDomain === ApplicationDomain.currentDomain)}</b>
</p>
<br/>
<p>
<b>(ApplicationDomain.currentDomain === ApplicationDomain.currentDomain)</b><br/>
should be <b>true</b> but actually
<b>{(ApplicationDomain.currentDomain == ApplicationDomain.currentDomain)}</b>
</p>
<br/>
<p>
<b>the parent domain of main application's domain</b><br/>
should be <b>System Domain</b> but actually
<b>{ApplicationDomain.currentDomain.parentDomain}</b>
</p>
<br/>
<br/>
<p>
I guess ApplicationDomain.currentDomain returns a new copy every time.<br/>(ApplicationDomain.currentDomainは毎回値のコピーを毎回返すのでは?)
</p>
<br/>
<ul>
<li>[] === [] : {[] === []}</li>
<li>{"{} === {} : " + ({} === {})}</li>
<li>loaderInfo.parameters === loaderInfo.parameters : {loaderInfo.parameters === loaderInfo.parameters}</li>
</ul>
</html>;
XML.ignoreWhitespace = false;
XML.prettyPrinting = false;
XML.prettyIndent = 0;
var tf:TextField = addChild(new TextField()) as TextField;
tf.autoSize = TextFieldAutoSize.LEFT;
tf.multiline = true;
tf.defaultTextFormat = new TextFormat("_typewriter", 10);
tf.htmlText = output;
}
}
}