Re: [Flashcoders] createTextField and embedding fonts
Yup, I did exactly this and it works great! Thanks! - Original Message - From: "Arindam Dhar" <[EMAIL PROTECTED]> To: "Flashcoders mailing list" Sent: Tuesday, January 09, 2007 10:24 AM Subject: Re: [Flashcoders] createTextField and embedding fonts 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 differe
Re: [Flashcoders] createTextField and embedding fonts
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 >
Re: [Flashcoders] createTextField and embedding fonts
Hello orangeflower, http://www.sharedfont.com/eng/faq.html#include ohc> I'm sorry to do this and I'm sure someone has an explanation here, but I'm ohc> at my wit's end. ohc> I have an empty swf that is loading another swf with all of my views, assets ohc> etc. I am creating ohc> a font symbol in the "view" swf's library to be used later by dynamic ohc> TextFields. The font symbol ohc> is being exported for ActionScript and has a linkage identifier. From the ohc> container swf I'm ohc> dynamically creating dynamic TextFields within the "view" swf and setting ohc> the embedFonts and ohc> text properties appropriately like so: ohc> textTitleFormat = new TextFormat(); ohc> textTitleFormat.font= "AkzidenzGroteskBE"; ohc> textTitleFormat.color = 0x51433D; ohc> textTitleFormat.align = "left"; ohc> textTitleFormat.underline = true; ohc> textTitleFormat.size= 24; ohc> titleText = curProductText.createTextField("Title" + "_" + date.getTime(), ohc> curProductText.getNextHighestDepth(), this.View.copyBox.Title._x, ohc> this.View.copyBox.Title._y, this.View.copyBox.Title._width, ohc> this.View.copyBox.Title._height); ohc> titleText.text = title; // where title is a string; this is tracing out the ohc> value I expect ohc> titleText.type = "dynamic"; ohc> titleText.embedFonts = true; ohc> titleText.antiAliasType = "normal"; ohc> titleText.setTextFormat(textTitleFormat); ohc> The question I have is it possible to apply a TextFormat to a TextField ohc> using an embedded font that is NOT ohc> in the container swf's library? If not then that is my problem and I think I ohc> can use shared libraries to counter ohc> this behavior. Either way, I was wondering if someone could clarify some of ohc> this for me. ohc> Thanks, ohc> Thomas ohc> ___ ohc> Flashcoders@chattyfig.figleaf.com ohc> To change your subscription options or search the archive: ohc> http://chattyfig.figleaf.com/mailman/listinfo/flashcoders ohc> Brought to you by Fig Leaf Software ohc> Premier Authorized Adobe Consulting and Training ohc> http://www.figleaf.com ohc> http://training.figleaf.com -- Ivan Dembicki [EMAIL PROTECTED] || http://www.design.ru ___ 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
Re: [Flashcoders] createTextField and embedding fonts
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" <[EMAIL PROTECTED]> 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@
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
Re: [Flashcoders] createTextField and embedding fonts
I ended up using Shared libraries but that wasn't the problem. I'm almost embarrassed to say... I had a movieclip where I was setting it's visibility to false and therefore wasn't seeing it. Wow... that was definitely a dumba$$ moment. I did however find that the shared library route was much more predictable. Everyone probably knows this but I'll post what I did anyway... I made a separate .fla called SharedFonts.fla and inside of that created a font symbol. I then checked the "Export for ActionScript" and the "Export in first frame" checkboxes. From there, I imported the SharedFonts.fla into my view .fla containing the text to which I wanted to apply the particular font. This part is a bit counter-intuitive. In order for the symbol to be available during runtime from my view .swf, the symbol inside of the view fla has to have a few properties set as well. First you must check the "Export for ActionScript" checkbox and supply a linkage identifier. Second, and this is the counter-intuitive portion, you MUST check the "Export for runtime sharing" check box and subsequently provide the location to the shared library .swf containing the font symbol. In my case this was SharedFonts.swf. Last, and I'm not sure if this is necessary or not, is to check the "Export in first frame". 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" <[EMAIL PROTECTED]> 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
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