View Full Version : Dynamic, HTML rendering Issue.
WebmasterPimp
03-13-2006, 03:02 AM
Hello, Im currently working on a project which imports text dynamicly from a .txt file.
Now this text will contain html tags, etc... SOME works fine. like my image file under author information. eg. <img src="author.jpg" width="75" height="135">
It shows up fine. My issue is more towards text formatting tags. Like <b>test</b>
If I upload my work using tags such as this. All the text between my tags donnot display.
My dynamic text box in flash has the following AS.
entries.html = true;
entries.wordWrap = true;
entries.multiline = true;
entries._alpha = 100;
entries.border = false;
entries.backgroundColor = 0xDCDBD9;
As recomended by the help file to have those properties set for this type of dynamic loading.
However my problem still exists. WTF is going on here? why does some tags work, and some donnot?
Any sudgestions or ideas?
oldnewbie
03-13-2006, 04:22 AM
Are you embedding the font used?
If so, and are using the bold and/or the italic styles, you need to seperately embed those outlines also.
WebmasterPimp
03-13-2006, 07:10 AM
Yes I am using embeded font's Ive also attempted to use "All" embeded. As far as I know that should included all types of embeded fonts. However The results return the same. Font wont display those character between my <b> tags. Any help would be gratefull
thanks
oldnewbie
03-13-2006, 03:27 PM
All will only embed the glyphs of the current style selected in the textfield.
As I posted, you need to seperately embed the font's bold outlines and the italic ones also if you intend to use it.
The easiest way IMHO, is to create off stage textfields in which the other styles are embedded...
See the attached...
WebmasterPimp
03-14-2006, 02:28 AM
Your example worked quite well. Thanks! I think to prevent errors later on Flash may want to include this method by a simple "Option" in the properties inspector.
Well thats a long shot. But thanks any ways. Later.
oldnewbie
03-14-2006, 02:51 AM
Grrrrrrrrrreat! ;)
WebmasterPimp
03-14-2006, 06:54 AM
Noticed on my export my SWF file became roughtly 50KB larger by having these 2 new (bold, and Italic) offstage text area's with embeded font. is there a way to reduce this file Size?
thanks again.
oldnewbie
03-14-2006, 07:15 AM
Have you embedded the whole character sets.
Would you be using all characters bold and italic?
WebmasterPimp
03-15-2006, 05:21 AM
Im assuming the extra file size is generated from "font face" using Bold or Italic. Basicly Ive embeded the font's like your example provided. Using the embeded classes "UPPER CASE" "lower case" "numbers" and "symbols". Now using those same font text area's off stage I unclicked the B, and I options in properties inspector and exported it, the file size was again back to normal. So my geuss is that they are storing the font face, within my SWF, and making a cross class for those added effects. I belive this to be poor programming =p but its all they got for now so Ill have to deal with it.
oldnewbie
03-15-2006, 05:36 AM
Well you can limit the embedding to the characters used, if you're only using numerals in one style for example, that would reduce the extra size...
As for it being bad programming, that's like it's always been in Flash when embedding different styles... You should maybe complain to Adobe!
AdamSchroeder
03-16-2006, 09:08 PM
oldnewbie,
Thank you so much for your example! Exactly what I was looking for. I'm actually using a complete TextFormat object to format my text and works great!
I was wondering if it is possible to create a new text field that uses the embeded font completely within AS. I understand you would still need to manually place the "source" text on stage.
Is this possible? Certainly easy enough to work around if I use "attachMovie" to essentially create a newText field by AS.
Thanks again!
Adam Schroeder
oldnewbie
03-17-2006, 12:32 AM
http://flash-creations.com/notes/dynamic_createtext.php
AdamSchroeder
03-17-2006, 03:06 PM
Simple enough. I thought I would need to have a reference in exported actionscript reference in the library... but you don't.
Works great!
Thanks!
Adam
oldnewbie
03-17-2006, 04:35 PM
Well both ways work fine... It's just easier with off-stage textfields.
alflashy
01-12-2007, 09:39 PM
hi
oldnewbie
I have the same problem and the answer is in the .zip file
I downloaded it but fla gave the error
"unexpected file format"
I am using Flash MX 2004 Professional.
Do you have another version of it
Thanks
Flash Gordon
01-12-2007, 09:54 PM
this should open in Flash 7.
alflashy
01-15-2007, 04:56 PM
Thanks
Flash Gordon
That works
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.