Custom flash component ApplicationDomain
sFor some reason components aren't attached to the ApplicationDomain of their parent clip. I'm adding a custom component to the stage in flash and at runtime the the components parent ApplicationDomain is null. Also the ApplicationDomain of the swf with the component on it is not equal to the ApplicationDomain of the component. The reason I need it to be linked is for embedded fonts. What can I do to link the application domains?
Update:
Code in SWF frame 1:
import flash.system.ApplicationDomain;
if( myTextField.appDomain == ApplicationDomain.currentDomain )
{
trace( "The domains are the same" );
}
else
{
trace( "The domains are different" );
}
There is an instance of my component on the stage with an instance name of "myTextField".
Code in component:
public function get appDomain( ) : ApplicationDomain
{
return ApplicationDomain.currentDomain;
}
The code on the stage returns "The domains are different" when I compile and run this.
Also "ApplicationDomain.currentDomain.parentDomain" is null in the component.
There is other code in the component, but nothing that would interfere with the appDomain getter.
链接地址: http://www.djcxy.com/p/17854.html上一篇: 如何制作字符串大写的第一个字母?