2 Replies Latest reply on Mar 8, 2010 10:40 PM by natanr123

    dynamic font loading form diffent domain The value specified for argument font is invalid




      I am trying to dyanmiclly load domain from external swf

      First I Embed the font in an SWF called "FontsSWFList.swf"



      [Embed(source='Assets/fonts/ARIAL.TTF' , fontFamily='Arial Font' , embedAsCFF="true")]


      public static var ArialFont:Class;



      and then I load the SWF in another "main.swf"

      and then get the font Class

      like this:



      loader.load('http://www.natansites.com/FontsSWFList.swf' );



      public function OnFinishedLoadingSWF(event:Event):void



      var FontLibrary1:Class = this.loader.content.loaderInfo.applicationDomain.getDefinition("FontsSWFList_ArialFont") as Class;






      If the FontsSWFList.swf is found on the same domain as main.swf (using reletive path) then everything is OK. But when they are on diffrent domains

      I get an error:

      "The value specified for argument font is invalid"


      There is some disscussion about that here:



      But the solotion seems too complicated and it didn't work for me in FLEX 4 and FTE


      Please help me