HTML TextField Linespacing To PDF
Hi, Has anyone had problems matching Flash's linespacing in a textfield to HTML line spacing in the browser. Is there a way to make them the same for all fonts?
We are using MX2004, will later flash help this?
Our objective is to export the textfield's html and convert it to PDF. We can't get the line space to be the same. Does anyone know how Flash calculates its line spacing? We are also using embedded fonts.
Does anyone know a PDF component that will take the Flash TextField's HTML and convert it to PDF accuatly?
Thanks, Matt
ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 05-09-2007, 08:33 AM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
HTML TextField Linespacing To PDF
Hi,
Has anyone had problems matching Flash's linespacing in a textfield to HTML line spacing in the browser. Is there a way to make them the same for all fonts?
We are using MX2004, will later flash help this?
Our objective is to export the textfield's html and convert it to PDF. We can't get the line space to be the same.
Does anyone know how Flash calculates its line spacing? We are also using embedded fonts.
Does anyone know a PDF component that will take the Flash TextField's HTML and convert it to PDF accuatly?
Thanks,
Matt
Linespacing Different Between Mac And Win?
Hello,
I'm expierencing some problems while developing in Flash5 Win with files from a design studio which is working with Mac.
The linespacing is different when using the same font (A postscript font TheSans). Arial doesn't give any problems.
What could be a solution or what is the best way to develop cross platform when text layout is important?
Greetz,
Tim
Textformat Linespacing
Hi guys,
I have to set the linespacing of a text box.
My textformat:
textFormat = new TextFormat();
textFormat.color = "0xFFFFFF";
textFormat.underline = false;
textFormat.bullet= false;
textFormat.size= 8;
textFormat.font= "fff corporate";
What is the parameters for linespacing?
I didn't find it yet.
Thanx
Bye
______________
Noir
Function For LineSpacing?
Does anyone know a function to determine the exact Pixel distance between lines in a textfield?
Setting LineSpacing to zero and you'll still have spacing between the lines.
This distance is variable on text size but the actual function is eluding me. It's not completely Linear i believe. I can't find any information on it anywhere.
If your asking why does he need that? Well i'm trying to match it in something else outside of flash and have to replicate that distance between the lines.
Any Info on linespacing would be helpful.
-Dice
[F8] ComboBox LineSpacing
I've searched high and low, and was surprised to find that I couldn't really find anything, on...
How does one adjust the linespacing on the UI ComboBox component?
I can skin all sorts of other things, but find it strange that there's nothing about linespacing or text padding or...
Has any kind soul an insight to the problem? Many thanks in advance.
ComboBox LineSpacing
I've searched high and low, and was surprised to find that I couldn't really find anything, on...
How does one adjust the linespacing on the UI ComboBox component?
I can skin all sorts of other things, but find it strange that there's nothing about linespacing or text padding or...
Has any kind soul an insight to the problem? Many thanks in advance.
[help] Linespacing Increases When Embbeding Font
I am suing a few textfields in the stage of my flash movie were I put in text that is loaded from external .TXT files at run-time using the following function:
actualLang = "_GER";
actualTextfile = ("text/home");
loadText = new LoadVars();
loadText.onLoad = function() {
mainText1 = this.text1;
mainText2 = this.text2;
titleText = this.title;
locationText = this.location;
}
_global.textIt = function() {
loadText.load(actualTextfile + actualLang + ".txt");
}
the textfields have X.0 Y.0 coordinates, they're aligned on the left side, I have embbeded the right characters and pressed the "lias text" button to give it the pixel look I want.
Also I use HTML code there and it it working FINE.
The problem is: It dramatically increases the space between lines!!!
I already tried to use the textFormat.Indent function, which reduces the linespacing, but then the text look blurred and dirty around the pixels like if it was simply squeezed!
The fonts I tried to use were Arial and Hooge
Everyday I see sites that don't seem to have this problem..
How can it be done right?
thanks in advance
antonio brandao
Pixelfont Linespacing...text Gets Blurry As You Go
Last edited by Fig : 2003-01-06 at 12:42.
ok, i'm using alias from fontsforflash and no matter what linespacing I use some of the text starts getting blurry. there's lots of info in their documentation about setting on the whole pixel, using the right point size, etc., and i'm doing all that, but there's nothing anywhere about linespacing. my first few lines of text are clear and after that the spacing is apparently throwing the alignment off the whole pixel and things get blurry. anyone experienced this/figured it out? thanks.
chris
p.s. this should've gone in the flash mx section, not sure how it got here, sorry
Leading, Linespacing Or Distance Between Lines Of Text
How to do leading on Flash may seem like a stupid question but there is no mention of it on properties, where they have font size and letterspace, nor is the word lead or linespace in the "help" nor is it in my book Flash 8 in 24 hours Kerman (is this book crap or what?)
Appreciate any tips you might have. I know there has to be leading linespace.
TextField: Can We Embed HTML In Textfield?
Hello all,
I know that textfield can embed HTML like:
Code:
createTextField("noteText", 1, 100, 100, 300, 30);
noteText.type = "dynamic";
noteText.wordWrap = true;
noteText.border = true;
noteText.html = true;
noteText.htmlText = '<font color="#FF0000">This is HTML</font>';
I wonder if we embed button, HTML input field int Flash textfield?
Code:
noteText.htmlText = '<input name="txtTest" type="text">';
Thanks,
INPUT TextField Within An HTML TextField Via <img>
I'm trying to extend an HTML TextField to include an INPUT TextField control as an <img> tag. This I can do. The problem is that mouse and keyboard events are not being seen by the inner TextField. I created a test case to demonstrate the situation. My guess is that <img> tags are treated like AS2 events and because the outer TextField is trapping text events, they are not propagated to the inner TextField. Is there anyway around this problem? Mouse events to other DisplayObjects work fine. I'm using Flash CS3.
The test case contains two classes. TextImgTest is the document class for TextImgTest.fla. TestImg implements the <img> loaded by TestImgTest. To run this. Just create an empty TextImgTest.fla and set the document class to TextImgTest. Then publish and run.
Attach Code
package
{
import flash.display.MovieClip;
import flash.events.TimerEvent;
import flash.text.TextFieldAutoSize;
import flash.text.TextField;
import flash.text.StyleSheet;
import flash.utils.Timer;
import TestImg;
public class TextImgTest extends MovieClip
{
public var textField: TextField;
public var styleSheet: StyleSheet;
public var img: TestImg;
public var timer: Timer;
public function TextImgTest(): void
{
// render directly
img = new TestImg();
addChild(img);
// render within a TextField as an <img> tag.
styleSheet = new StyleSheet();
styleSheet.setStyle("p", {fontFamily:"sans-serif", fontSize:"10"});
textField = new TextField();
textField.styleSheet = styleSheet;
textField.multiline = true;
textField.autoSize = TextFieldAutoSize.LEFT;
textField.wordWrap = true;
textField.border = true;
textField.borderColor = 0x0000FF;
textField.background = true;
textField.backgroundColor = 0xFFCCFF;
textField.width = 190;
textField.x = 5;
textField.y = 120;
textField.htmlText = "<p>TextField with an <img src='TestMsg' id='rmk'> tag:<br><img src='TestImg' id='rmk'></p>"
addChild(textField);
textField.selectable = true;
textField.mouseEnabled = true;
// Give it a little time to render then get a reference to it.
timer = new Timer(3000, 1);
timer.addEventListener(TimerEvent.TIMER_COMPLETE, onTimeout);
timer.start();
}
public function onTimeout(evt: TimerEvent): void
{
var freeText: TestImg = textField.getImageReference("rmk") as TestImg;
freeText.tField.mouseEnabled = true;
freeText.tField.selectable = true;
freeText.tField.appendText(" Got ImageReference for 'rmk'.");
}
}
}
===================================================
package
{
import flash.display.MovieClip;
import flash.display.SimpleButton;
import flash.display.Sprite;
import flash.text.TextFieldAutoSize;
import flash.text.TextFormat;
import flash.text.TextFormatAlign;
import flash.text.TextField;
import flash.text.TextFieldType;
public class TestImg extends MovieClip
{
static public const MSG_WIDTH: int = 170;
static public const MSG_HEIGHT: int = 100;
static public const MSG_MARGIN: int = 8;
public var tFmt: TextFormat;
public var tField: TextField;
public var sBut: SimpleButton;
public function TestImg(): void
{
super();
this.tabEnabled = false;
this.mouseEnabled = false;
// Show this MovieClip
with (this.graphics)
{
clear();
beginFill(0x9999FF);
drawRect(0, 0, MSG_WIDTH, MSG_HEIGHT);
endFill();
}
// Show the INPUT TextField within it.
tFmt = new TextFormat("_sans", 10, 0x000000, true, false,
false, null, null,
TextFormatAlign.LEFT);
tField = new TextField();
tField.type = TextFieldType.INPUT;
tField.height = MSG_HEIGHT - 2*MSG_MARGIN - 16;
tField.defaultTextFormat = tFmt;
tField.multiline = true;
tField.wordWrap = true;
tField.width = MSG_WIDTH - 2*MSG_MARGIN;
tField.border = true;
tField.borderColor = 0xFF0000;
tField.background = true;
tField.backgroundColor = 0xFFEECC;
tField.x = MSG_MARGIN;
tField.y = MSG_MARGIN;
tField.text = "TestImg MovieClip containing an INPUT TextField.";
this.addChild(tField);
tField.selectable = true;
tField.mouseEnabled = true;
// Show the button within this MovieClip
var butGraphics1: Sprite = new Sprite();
with (butGraphics1.graphics)
{
lineStyle(1, 0x000000);
beginFill(0xFF0000);
drawRect(0, 0, 32, 16);
endFill();
}
var butGraphics2: Sprite = new Sprite();
with (butGraphics2.graphics)
{
lineStyle(1, 0x000000);
beginFill(0x00FF00);
drawRect(0, 0, 32, 16);
endFill();
}
sBut = new SimpleButton();
sBut.upState = butGraphics1;
sBut.overState = butGraphics2;
sBut.downState = butGraphics1;
sBut.hitTestState = butGraphics2;
sBut.x = MSG_MARGIN;
sBut.y = MSG_HEIGHT - MSG_MARGIN - 16;
this.addChild(sBut);
}
}
}
Display Html Table In Html Enabled Textfield. Alternative?
hello!
i'm facing an issue due to the shortcomings of html tag support in flash.
The xml file containing the content to be displayed in a textfield (with html enabled) on the stage, contains a table. Right now, it displays each cell underneath each other, as if it were a paragraph. Any idea if there is a way to do this?
Also, is it possible to display an image inside a textfield (loading a img src="myimage.jpg" ) ?
thanks a lot!
alex
HTML Textfield Shows My Html Tags?
My html properties of my textfield are set on true and STILL he shows all my html tags? (property is set with actionscript AND in properties panel)
The XML with the html content looks like this:
====================================
<?xml version="1.0" encoding="utf-8" ?>
<texts>
<text><![CDATA[ <p>Vai kaut reizi esi</p>]]></text>
</texts>
====================================
Code:
var xmlTexts:XML = new XML();
xmlTexts.ignoreWhite = true;
xmlTexts.onLoad = function(ok) {
if (ok) {
var varText = this.firstChild.firstChild;
mvcText1.txt.html = true;
mvcText1.txt.htmlText = new String(varText);
//mvcText1.txt.htmlText = "<p> this is text </p><p> this is text </p><p> this is text </p>";;
trace("HTML set on "+mvcText1.txt.html);
}
};
xmlTexts.load("texts.xml");
HTML Textfield Not Rendering HTML
Hi!
I'm running into a problem that's driving me nuts - please see the following .fla (80K):
http://www.crazyhorst.de/htmltextfields.fla
Flash simply doesn't seem to render HTML in HTML-Textfields for me. Everything between tags simply disappears, even such simple things as <b>bold</b> formatting. What am I doing wrong?!
Thanks,
Herrner
HTML In Textfield
Hi,
I'm wondering if it's possible to make an HTML table in a dynamic text field.
I'm combining flash with ASP and I have made a table, in the asp file it shows fine, but not in the flash file.
The files are on this place:
http://217.8.97.27/weblog/weblog.html
http://217.8.97.27/weblog/home.asp
Thnx
HTML TextField
Is it possible when importing HTML unto a Dynamic Text Field that the text box will display the pictures from the IMG tags as well as all the HTML formatted text?
Or is there a way of doing this or something similar?
Cheers
Jemes
Html Textfield
Hi,
Is there a way to format the actionscript, or the HTML, to load a new window that has set dimensions and no menus etc, in a html textfield?
Any help would be appreciated.
Img In Html Textfield
Hi
I have a little problem. I use an textfield with html content. All works great, text and images display properly. Well, except one thing. If I do a simple test, I put a an image in the html text but the image is higher then the text, I loose the bottom of my image. When I Ajust the textfield, myField._height = myField.textHeight, the textfield ajust but for the text, the text goes at the side of the image, but the textfield fit the text perfectly, not the image. If I trace the myField.height and myField._height it take care of the text only.
Any idea to fit the textfield _height for all its content including image height if bigger then the text.
Tanx for your help
Textfield Html
Code:
// DisplayInfo is used when an item is pressed
// it hides the menu_mc (and the buttons) and shows the
// infobox_mc, assigning the text of the selected button
// to the textbox within.
function DisplayInfo(){
menu_mc._visible = true; // you can set them false or true if you want it to set it
infobox_mc._visible = true;
infobox_mc.content_txt.htmlText = this.contenttext_text;
}
// close_btn is in infobox_mc ands restores
// the menu (clearing the info text and hiding itself as well)
infobox_mc.close_btn.onRelease = function(){
menu_mc._visible = true;
infobox_mc._visible = true;
infobox_mc.content_txt.htmlText = "";
}
infobox_mc._visible = true;// start the info box visible
// define basic variables for setting up the menu
var item_spacing = 310; // how far menu items are spaced
var item_count = 0; // counts menu items as they are added from the XML
// CreateMenu creates a menu based on the XML object passed.
// It loops through all the items with a for loop adding clips to the menu_mc
// movieclip on the timeline, defining the appropriate text where needed
function CreateMenu(menu_xml){
// start with the first item in the XML
var items = menu_xml.firstChild.firstChild.childNodes; // menu -> menuitems -> child nodes array
for (var i=0; i<items.length; i++) {
// only continue if the type of this item is a member of company
if (items[i].attributes.type == "company") {
// create variables for our elements
var year = items[i].firstChild; // same as items[i].childNodes[0]
var contenttext = items[i].childNodes[1]; // second child node
// Create a menu item movie clip in the menu_mc instance on the main timeline
// for each item element offsetting each additional further down the screen
// in second line set _y for vertical menu set _x for horizontal menu
var item_mc = menu_mc.attachMovie("menu_item","item"+item_count, item_count);
item_mc._x = item_count * item_spacing;
item_count++;
// assign text using nodeValue to get the text
// from the text nodes and CDATA sections
item_mc.year_txt.htmlText = year.firstChild.nodeValue;
item_mc.main_btn.contenttext_text = contenttext.firstChild.nodeValue;
// set the onRelease of the item button to the DisplayInfo function
item_mc.main_btn.onRelease = DisplayInfo;
}
}
}
// manage XML
// create new XML object instance, remembering to ignore white space
var philips_xml = new XML();
philips_xml.ignoreWhite = true;
// define an onLoad to create our location menu when the XML has successfully loaded.
philips_xml.onLoad = function(success){
if (success) CreateMenu(this);
else trace("Error loading XML file"); // no success? trace error (wont be seen on web)
}
// load the xml file!
philips_xml.load("philips.xml");
hello
i got this script from the squirrelfinder tutorial and i want the button textfield to render as html, i already changed it in this script but for some reason its not working or i am doin something wrong. the textfield that has to render as html is year_txt
i also enabled render as html text button on the textfield
i hope someone can help
greetz Robb
Textfield Html
Code:
// DisplayInfo is used when an item is pressed
// it hides the menu_mc (and the buttons) and shows the
// infobox_mc, assigning the text of the selected button
// to the textbox within.
function DisplayInfo(){
menu_mc._visible = true; // you can set them false or true if you want it to set it
infobox_mc._visible = true;
infobox_mc.content_txt.htmlText = this.contenttext_text;
}
// close_btn is in infobox_mc ands restores
// the menu (clearing the info text and hiding itself as well)
infobox_mc.close_btn.onRelease = function(){
menu_mc._visible = true;
infobox_mc._visible = true;
infobox_mc.content_txt.htmlText = "";
}
infobox_mc._visible = true;// start the info box visible
// define basic variables for setting up the menu
var item_spacing = 310; // how far menu items are spaced
var item_count = 0; // counts menu items as they are added from the XML
// CreateMenu creates a menu based on the XML object passed.
// It loops through all the items with a for loop adding clips to the menu_mc
// movieclip on the timeline, defining the appropriate text where needed
function CreateMenu(menu_xml){
// start with the first item in the XML
var items = menu_xml.firstChild.firstChild.childNodes; // menu -> menuitems -> child nodes array
for (var i=0; i<items.length; i++) {
// only continue if the type of this item is a member of company
if (items[i].attributes.type == "company") {
// create variables for our elements
var year = items[i].firstChild; // same as items[i].childNodes[0]
var contenttext = items[i].childNodes[1]; // second child node
// Create a menu item movie clip in the menu_mc instance on the main timeline
// for each item element offsetting each additional further down the screen
// in second line set _y for vertical menu set _x for horizontal menu
var item_mc = menu_mc.attachMovie("menu_item","item"+item_count, item_count);
item_mc._x = item_count * item_spacing;
item_count++;
// assign text using nodeValue to get the text
// from the text nodes and CDATA sections
item_mc.year_txt.htmlText = year.firstChild.nodeValue;
item_mc.main_btn.contenttext_text = contenttext.firstChild.nodeValue;
// set the onRelease of the item button to the DisplayInfo function
item_mc.main_btn.onRelease = DisplayInfo;
}
}
}
// manage XML
// create new XML object instance, remembering to ignore white space
var philips_xml = new XML();
philips_xml.ignoreWhite = true;
// define an onLoad to create our location menu when the XML has successfully loaded.
philips_xml.onLoad = function(success){
if (success) CreateMenu(this);
else trace("Error loading XML file"); // no success? trace error (wont be seen on web)
}
// load the xml file!
philips_xml.load("philips.xml");
hello
i got this script from the squirrelfinder tutorial and i want the button textfield to render as html, i already changed it in this script but for some reason its not working or i am doin something wrong. the textfield that has to render as html is year_txt
i also enabled render as html text button on the textfield
i hope someone can help
greetz Robb
Img-tag In Html Textfield
as you can see here:
http://www.embege.com/?mode=flash
i use a textfield with html inside to load images.
now the problem is, that the text shouldnt be to the right of the image, but to the bottom of it, as you can see in the html mode.
http://www.embege.com/?mode=html
does the image tag within flash support something about how text should behave?
thanks!
Html + Textfield
hi guys!
i've encountered a strange thing:
out of an xml file i pull html-formatted text (which is stored inside the
xml as plain text that translates back to all that '<br>' stuff in flash).
so far so good.
i display this text in an html capable textfield. everything works fine, the
text is displayed correctly (i.e. formatted, without tags).
now i've started a new movie where i basically want to do the same
thing: display the html text from the xml in a dynamic, html enabled
textfield.
but it won't display anything as long as i've got html enabled in that
textfield. when i turn html off, it displays everything, incl. the tags
(example: <a href="url">alias</a>)....
...argh...please help me, someone
many thanks
HTML TextField
Is it possible when importing HTML unto a Dynamic Text Field that the text box will display the pictures from the IMG tags as well as all the HTML formatted text?
Or is there a way of doing this or something similar?
Cheers
Jemes
Rollover In HTML Textfield
Hello there,
just made a HTML textfield and in this field are a few sentences. A word in a sentence should have a rollover. Is this possible to track if the mouse is over the sentence and then display the rollover.
I used the <A HREF="asfunction:funtionName,arguments">word with onClick function</A> handeling the click on the words but, is this function also useable for the rollover or should I approach this differently?
Greetings,
How To Set Dyn. Textfield To HTML-Text?
Hello!
I saw in some examples that you can use HTML-code in a dynamic text-field (for example to set the textcolor: fieldTextVar = "<FONT color=""+color+"" >"+text+"</FONT>";
).
When I make a new dynamic textfield and assign this text to the fieldTextVar, the whole HTML-code appears in the text. What do I have to do to make flash to use the html-code instead of showing it?
HTML (textfield) And Swf Problem
Hey guys,
I got 2 questions for you today...hope you'll answer...
Ok I have an HTML file which I want to load with loadvariable in a window (made in flash). When I want to load it it loads nothing. Nothing appears. the path is good, 'cos Flash would say an error...i don't remember how this is call but I want to do just like XML files...interactive...heh I don't remember the name...
Also, how do you tell this in Flash:
When the big flash begin I want to hide another clip and only start it when I click a button.
my hiden clip is on scene 1.MENU (that's the frame) and in 1srt picture. My button is on the root-cornerpoints-buttons, 2nd picture.
Do I have to make another layer for my hidden clip? Because I want it open up on the main flash site...it's a popup window...
Sorry if I'm speaking badly english...
But thanks for your answers
Alpha
Textfield-html Not Working On The Web
Hi fellows. Ive been using flash for some time now but Ive never encountered this problem before...
When I preview the file in flash (ctrl+enter) everything works fine, but when I view the file in explorer (both on my computer and from the web) the text in my textfields wont go bold... everything else works, Its just the bold-part thats missing... I just cant figure this out.
Now I have eaten dinner, fippled around some more (without luck) and noticed Ive havent posted this yet. so here we go!
thanks and peace
HTML Codes Use In A Textfield
Oke so i want to make a Textfield, with a scrollbar. Now thats not so hard but, i want to use HTML in that Textfield.
I heard that i need to convert the HTML codes to Actionscript codes
If thats true then how do i do that?
Image In An Html Textfield
hi,
i'm using the img tag to display an image in a html texfield with some text but the text doesn't flows around the image correctly unless i make it selectable and click on it which of course is not a solution...
does anyone know how to make the text appear correctly ?
here's my code in case you need it:
/// Flash on frame 1///
var imgXML:XML = new XML();
imgXML.ignoreWhite = true;
imgXML.onLoad = function(success){
if(success){
var root = this.firstChild;
_root.txt = root.firstChild.nodeValue;
T1.htmlText = txt;
}
}
///
I've put a dynamic textField named T1 on the first frame
imgXML.load("img.xml");
/// XML ///
<?xml version="1.0" ?>
<n>
<![CDATA[<img src="img.jpg"width="285"><br>Txt de description de l'image]]>
</n>
///////
HTML + Dynamic Textfield + Swf
I have a problem and this is it:
1. I have a flash web page with different categories, Home, Gallery, Profile & Contact form.
2. In the Home category I have a dynamic textbox which has HTML text loaded from outside the swf file.
3. Inside that text are news about all sorts of things including references to some of the content in the Gallery category.
4. and now to the problem... How can I make a link within the HTML text in the dynamic text box that redirects the user directly in to the Gallery category to the specific content mentioned in the HTML text ?
Many Images In Html Textfield
hello,
whenever i load more than one image they just stack ontop of each other. i want them to but up against each other like tiles. is this possible?
hints & tips much appreciated!
dave.
Formating A Textfield With HTML
Hi,
I'm trying to format a text field using HTML by changing the htmlText property. Nevertheless it doesn't seem to work as it thought it works, because Flash puts some html code in advance with the format set during the design time.
Before going any further, let me show you a part of the code that changes the text field:
ActionScript Code:
_viewMC.pageLinksMC.pageLinks.htmlText = "";
// changes the page numbers
for(var i = 1; i <= newTotalPages; i++){
// if processing the current page then make the number gray
if(i == newCurrentPage){
_viewMC.pageLinksMC.pageLinks.htmlText = "<font color='#AAAAAA'>";
}
// opens the link tag (a click on a number generates an onPageClick event)
_viewMC.pageLinksMC.pageLinks.htmlText += "<a href='asfunction:onPageClick," + i + "'>";
// adds the number to the string
_viewMC.pageLinksMC.pageLinks.htmlText += String(i);
// closes the link tag
_viewMC.pageLinksMC.pageLinks.htmlText += "</a>";
// closes the color tag
if(i == newCurrentPage){
_viewMC.pageLinksMC.pageLinks.htmlText += "</font>";
}
// if not the last page then put a comma next to the number
if (i < newTotalPages){
_viewMC.pageLinksMC.pageLinks.htmlText += ", ";
}
}// end for
trace("pageLinks is: " + _viewMC.pageLinksMC.pageLinks.htmlText);
The _viewMC.pageLinksMC.pageLinks refers to an actual TextField object on the stage (well, on the pageLinksMC movieclip, to be more accurate).
The result is on the final trace is:
<P ALIGN="CENTER"><FONT FACE="Arial" SIZE="10" COLOR="#323232" LETTERSPACING="0" KERNING="0">1, 2, 3, 4, 5, 6, 7, 8, 9, 10</FONT></P>
For some reason my html code is simply ignored. I was expecting that each number was wrapped on a <font> </font> tag set, but no, for some reason Flash is refusing those changes. The only HTML code that is on the field is really the format set during the design time (font, size, color, alignment, everything is according to the text field properties set in design time).
Do you have any idea why Flash isn't accepting my html code?
Textfield Html Links To AS?
Long shot... but,
I'm creating a textfield dynamically and filling it with some formated text.
I need to link headlines to other parts of the same swf.
I can't use javascript in html to do it (long story).
So is there any way to use an href to target a frame or function in the same swf?
This didn't work...lol.
Code:
<span class='date'>01/14/07</span>
<span class='headline'><a href="actionscript:;" onClick="trace('click');">Blah Blah</a></span>
...
Or do I have to use split, multiple textfields etc.
ANSWER: Yes, there is:
This sends '1' to a function called 'test'
<a href="asfunction:test, 1">
TextField Does Not Show In HTML
not sure this has the best title
but here is my dilemma I have actionscript 3 put textfeilds on the stage and ai can see them on when I test the movie but when I publish to the web they never show up ?
ActionScript Code:
var alink:TextField;
function onLoaded(e:Event):void{
xml = new XML(e.target.data);
var itemList:XMLList = xml.channel.item;
if (itemList.length() <linklimit)
{
linklimit = itemList.length();
}
for (var i:uint=0; i< linklimit; i++)
{
alink = new TextField();
stage.addChild(alink);
alink.x = 0;
alink.autoSize = "left";
alink.y = i * alink.height * 5;
alink.name = "link" + i;
alink.htmlText = "<a href="" + itemList.link.text()[i] + "">" + itemList.title.text()[i] +"</a>";
alink.styleSheet = styles;
}
}
Img In Html Textfield Flickering
Hi,
I have html being output to textfields in pageflip and the img tags in the html are flickering.
Can anyone suggest a fix for this? Is there any way to cache the rendered html or something?
Thanks.
Images In A Html-textfield
Hi,
I am currently working on a site with some dynamic content, in which the user is capable of inserting text to display on the site. The text the user gives is coded with my own tags, such as [title] to show some text as a title. I am now working on the [img] tag and I have run into some problems with the placement of the images.
I use a textfield with htmlText to display the content of the site. When inserting an image in this textfield, I find the image is always placed on the left side of the textfield, simply skipping one line when needed. It's behavior is entirely different from normal html. And it gets worse when placing two images next to eachother on one line. Again, the second image skips one line, moves to the left and appears overlapping the other image. I know, that the reason for this is that flash creates an mc with the image in it and places it in the textfield. But then how would I for example place two images next to eachother? Do I need to set the coordinates of the images manually? And how would I find these coordinates?
A second problem is the placing of text after the image. Let's say I have a bit of text, then a new line with an image, and I wanted to continue with my text bellow the image. When continuing the text after the image, it shows up on the side of the image, even when using a new line.
I really need some good proposals here. Thanks for reading.
Ignifex
AS3 - TextField - HTML Text
Hi,
I would like to find a nice solution to the following problem:
I have a large HTML text containing text and images (<img>) inside a source TextField. I need to split this content into several TextField's of a fix width and height so that no scrolling is required.
I tried to use all the new goodies that AS3 provides (getLineText(), bottomScrollV, etc). They are very helpful and if I had normal text (no HTML tags) to deal with, I could split the content without a problem. My problem is to do this on a HTML content. It is very difficult to find the HTML version of a splitted content.
Does anybody have an idea I could do this job?
Any help is greatly appreciated.
HTML In TextField ... Out Of An XML-file
I'm loading text from an xml-file (that contains html-tags) into a textfield.
If I use the regular html-tags in my xml-file, it will cause the text to be cut off at the point where it encounters the first special character '<'. If I use the corresponding html-code (< for the special char, my html will show just fine in my flash. BUT it's not me who is going to update the xml-file, and even if it were, the proces of replacing every special char with the html-code is too annoying.
Is there ANY way to keep using the regular html-tags in xml, so that the html will show just fine in my textfield? I thought about replacing the characters through actionscript (special char -> html-code) but that of course makes it display the corresponding character in the textfield, not parsing the html-tags.
Please help me out, it's driving me nuts! There has got to be a way to do this, right?
Html Textfield Img Problem
Hi all,
I've an html textfield that show some html text loaded dinamically. Inside the html, after a p tag, there are 2 images. Is possible to set the position of the images to be, like the text, centered inside the texfield?
Now all the images are floating left...why?
Thanks to all
Not Possible To Render Html In Textfield
Uhmmm...probably a real rookie question, but...
I have this textfield with text in it(duh!) typed directly in the field (not via AS).
The trouble is that the HTML-tags i use don't get rendered.
But when entered in AS it does work.
So...is it impossible to render HTML-tags directly from the textfield?
If not, WHY DOESN'T MINE WORK!?
fla-file @ : http://www.serelsnauw.nl/users/marce...er-stories.fla
swf-file @ http://www.serelsnauw.nl/users/marce...er-stories.swf
HTML Textfield Not Showing %
I'm dynamically loading data from a mysql database into html textfields in flash. It's working great but for whatever reason my php script which draws from the db and makes the content flash friendly doesn't display the percent sign.
Here is the excerpt from the string when I read directly from the php script:
Recent+statistics+indicate+that+50%25+of+the+people+make+up+half+the+population.
In Flash it should read:
Recent statistics indicate that 50% of the people make up half the population.
However it reads:
Recent statistics indicate that 50of the people make up half the population.
The percent sign is correctly changed to %25 but upon the urldecode in Flash which works great for other characters doesn't work for this one character.
I'm using Verdana as the font and know Verdana supports the percent sign...
Any ideas on where I'm going wrong or where I can look?
TextField HTML Support
I am developing a flash application that returns html text to a textField object. The returned text is a list of names.
I have recently added search functionality to this application, and would like to be able to highlight the searched name within a page of non-highlighted names.
I have been trying to work with css to see if I can find a way to make this happen, but have been unsuccessful to this point. Here is the html code that I know will do what I want:
<font style:background-color:#000000>FirstName LastName</font>
Is there any way to get this effect in flash?
Thanks,
Ron
TextField, HTML, <br>, TextWidth
OK, I have a wierd problem for you all. I am loading dynamic text, via XML, then the text is loaded in to a textfield is created on the fly.
Here is the example of the XML:
<building id="0">
<name>Old Main</name>
<info><![CDATA[In the fall of 1894 Old Main, the first building on campus, was completed. The Georgian revival structure housed all departments of the school-classrooms, faculty offices, sleeping quarters, library, gymnasium, and dining room.<br>Atop the roof is the Cupola, an open octagonal bell tower recognized as the symbol of North Park. The cupola, which was electrically lighted in 1926, served as a landmark for early pilots who used it as a landmark to find Orley Field (today's O'Hare International Airport). The cupola was the tallest point on the city's north side.<br>In 1984, Old Main was completely renovated through the generosity of alumni and friends, the Old Main Preservation Society, and numerous corporations and foundations. Today, Old Main houses <a href="/afao/" target="_blank"><u>Admission</u></a>, <a href="/offices/student_accounts/financial.html" target="_blank"><u>Financial Aid</u></a>, Communications, <a href="/alumni/" target="_blank"><u>University Relations</u></a>, the Business Office, and the Office of the President.]]></info>
<images total="4"/>
</building>
I have all the following properites set for the textField:
ActionScript Code:
movieLevel['infoTxt'+j].wordWrap = true;
movieLevel['infoTxt'+j].multiline = true;
movieLevel['infoTxt'+j].html = true;
movieLevel['infoTxt'+j].embedFonts = true;movieLevel['infoTxt'+j].condenseWhite = false;
The font is in the Library. What the problem seems to be is that when the Flash player reaches the second <br>, it puts an enter, then the next line does not wordWrap.
See:http://www.northpark.edu/testSWF/textFieldHTML.swf
Thanks for your help in advance...
Richard
HTML Textfield Woes...
Anyone encounter/know a fix for the following?
Bringing html text and putting back into a html text box ie.
someTextfield_txt.htmlText=someHtml;
Results in spaces between tags being ignored ie.
<i>This</i> <b>has got to be a bug</b>
Returns:
Thishas got to be a bug
Even though the HTML was originally generated using flash anyway.
I'm sure I've read about this somewhere, but can't think where, anyone know a quick fix?
Cheers
MM
Dynamic Html Textfield
Last edited by spikeranch : 2002-06-28 at 08:16.
I've done this in Flash 5 a number of times with success everytime.... I'm authoring in FMX now for a site that I'm exporting as Flash5. My problem is that the text doesn't show up.
I have a Dynamic textfield in an MC nested in another MC and the variables are loaded from the server in a .txt file. eg. textField=<p>Blah blah blah</p>
There is a flash 5 coded scrollbar that adjusts itself to the amount of text but the actual text doesn't show up in the movie.
This worked without any problem in Flash5, I do it a bunch on my site now. I've checked variable names, paths, and have tried different ways of calling loadVariables without success exporting it as Flash5.
I don't want to export it as Flash6 because I don't want to make people install the player.( I might have to after this week though.)
Thanks...
after edit: I did a trace and the text is loaded...weird. Also...see my post below.
Enable HTML For A Dynamic Textfield... Why?
Hiya,
Well here goes..
Im still busy with the AS and ASP, and believe me, It kicks ass!! Finally some serverside scripting being processed realtime, without the darned page having to reload everytime =D
But now my question. I was wondering what the HTML function is for in the flash dynamic textfields and Input fields.
My guess was, that I can have an ASP page send data to it in HTML format e.g.: <b>BOLD TEXT</b> and things like a <table>....</table> etc..
When I turned of the HTML feature and had the page send the data, all the text, including the HTML tags, appeared in the box.. no go.
Then I turned it on, but everything disappeared!
Nothing at all was displayed. So sending a string like <b>BOLD TEXT</b> turned out nothing at all..
What is the trick to make this work, or am I completely barking up the wrong tree here?
thanks lots in advance, Jim
Problem With Formatting HTML In A Textfield
Hello everybody,
when i assign this html code to my textfield variable the text tht is suppossed to be "bold" dosent show.
pls help
with regards
kiran
----------------THE HTML -----------------------
It comprises: <br> <b>Quality Objectives </b> <br>This specifies the qualitative quality objectives in terms of the performance, classification of defects, phase wise acceptable level of defects, acceptable deviations from cost and effort. It may also contain the strategy to achieve these quality objectives. <br><b>Verification and Validation</b> <br>It mentions the schedule for various reviews and tests for the different phases of the development lifecycle. This also identifies different types of verification and validations to be used for the project. Review methodology, schedule, resources assigned and the approval authority is also mentioned. <br><b>Tools and Techniques</b> <br>The special software tools used, techniques and the methodology used for quality assurance are mentioned here. For example any tools used for testing, bug management etc. can be mentioned here. <br><b>Quality Records</b> <br>This specifies the project records and documents to be prepared, over and above the SDP, for the project on quality assurance activities. This may include the bugs in the tracking tool, test reports etc.
TextField Word Wrap/html Bug
yes, a real (easily reproduced) bug.
I've submitted it to macromedia,
posting to let others know.
What is ocurring in dynamically created textfields:
when you define a first paragraph using "p" tags, the expect/want the remaining text to wrap, it doesn't.
Also, you must add paragraph tags to make your text wrap at the appropriate word, it just won't do it itself.
Code:
_root.formatText = function(t) {
var tF = new TextFormat();
tF.font = "copy";
tF.size = 8;
tF.color = 0xFF0000;
t.setTextFormat(tF);
};
var x = new XML();
x.parseXML("< content body="<p>This week features "Teahupoo" pt1, the Billabong pro in Tahiti. Kelly Slater ruling, plus some heavy carnage.</p><p>Cd of the week is EARWORK.03 by Wellingtons Capital Recordings, check out the competitions section. Our website of the week is southparkmovie.com, go check it out in our links section." / >");
_root.createTextField("myText", 1, 5, 5, 200, 200);
_root.myText.background = true;
_root.myText.selectable = true;
_root.myText.multiline = true;
_root.myText.wordWrap = true;
_root.myText.html = true;
_root.myText.embedFonts = true;
var copy = x.firstChild.attributes.body;
_root.myText.htmlText = copy;
_root.formatText(_root.myText);
edit:lost xml string with html parsing.
|