Hi Thomas,
   
  ok, its coming a bit late though, but here is a solution for using shared 
font library..
   
  1) in SharedFonts.fla, have a shared font, let the linkage identifier be 
"testfont" and symbol name also the same.Export it for runtime sharing as done 
normally.
   
  2) in receiving fla, import the shared font from the SharedFonts.swf.( only 
import from the specified URL, in this case SharedFonts.swf).
   
  The tricky part comes now,
   
  3) create a movieClip symbol in  receiving fla. library, create a dynamic 
textfield inside it at authoring time with font as testfont*, and give a dummy 
linkage(export for AS, export in first frame).
   
  now,try this code to test it,
   
  this.createTextField("myTf",this.getNextHighestDepth(),10,10,200,20);
  var tFormat:TextFormat = new TextFormat();
tFormat.font ="testfont";
  this.myTf.embedFonts =true;
this.myTf.wordWrap = true;
  this.myTf.text ="Testing the shared font";
this.myTf.setTextFormat(tFormat);
   
  This works fine, and the idea of shared library holds good too, as u will see 
that changing any font property in SharedFonts.fla/swf gets reflected in 
receiving.swf.
   
  Mind it, the trick is step 3  :-)
   
  regards,
   
  Arindam
   
  
[EMAIL PROTECTED] wrote:
  I think you might be right here Arindam. Perhaps in the receiving file I 
merely need to do an import for runtime sharing instead of exporting it in 
the shared fonts swf. The documentation has always been a little spotty in 
terms of what's actually going on when using shared libraries... Thanks for 
the response!

----- Original Message -----
From: "Arindam Dhar" 
To: "Flashcoders mailing list" 
Sent: Wednesday, January 03, 2007 4:43 AM
Subject: Re: [Flashcoders] createTextField and embedding fonts

> hi Thomas,
>
> going by the steps u mentioned earlier, if I change a property,say Font, 
> in the SharedFonts.fla and save and publish, later if i publish the fla 
> which imports the shared font, i don't see the change in font done in the 
> SharedFonts.fla.
>
> >7. Once the font symbol from SharedFonts.fla is in your other .fla's 
> library
> right click on it (in your other .fla's library) and go to properties. 
> Check
> the "Export for ActionScript", "Export for runtime sharing" and "Export in
> first frame" checkboxes. Supply the location to SharedFonts.swf (e.g.
> SharedFonts.swf or somepath/SharedFonts.swf) in the URL field below the
> checkboxes.
>
> the receiving file, in shared library concept, usually "imports for 
> runtime sharing" the object from the URL specified, but in the above line 
> there is no import happening, in fact, both the SharedFonts.fla and 
> receiving file are "exporting for runtime sharing".
>
> The idea behind shared libraries is "change in one place and it will get 
> updated everywhere", but its not working here...
>
> Hope, I will get some clarification on this....
>
> ----------- Arindam
>
>
>
> [EMAIL PROTECTED] wrote:
> So, to recap...
>
> 1. Create a SharedFonts.fla that will contain the font symbol you want to
> use in another movie.
> 2. Create the font symbol in SharedFonts.fla. Once the font symbol is
> created make sure to check the "Export for ActionScript", "Export in first
> frame" checkboxes in the Properties dialog box.
> 3. Publish the .swf for the SharedFonts.fla.
> 4. Open the .fla in which you want to use the font symbol from
> SharedFonts.swf.
> 5. Then, go to File -> Import -> Open shared library... and open
> SharedFonts.fla
> 6. Drag the font symbol from the SharedFonts.fla library into your other
> fla's library that will be using the font.
> 7. Once the font symbol from SharedFonts.fla is in your other .fla's 
> library
> right click on it (in your other .fla's library) and go to properties. 
> Check
> the "Export for ActionScript", "Export for runtime sharing" and "Export in
> first frame" checkboxes. Supply the location to SharedFonts.swf (e.g.
> SharedFonts.swf or somepath/SharedFonts.swf) in the URL field below the
> checkboxes.
> 8. Publish your other .fla and you should be good to go.
>
> One thing to be mindful of is the path to your SharedFonts.swf. This MUST 
> be
> correct in order for these shared fonts to work. To simplify things I just
> placed the SharedFonts.swf in the same directory as my other .swf.
>
> I hope this helps someone....
>
> Cheers,
>
> Thomas
>
> ----- Original Message -----
> From: "Glen Pike"
>
> To: "Flashcoders mailing list"
> Sent: Tuesday, January 02, 2007 2:59 PM
> Subject: Re: [Flashcoders] createTextField and embedding fonts
>
>> Hi,
>>
>> Yes, you will probably need to use "runtime sharing" and load in the
>> fonts contained in a different file.
>>
>> Glen
>>
>>
>>> The question I have is it possible to apply a TextFormat to a TextField
>>> using an embedded font that is NOT
>>> in the container swf's library? If not then that is my problem and I
>>> think I can use shared libraries to counter
>>> this behavior. Either way, I was wondering if someone could clarify some
>>> of this for me.
>>>
>> _______________________________________________
>> Flashcoders@chattyfig.figleaf.com
>> To change your subscription options or search the archive:
>> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>>
>> Brought to you by Fig Leaf Software
>> Premier Authorized Adobe Consulting and Training
>> http://www.figleaf.com
>> http://training.figleaf.com
>>
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
>
>
> Send instant messages to your online friends 
> http://asia.messenger.yahoo.com
> _______________________________________________
> Flashcoders@chattyfig.figleaf.com
> To change your subscription options or search the archive:
> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders
>
> Brought to you by Fig Leaf Software
> Premier Authorized Adobe Consulting and Training
> http://www.figleaf.com
> http://training.figleaf.com
> 
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com


 Send instant messages to your online friends http://asia.messenger.yahoo.com 
_______________________________________________
Flashcoders@chattyfig.figleaf.com
To change your subscription options or search the archive:
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Brought to you by Fig Leaf Software
Premier Authorized Adobe Consulting and Training
http://www.figleaf.com
http://training.figleaf.com

Reply via email to