flash text box problemForum: Multimedia Topic: flash text box problem started by: fanboy Posted by fanboy on Aug. 22 2005,21:17
I have a problem. I'm trying to create a new flash game, and I wanted to use dsl as my base developement system. I remastered the dsl disk, adding all of the compilers and libraries I needed. I also added in GTK2 and gsfonts and gsfonts-X11. All of this was done using apt-get from Debian. I finally got all that to work and I'm happy enough.My problem is that when I installed the flash player from Macromedia, it works except text entry boxes show no text in them! This has nothing to do with me or my programing since I've looked at a variety of sites and seen the same thing. For example < this example > should work. In Windows it works fine, but in DSL you can see that it doesn't. Has anyone else seen this or can think of a way to fix it? I want to start programing using the ming library and python, but if DSL doesn't work I'll give up before I waste too much of my time with it. Posted by mikshaw on Aug. 23 2005,14:10
Your linux box apparently doesn't have the font(s) used in the flash game text boxes. Possible solutions:1) save font outlines with the text boxes 2) use a generic _serif or _sans font for the boxes If neither of these work, I'm not sure what to do. I can tell you it's not a problem with the flash player itself, since the same player works with your example in another distro. Posted by fanboy on Aug. 23 2005,18:29
Knowing that the flash player isn't to blame but that the fault is in DSL is a big help. At least I can try other distros and see. Was the other distro a live CD? I like being able to not change anything on my machine if I can help it.I tried installing xfs, gsfonts, gsfonts-X11, xfonts-scalable, and xfonts-100dpi for good measure but the problem is still there. When I tried to install xutils (which I assume has been stripped down) the remaster I made couldn't find startx. I'm able to remaster, my current CD is up to 260 Megs, what I need is to get the fonts working. Has anyone else remastered to add fonts or to upgrade xutils? Posted by mikshaw on Aug. 23 2005,19:02
My guess is a Flash movie created in Windows would be using mainly truetype or type1 fonts. The distro i tested with is suse, with many freetype fonts installed (including fonts copied from a Windows system).
Posted by RoGuE_StreaK on Aug. 24 2005,05:40
You need to embed your fonts in the flash file if they are non-generic. There are generic windoze fonts that will be there on every windoze machine, but NOT under DSL, so flash will either attempt to subsitute a different font or simply not display anything at all. So as mikshaw said, unless it's generic _sans or _serif, or possibly arial et al., then you need to include the font.In MX2004, and I'm pretty sure it's roughly the same for previous versions, I believe your text boxes need to be set to dynamic or input, rather than static, then you'll get a "character" option from which to embed your font. To save space, you can include only the letters/characters you need, specify only uppercase or lowercase letters, etc... Posted by fanboy on Aug. 24 2005,13:33
I am not using MX, but the ming package from Sourceforge. It looks good, I can use actionscript, I can code in python, and it is free. Everything but those text boxes work. I had embeded the font I was using (the swf went up in size a lot from not using a SWFTextField) so I don't think that was the problem. I am going to download the Knoppix DVD and give that a try. It is big enough to have what I need.I am also going to try loading in xfree86 into DSL. I see that there is an extension for it so that should be easy to try. mikshaw, was suse using xfree86? I can get t1 and ttf non-free fonts from debian for those which might solve my font display problems. Thank you both for the help you have been giving me. If I find the answer I will let you know. Posted by fanboy on Aug. 24 2005,18:06
I got those pesky fonts to work! I had to load XF86.dsl and nvidia.dsl, and after I got the xfree86 to work, I uncommented the line:FontPath "/usr/X11R6/lib/X11/font/Type1" and it worked!!! I can see the text correctly in flash! I am not a linux guru, but if anyone is could you please tell me if there is a way to do the same thing on the base DSL system? Is it as simple as adding the Type1 directory to a font path? Where would I do that? Thnks again I am on a cloud right now. Posted by mikshaw on Aug. 24 2005,18:16
You can use the xset command to append or prepend font paths while in X:xset +fp /usr/X11R6/lib/X11/font/Type1 (to prepend) xset fp+ /usr/X11R6/lib/X11/font/Type1 (to append) This can be added to /home/dsl/.xinitrc to have it done automatically. I have no idea if the Xvesa server supports type1 fonts. Posted by fanboy on Aug. 24 2005,19:49
it doesn't look like it does. I got this errorxset: bad font path element (#51), possible causes are: Directory does not exist or has wrong permissions Directory missing fonts.dir Incorrect font server address or syntax There was a fonts.dir, and I ran update-fonts-dir Type1 before I ran xset without an error. If I loaded GTK & defoma would that help? How do you update fonts in GTK? Posted by RoGuE_StreaK on Aug. 25 2005,08:43
Ming huh?Anyone know if a GUI swf producer is in the works? Maybe a combo of a ming type thing and the likes of inkscape... Posted by mikshaw on Aug. 25 2005,15:09
There's f4l, but it's in very early stage. It looks like FlashMX, but most functions are incomplete or non-existent....plus it is Qt-based, which makes Baby Jesus sad.
Posted by fanboy on Aug. 25 2005,17:41
There is an svg2swf script but it doesn't work at all for me. The script is old but it might be fun to rewrite it. When I have used inkscape, it saves the curves as cubic beziers while swf and ming want quadratic beziers. There might be an easy way to convert between them, but it is not obvious to me how. In any case it would be an approximation. It should be easy enough to write a function in python that translates a cubic bezier curve of 4 points (2 end points and 2 control points) into 2 curves with 2 end points and 1 control point each. I see that somewhere hidden in ming is a "drawCubic()" function so that might solve things. Aside from that the CVS version of ming I downloaded isn't all there as far as the python part goes. That could be me because I don't know that much actionscript (which ming is supposedly good at). I hope it is me because then I would have a medium sized, right now around 200Megs, system that lets me compile almost anything I need (python, gcc, g++, the latest perl, tcltk, php, and many libraries). Posted by UnderARock on Dec. 10 2005,20:06
I'm having a similar problem with getting text to display in flash games from various web sites... I've been unsuccessful in getting this fix to work. I'm not sure I'm actually getting XFree86 to run. How do I do that once it's installed and I've changed the xserverrc? |