HTML in Flash
- Started
- Last post
- 8 Responses
- kinetic
im having a bit of a problem with text generated by a CMS being readable in flash
in html font size="10" is absoultely huge...but in flash 10 is an acceptable font size because it is in pixels.
how can i make this translation from the cms to flash?
- caseyc0
Use css in both the html and flash. Look up TextField.StyleSheet in the flash reference you can even use the same external css file if you want.
- kinetic0
problem is the font is being set by the user through a WYSIWYG editor so i dont have any control over that
i am trying to get the developers to change it to pixels instead of points ... not having much luck though
- caseyc0
So, is the problem input or output? Is the size info from flash going to the cms which shows an html page with giant text? Or is the html text being loaded into a swf which is showing it really small?
- tomkat0
maybe you are mixing the old way of size="7" with the css font-size:10?
other wise leave the formatting in flash only
- UndoUndo0
maybe convert between points and pixels?
- kinetic0
the problem is that the WYSIWYG component in the CMS is what sets the database and then flash pulls that data
so in the cms you set a font and the html for it looks like this this is the text
that works great in html, and when the WYSIWYG editor reads that back in it will display fine (say if you are editing) because it is html
but flash will not read that fine because flash uses pixels
the same code in flash has a diff unit of measurement. in flash means 3 pixels not points....which renders it unreadable to the end user
- kinetic0
bah, my html got all wacked out there
[font size="3"] works in the editing component, but in flash it does not
is bascially what i was saying
- kinetic0
i found these two articles which explain the discrepancy
http://chattyfig.figleaf.com/pip…
http://chattyfig.figleaf.com/pip…
the shitty thing is, if i want to fix it i would have to strip the size out of the html strings that get passed back to flash and then multiply the font size number by 4/3 ..... that's brutal