Hi,

 

I’m hoping someone here can help me… I’ve been following the dynamic font library tutorial at http://www.deja-vue.net/blog/2006/05/26/as2-sharedfonts-datagrid-example-the-last-stand/ and have created a test swf which loads two fonts created using swfmill, but I seem to have problems running it in both Firefox and IE 6.0.  In Firefox the font’s load just fine, however, once a font is loaded the memory usage of Firefox starts to increase at an alarming rate.  When the swf loads the memory usage is around 32,852k but as soon as a font is loaded this increases by about 1mb a second and never stops till it runs out of memory.  In IE if I try to load a font the browser crashes on me.  This is on XP SP2 with the server being Win 2003 / IIS6.

 

Has anyone experienced this behaviour and is there a fix/workaround/why?

 

Test page is located here : http://1lgkptest.no-ip.info/fonttest/fonttest.html

 

Font swfs are http://1lgkptest.no-ip.info/fonttest/barbatrick.swf & http://1lgkptest.no-ip.info/fonttest/handlegothicbt.swf

 

xml for swfmill was created like so:

 

<?xml version="1.0" encoding="iso-8859-1" ?>

<movie width="1" height="1" framerate="12">

<frame>

<library>

<font name="_Standard Font" import="D:\wwwroot\krazyplates\My Media\Fonts\F0.ttf" glyphs=" ABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789" />

</library>

<Import url="" Media/Fonts/F0.ttf.swf"></Import>

</frame>

 

The test swf has a single function to create a dynamic textfield and load the font:

 

function loadFont(fontname, fontfile, fontsize) {

            var loadermc = _root.createEmptyMovieClip("loaderMc", 2000);

            this. {

                        pct = Math.round((this.loaderMc.getBytesLoaded()/this.loaderMc.getBytesTotal())*100);

                        if (pct == 100) {

                                    var my_fmt:TextFormat = new TextFormat();

                                    my_fmt.font = fontname;

                                    my_fmt.align = "center";

                                    my_fmt.size = fontsize;

                                    _root.createTextField("txtfld", 1, 50, 50, 0, 0);

                                    var txtfld = _root.txtfld;

                                    txtfld.text = "THIS IS A DYNAMICALLY LOADED FONT";

                                    txtfld.antiAliasType = "advanced";

                                    txtfld.autoSize = "left";

                                    txtfld.embedFonts = true;

                                    txtfld.setTextFormat(my_fmt);

                                    removeMovieClip(this.loaderMc);

                                    delete this.onEnterFrame;

                        }

            };

            loadMovie(fontfile, loadermc);

}

 

Each button has code like so:

 

on (release) {

            loadFont("_Barbatrick", "barbatrick.swf", 30);

}

 

I’m desperate for a resolution to this – please help!

 

Thanks in advance,

 

GP

 

_______________________________________________
swfmill mailing list
[email protected]
http://osflash.org/mailman/listinfo/swfmill_osflash.org

Reply via email to