1. I've got MAIN.SWF with embedded fonts, using actionscript to create TextFields - and it works fine 2. Then I've got small PRELOADER.SWF which creates MovieClip instance and loades into it MAIN.SWF file using loadMovie everything is fine except that all TextFields which are created in MAIN.SWF with actionscript have no fonts. other TextFields - created with toolbar on Stage looks fine. I see fonts in AS-created TextFields only when I load MAIN.SWF to _root in PRELOADER.SWF - but then of course my preloader dissapears (it's in _root) anybody can help? {flash 6.0}
not likely a flash bug. it's much more likely a path reference problem in main.fla. are you using a reference to _root in any of your code in main.fla? if that doesn't help you track down the problem, you can zip and upload main.fla
here are the scripts (also attached) [preloader.fla] mc=createEmptyMovieClip("mc",1); mc.loadMovie ("main.swf"); [main.fla] font1="Geometric415BlkEU"; txtformat = new TextFormat(); with(txtformat){ color = 0x000000; font = font1; size = 16; } mc1=createEmptyMovieClip("mc1",2); mc1.createTextField("txt",1,0,0,100,20); mc1["txt"].embedFonts = true; mc1["txt"].text = "text text text"; mc1["txt"].setTextFormat(txtformat); (main.fla has textfield on stage with Geometric415BlkEU and selected characters to embed) and now: Flash 6.0 - works wrong Flash 7.0 - works fine and the problem is - I need to use 6.0 ? uho
i don't see anything working whether main is played alone or as flash 7 or flash 6. that's because there's no exported font. in order to embed fonts on a dynamically created textfield you to to link a font in your library for export. so, in your preloader, click on the upper right of your library, click new font, pick the one your want from the dropdown box. that font should appear in your library. right click on it, tick linkage and give it a linkage id, like Geometric415BlkEU. if you link a font in main's libary you'll need to check the use of shared libraries so movies that load main will have access to its library. now compile your swfs and test.
I am really not a beginner: 1. main.fla alone works fine (check the link) - shows "text text text". (main.fla has embedded font) 2. preloader.fla works fine with main.fla when both are compiled with MX2004 as 7.0, with FLASH MX as 6.0 - they don't. About you answer - I don't want to include font in preloader - this is just an example with 1 font - but in my real files I use 4 fonts (50KB) and including them in preloader makes no sense (size) - and preloader doesn't use fonts. so I still don't know how to make small preloader for FLASH6 file with embedded fonts and AS textfields. uho
Hi!! Try this , this is a old school tip for embedding fonts and don?t increase the preloader . Here is an example that use only a 1KB for the preload with a embed font. Flash 6 AS 1.0 it works fine to with mx 2004 Happy Flash. Be fearless Fearless.Studio
but still - I use kilobytes of actionscript (I write movies in pure AS) - and I need to use preloader in other file. is it really impossible to build preloader which will load file with embedded fonts and AS-created textfields properly in Flash6? and nobody had this problem before? uhouho
Hi!! OK master you can use shared libraries to embed the font and after load on your files Be Fearless
I did it, but it solves nothing you write: "in your preloader, click on the upper right of your library, click new font, pick the one your want from the dropdown box. that font should appear in your library. right click on it, tick linkage and give it a linkage id, like Geometric415BlkEU." and I can't attach fonts in preloader.SWF because of their size (4 fonts=50kb==too much for preloader)
Hi Flashers!!! Try withh this example hope this help us !!! 4kb with EmbFont be Fearless Fearless.Studio
Don't see what you're looking for? Try a search.
|