forked from: forked from: forked from: ApplicationDomain.currentDomain isn't ApplicationDomain.currentDomain !
/**
* Copyright yonatan ( http://wonderfl.net/user/yonatan )
* MIT License ( http://www.opensource.org/licenses/mit-license.php )
* Downloaded from: http://wonderfl.net/c/oE0B
*/
// 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/>
<p>
<b>(loaderInfo.applicationDomain.getDefinition("Object") ==
ApplicationDomain.currentDomain.getDefinition("Object"))</b><br/>
should be <b>true</b> but actually
<b>{(loaderInfo.applicationDomain.getDefinition("Object") == ApplicationDomain.currentDomain.getDefinition("Object"))}</b>
</p>
<br/>
<p>
<b>(ApplicationDomain.currentDomain.getDefinition("Object") ===
ApplicationDomain.currentDomain.getDefinition("Object"))</b><br/>
should be <b>true</b> but actually
<b>{(ApplicationDomain.currentDomain.getDefinition("Object") === ApplicationDomain.currentDomain.getDefinition("Object"))}</b>
</p>
<br/>
<p>
<b>(ApplicationDomain.currentDomain.getDefinition("Object") ===
(new ApplicationDomain).getDefinition("Object"))</b><br/>
should be <b>false</b> but actually
<b>{(ApplicationDomain.currentDomain.getDefinition("Object") === (new ApplicationDomain).getDefinition("Object"))}</b>
</p>
<br/>
<p>
ApplicationDomain.currentDomain.getDefinition("Object") : {(ApplicationDomain.currentDomain.getDefinition("Object"))}
<br/>
(new ApplicationDomain(ApplicationDomain.currentDomain)).getDefinition("Object") : {((new ApplicationDomain(ApplicationDomain.currentDomain)).getDefinition("Object"))}
</p>
<br/>
<p>
see http://www.mail-archive.com/flexcoders@yahoogroups.com/msg126193.html
<br/>
and http://www.mail-archive.com/flexcoders@yahoogroups.com/msg126278.html
</p>
</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;
}
}
}