Formatting HTML Text Fileds
I have been having problems when using the <a:hover> in HTML text. But what I thought was a StyleSheet issue has worked out to be a textField autoSize issue.
This is what im doing:Loading CSS formatted text using PHP
Loading the CSS
Creating the new TextField
Formatting the TextField
Displaying the TextField
When I use the following TextField formatting and I roll over an <a> link my text likes to jump around:
ActionScript Code:
with(TextField)
{
width = 280;
height = 10
x = 0;
y = 40;
wordWrap = true;
multiline = true
selectable = false
embedFonts = true;
styleSheet = FORMAT_CSS
htmlText = "<p>some text<a herf="www....">link name</a> some more text</p>";
antiAliasType = AntiAliasType.ADVANCED
autoSize = TextFieldAutoSize.LEFT
}
The text jumps?
But when I use:
ActionScript Code:
with(TextField)
{
width = 280;
height = 10
x = 0;
y = 40;
wordWrap = true;
multiline = true
selectable = false
embedFonts = true;
styleSheet = FORMAT_CSS
htmlText = "<p>some text<a herf="www....">link name</a> some more text</p>";
antiAliasType = AntiAliasType.ADVANCED
autoSize = TextFieldAutoSize.CENTER
}
(my <p> formatting = align = "left")
Everything is fine.
Has anyone come accross this problem before, or is it just my text that just likes to dance around the screen?
Thanks
Chris
ActionScript.org Forums > ActionScript Forums Group > ActionScript 3.0
Posted on: 01-29-2009, 05:29 PM
View Complete Forum Thread with Replies
Sponsored Links:
Mixing A For Loop With Text Fileds
Ok this is what I am doing, I am creating a remake of the grand theft auto game when it was on ps1, but I am doing it more on the side missions of grand theft auto 3.
So what I want to do is have a loop which every time you selected a car for the mission you get a lovely message stating what number car you have selected, this is what i have so far
var Text:TextsField
varTexts:Array=newArray(textinfo1,textinfo2,textin fo3,textinfo4,textinfo5,textinfo6)
var textinfo1:Object = {xpos:150, ypos:150};
var textinfo2:Object = {xpos:150, ypos:150};
var textinfo3:Object = {xpos:150, ypos:150};
var textinfo4:Object = {xpos:150, ypos:150};
var textinfo5:Object = {xpos:150, ypos:150};
var textinfo6:Object = {xpos:150, ypos:150};
var NumOfText:Number = 6;
function OutputText(){
for(var i:uint = 0; i <NumOfText; i++){
Text = new TextsField
Text.name = 'text_'+i
Text.x = Texts[i].xpos
Text.y = Texts[i].ypos
Text.text = 'you have chosen car'+i
trace(Text.name)
addChild(Text)
};
};
OutputText()
Help is needed
View Replies !
View Related
HTML Text Formatting
Does anyine know where I can find a complete list of supported <font> tag attributes and or all supported HTML tags for Flash?
I am using F5 and trying to imitate an <li> tag using <font> the problem that I have is that I have no vertical alignment control.
Therefore when I use <font face='Zapf Dingbats' color='#333333' size='4'>l</font> I get a nice bullet point but it sits on the baseline of the other text and just doesn't look right.
Any heros out there?
View Replies !
View Related
Formatting Xml Text With Html
hi. i'm trying to format xml text with html tags. i've searched this forum and read some of the previous threads but still am a bit lost.
here's a variable i create to hold the text i have in a [CDATA] tag:
code:
instructionsText = unescape(stripSpaces(node.firstChild.firstChild.fi rstChild.nodeValue));
then later on i create a text field to put that variable in, i.e.:
code:
// display instructions
ich.createTextField("inst", 998, 0, -10, 520, 40);
inch.inst.renderAsHTML = true;
ich.inst.text = instructionsText;
ich.inst.multiline = true;
ich.inst.wordWrap = true;
ich.inst.selectable = false;
ich.inst.setTextFormat(new TextFormat("Arial", 11, 0));
what am i missing? i thought this was the right way to do it...???
thanks. fumeng.
View Replies !
View Related
HTML Text Formatting...
I have an XML file with this:
<LoginDesc>View your <b>promotions</b>, your total points earned and play games.</LoginDesc>
is there a way to have the Flash textfield understand some HTML formatting?
I thought there was?
View Replies !
View Related
Formatting Text In Html
Hiya guys.
Right this isn't as simple as it sounds I want to create a input text box for people to write in in which they can add html code formatting to the text without having to type in the formatting.
Bit like DreamWeaver (or Word) where they could type in normally and just highlight the required bit of text and hit the bold button.
The people who are going to use this are going to be completely non-computer savvy which is why i do not want any of the formatting code to be visable.
Now I can do it so it the effect works for all of the text using the standard textformat code but I am lost to how to get it to only apply to the highlighted section of text, I've seen it done on a website a couple of years ago (must have been flash 5) so it must be possible but have not seen it recently.
can anyone point me into the correct direction?
cheers
Zen
View Replies !
View Related
Downloadable MP3's In Dynamic Text Fileds' Link?
i'm coming across a problem ... the music on this site should be downloadable by right clicking the links but this doesn't appear to be the case. when i right click an mp3 link i get "open", "open in new window" & "copy link" as options and that's it - not any other options: "save target as", which is the only way i know to actually get music on to my computer from a site.
site .. under "audio files"
http://www.darsombra.com
is there a way to actually download the music?
the links are loaded into a dynamic text field from a text file.. thanks.
View Replies !
View Related
Dynamic Text Fileds || Mac - Safari - Not Rendering
I was curious as to see if anyone knew about the problem with prior versions of (Mac) Safari not rendering dynamic text fields. I know that as a developer I should not be responsible for all of a clients, clients. To have updated versions of Safari, but is there any way around this problem.
The only solution that i could think of is to backdate the compiled version of flash (although i have not done this yet).
View Replies !
View Related
Creating Dynamic Buttons And Text Fileds..
Im having some trouble creating buttons from an xml file ive loaded in...
What i need it to do is create a button (movieclip with a onRollOver funciton) for every item that is in the XML file, ive tried this in the For loop but i cant get it to work..
Also is it possible to duplicate a text field and populate this each time with a field from the xml file as im having some difficulties targeting the name of the duplicate field?! hope that makes sense, ive included my code below...
any ideas?!??
var arrImages:Array = new Array();
var info:Array = new Array();
var link:Array = new Array();
var buttonName:Array = new Array();
var panel:Array = new Array();
var numberLoaded = 0;
var totalNumber = 0;
var IMAGE_PATH = "gallery/";
gallery_xml = new XML();
gallery_xml.ignoreWhite = true;
gallery_xml.onLoad = function(success) {
if (success) {
//trace('homebanner.xml loaded. Contents are: '+this.toString());
createAdvert(gallery_xml);
}
};
gallery_xml.load('homebanner.xml');
// This is the function that will be called when
// our XML document is loaded succesfully
function createAdvert(xmlAd) {
// xmlAd is now a reference to the XML
// object where our information is stored
for (var n = 0; n<xmlAd.firstChild.childNodes.length; n++) {
arrImages[n] = xmlAd.firstChild.childNodes[n].firstChild.firstChild.nodeValue;
//image = xmlAd.firstChild.childNodes[n].firstChild.firstChild.nodeValue;
info[n] = xmlAd.firstChild.childNodes[n].firstChild.nextSibling.firstChild.nodeValue;
link[n] = xmlAd.firstChild.childNodes[n].firstChild.nextSibling.nextSibling.firstChild.nod eValue;
panel[n] = xmlAd.firstChild.childNodes[n].firstChild.nextSibling.nextSibling.nextSibling.fi rstChild.nodeValue + n;
}
for (i=0; i<xmlAd.firstChild.childNodes.length; i++)
{
// load them into the containerMc
containerMc.imgHold.createEmptyMovieClip("imgHold" +i,containerMc.imgHold.getNextHighestDepth());
img_mc = containerMc.imgHold["imgHold"+i];
//load images in from array
img_mc.loadMovie(IMAGE_PATH + arrImages[i]);
//Set images up side by side
containerMc.imgHold["imgHold"+i]._x = containerMc.imgHold["imgHold"+(i-1)]._x + 350;
//Create Cross
containerMc.cross.attachMovie("cross", "cross"+i, containerMc.cross.getNextHighestDepth())
cross_mc = containerMc.cross["cross"+i];
containerMc.cross["cross"+i]._x = containerMc.cross["cross"+(i-1)]._x + 350;;
//Create Panel
containerMc.infoPanel.attachMovie("panel", "panel"+i, containerMc.infoPanel.getNextHighestDepth())
panel_mc = containerMc.infoPanel["panel"+i];
containerMc.infoPanel["panel"+i]._x = containerMc.infoPanel["panel"+(i-1)]._x + 350;
containerMc.infoPanel["panel"+i]._name = "panel" + i;
containerMc.infoPanel.panel[i].title = "test entry";
//trace("panel is " + panel[i] + " info is " + info[i])
//Create border line
containerMc.borderLine.attachMovie("border", "border"+i, containerMc.borderLine.getNextHighestDepth())
border_mc = containerMc.borderLine["border"+i];
containerMc.borderLine["border"+i]._x = containerMc.borderLine["border"+(i-1)]._x + 350;
//Create Button
containerMc.button.attachMovie("button", "button"+i, containerMc.button.getNextHighestDepth())
button_mc = containerMc.button["button"+i];
containerMc.button["button"+i]._x = containerMc.infoPanel["panel"+(i-1)]._x + 350;
trace(containerMc.button["button"+i]._x)
trace("button value is " + button_mc);
containerMc.button["button"+i]._name = "button_press" + i;
trace(button_mc._name);
}
}
View Replies !
View Related
Making Dynamic Selection To Text Fileds
Dynamic text field selections
Here's the dealio,
I am trying to create dynamic selections of textfields. My current ideas for code is this
Quote:
newSel= setInterval(select, 1);
function select() {
Selection.setFocus("txtField");
Selection.setSelection(beginingOfFirstVisibleLine, endOfLastVisibleLine);
}
Does anyone know if there is a predefined properties in MX or MX2004 that will allow me to do this?
View Replies !
View Related
HELP With Dynamic Text & HTML Formatting
I am loading a text file into my flash website and I have formatted the .txt with HTML tags so I can do bold, font color, url's etc...
I have also clicked on the <> button on the textfield properties so Flash can read the formatting.
When I choose to embed all the characters, the only thing that doesn't work is Italics. When I don't embed, it works.
Anybody know a way around this??? Or why it does this?
Any help is appreciated.
View Replies !
View Related
Importing Text / Html Into MX And Formatting?
Hello
I am importing a text file into a text area in flash mx with loadVariable
According to Macromedia flash is not a browser and only supports a limited number of tags. A list of supported tags are here
My problem is that each time I hit enter on the text file, flash treats it like a new paragraph and adds a bullet infront of it too.
Is there anyway to do something similar to <br>, a line break, and any way to get rid of that bullet?
Thanks
ExtraB
View Replies !
View Related
HTML Text Formatting And Colors?
my text is set something like this:
mainText="I wouldl like to make my text red, to increase the impact of the links!<br><br><li><a href='asfunction:runVar,1'><b>I WANT THIS TEXT TO BE RED!</b></a></li>";
Is it possible, I know in the help file COLOR tags are not supported and I have had little success with CSS (I can set the color of the <a> tagged text but the other text seems unaffected by a CSS file!). I am also using a method of resizing the textbox which isn't so easy if mixing CSS with HTML formatting....
Cheers
Neil
View Replies !
View Related
[F8] Html Formatting In Dynamic Text...again
I know this has been covered ad nauseum but reading all the different posts has just spun me around in circles.
Why is it that this:
narratives_txt.html = true;
narratives_txt.htmlText = "<b>This is my BOLD text</b> and this is not.";
Returns:
"and this is not."
And what's the proper way to get it to display?
Thank you!
Layne
View Replies !
View Related
Loading All Text/formatting From HTML
Hey,
I'm considering designing a site, both flash and regular html/css, where the flash movie would read all of the content and formatting from the regular html files. The idea is that updating the html would then update the flash movie, and everything should work pretty easily.
My basic ideas are:
1. Code the html pages using strictly XML compliant code,
2. All text formatting will be via CSS,
3. The Flash movie will then load the .html doc into an XML object which I can then tweak (remove certian tags, make <p> tags work correctly, etc.)
I've already written some basic AS functions for formatting the XML and my prototypes are working fine.
Does anyone who has tried this before have any comments, hints etc.??
Am I just plain crazy to try this ?
View Replies !
View Related
HTML Formatting In A Dynamic Text Box
Can't seem to get this to work. Some formatting works (<a>) but not well. <b> just drops the text all together.
I'm loading my text into a dynamic text box with:
ActionScript Code:
// loadVariables("blogText.txt", "_root.masker.contentText.blogtext");
myData = new LoadVars();
myData.onLoad = function() {
_root.masker.contentText.blogText.htmltext = this.content;
};
myData.load("http://www.rjames.org/blogtext.txt");
The text box has the HTML property turned on.
Any idea what's causing this?
View Replies !
View Related
Html Formatting In A Dynamic Text Box
I have a problem. Can anyone help me please?
On this site, I'm just creating an intro and bio...
http://www.cherylankrah.com
However, the html is not acceting the formatting this is the flash file:
Also, any idea why, maybe for other reasons than flash, I'm getting a text arser message when i open the page...
http://www.thegreenink.net/stuff/siteupdatesign.fla
jan
please help me urgently
View Replies !
View Related
HTML Formatting Dynamic Text
Hi guys
I’ve used one of the tutorials on the site to import text into a dynamic text box
Code:
loadText = new loadVars();
Code:
loadText.load("kirupa.txt");
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.text = this.kirupatext;
};
I’ve got a horizontal scrolling movie that duplicates the clips from the number of results passed to it by another script, and creates buttons with imported images and links with different querystring id data on them. So in actual fact what it does is instead of
loadText.load("kirupa.txt");
It does
loadText.load("http://www.mysite.com/variablespage.php?id=1");
Now this is all works fine apart from 2 things.
A double return in the text result in a massive gap in between the paragraphs? I don’t know where it’s coming from. The
isn’t being converted to <br> or anything like that, does anyone know why the gap is so big?
I thought I might be able to fix it by setting the box to render text as HTML, but it seems to be ignoring any HTML tags.
The other problem is if I type
Code:
<a href=”address.php”>Link</a>
It just shows that and doesn’t make it a hyperlink?
If I change the script to LoadNumVariables and the scroller text box has a variable ie scroller.scroller_text then it shoes the html working fine, but won’t scroll it anymore!!!
Any thoughts appreciated
Regards
Paulsheff
View Replies !
View Related
Html Text Formatting Problems
2 strange things in my textfield:
1) When I load external XML text into my textfield, formatting is fine(justified). BUT when I add <i></i> tags for a quote, the paragraph and the next paragraph get an indent of 5px or so that I CANNOT turn off. Any ideas on how to fix this? -> http://www.wiehen.de/site08/daniela_site01.html go to - artist alina bio
2) The text flow around html <img> images in XML text works fine if the image is small. I would like to have larger images that take up the whole width and I CANNOT get the text to start under the image. If I stretch the image width, I actually get a single letter squished up on the right of the image. I changed the horiz buffer for the images but i always get at least one letter. -> http://www.wiehen.de/site08/daniela_site01.html go to - artist alina diskographie
any ideas would be fab!
thanks - lb
View Replies !
View Related
Formatting Xml Text With Html <tags>
I am calling text from an external .xml file, however I am running into some formatting problems,
every time I wrap a <tag> around the text, the <tag> itself shows up in the game
doesn't anyone have any links or resources I can use, I couldn't find anything out there
View Replies !
View Related
Removing [HTML] Formatting On Text
Is there a way to remove html formatting on imported text into flash?
Before it is displayed is there a way to parse the text and remove all of the <b> and <br>.
For instance:
text:
&myInfo=<b>With the European Championships just a year away, places in the England squad are hot property! If you were Sven who would you be putting into the Squad?</b><br><br>Here at Hy-PRO we are giving away five of our official England signature footballs, which include authentic, printed signatures of the whole England squad. To enter all you have to do is suggest to us which 18 players you think Sven should put into his Squad. This must include at least 2 goalkeepers.</br></br><br><br>The first five entries picked out the hat will win.</br></br>
Cheers,
neb
View Replies !
View Related
XML And CDATA Not Formatting As HTML Text
Last edited by yakken : 2007-12-16 at 20:37.
I have a site that uses XML to load text, pics etc. but I have a problem using the CDATA tag in my XML files and afterwards rendering the text as HTML.
The XML could be
HTML Code:
<?xml version="1.0" encoding="UTF-8"?>
<events>
<event pic="largePicture.png" header="Headline" caption="Subheadline" smallpic="thumbnail.png">
<description>
<![CDATA[<b>I would like to use HTML here</b><br>Next line!]]>
</description>
</event>
</events>
Loading the XML works fine and I have everything saved in arrays (the text I need here, would be in the "descriptions" array - see below), that I can access, but when I try to throw my the <description> content into a textbox, it displays everything as it is typed above - including the tags etc. I would be setting up the text like this (taken out of context and boiled down a bit to make it easy on the eye):
ActionScript Code:
//this is the i'th element that I am loading
["mc_text"+i].descrip.html=true;
["mc_text"+i].descrip.multiline = true;
["mc_text"+i].descrip.autoSize = true;
["mc_text"+i].descrip.htmlText= descriptions[i];
where the "decrip" text field would be the one containing my text.
It does, however, not format my text as HTML (the autosize attribute works though). A direct link to one of the subpages, not showing my text properly is here: http://www.vanity.dk/oceanclub/test.swf
Pres the last button on the right...
Help is appreciated!
I can see that this guy seems to have the same troubles as I:
HTML Links in xml.
but none of the suggestions in that thread seems to do the trick
View Replies !
View Related
HTML Formatting In Dynamic Text
Hello all,
can someone please advise...I created a dynamic text field which calls up an external text file and the text field scrolls once the text has been loaded, the problem however is that it will not display the html links within the txt document.
when i get it to properly display the html links it no longer scrolls.
does anyone know a very simple way to achieve scrolling dynamic text with html formatting?
here is the code on frame:
loadVariablesNum("natan.txt", loadTxt);
natan.txt is the text file and loadTxt is the dynamic textfield
here is the text from the text file:
text=<a href="http://www.fudge.com" target="_blank">fudge</a>
and the var in the txtfield = text
what am I doing wrong?
thanks in advance
View Replies !
View Related
Importing HTML File & Formatting Into A Dyn. Text Box
I've got a company that wants a Flash site, but wants to be able to update the text on their site all the time. I know how to import a *.TXT file by referencing the dynamic text box with a "variable=" at the beginning of the *.TXT file and using the A.S. <loadVariables ("textfile.txt", varText);> to load the *.TXT file. But all the paragraph breaks are double-spaced! See... http://www.rejuvesite.com/derisco/main.html
But, in the dynamic text box panel, there's that HTML checkbox. That sounds like what I want to use but I can't reference the textbox to an *.HTML file! <loadVariables ("htmlfile.html", varText);> returns nothing. And, if I copy all the HTML code into a *.TXT file, it'll work, but the formatting's not there and the lines are all double-spaced again! Grrrr!
All I want is to be able to let these guys make an HTML file in Dreamweaver (or whatever they use) and use Bold and HREFs and stuff and save it. Then, a dynamic textbox'll read whatever they made.
I'd really appreciate a helping hand with this if anyone could spare a brain cell or two. Thx.
View Replies !
View Related
Dynamic Scroll Text Box With Html Formatting
I found this code in a tutorial i downloaded of the FK website (Dynamic_-Greg_Mey-1492) Its a Dynamic text box scroll script. The text is loaded from an external .txt doc. The original txt had no formatting. I need bold, returns <br> etc.
OK, i know about the HTML formatting in flash(<br> etc)! The problem is that when this is active and the viewer drags the slide bar down and lets go the slider reverts the original position. I’m not that familiar with dynamic scripting so I thought that you could have a look and see it there’s anything odd about the code. Thanks
//-----------------------------------------
//-----------------------------------------
scrollboxtop = _root.scrollbar.scrollbox._y;
scrollboxbottom = _root.scrollbar.scrollbox._y + (_root.scrollbar.scrollbox._height) ;
if (textbox.Message.scroll=1) {
if (scrollboxmove >0) {
scrollboxmove = 0;
}
_root.scrollbar.scrollbox._y = -68;
} else if (scrollboxbottom - scrollboxmove > 70) {
if (scrollboxmove <0) {
scrollboxmove = 0;
}
_root.scrollbar.scrollbox._y = 70 - _root.scrollbar.scrollbox._height;
scrollboxmove = 0;
} else {
_root.textbox.Message.scroll = _root.textbox.Message.scroll + scrollboxmove;
}
//-----------------------------------------------
//-----------------------------------------------
View Replies !
View Related
HTML Text Formatting In Flash 5 - FRAMES
Hi
I have a htmnl page with 2 frames, top and bottom. The top frame has a "Flash 5 news ticker" type thing which is updated with imported html formatted txt files. These files have html links which should open in the bottom frame - but instead open in a new window :•(
Please.......Whats Happening........
I have already looked at the macromedia site - but they don't seem to know - so I thought one of you might know if there is a way round this.
Thanks in Advance
Tizer
View Replies !
View Related
No Html Formatting For My Dynamic Text File
I have a .txt file that is outside my swf and loaded dynamically using a variable name. All is up and running and works fine. The only problem is that when I try to enable HTML formatting in the properties inspector, I can't see my imported text (meaning it's not recognized), when I turn of the HTML option, it's back again.
What am I doing wrong? I know HTML, I know Flash, but I just can't figure out why I can use the simple tags that Flash supports.
HELP!!!
View Replies !
View Related
Dynamic Text, HTML Formatting AND Javascript?
im building a site with a page of links that the owner will be updating and adding to. ive managed to get the HTML formatting part down but is there a way to make the links pop open a new window instead of just replacing the existing page. i was using a "click here" button before that opened a new window and got the link dynamically but now they want to have an unlimited number of links so im putting the whole thing in a scroller so it can just continue. any idea of how to get the pop ups happening from the HTML formatted text?
gracias
View Replies !
View Related
HTML Formatting & Dynamic Text Fields
I’m sure this is a no-brainer, but I can’t see the wood for the trees right now. I’m pulling in some text from an external txt and dumping it into a HTML enabled, multi-line dynamic text field.
I’ve embedded the font’s I require and that doesn’t appear to be the problem.
The text in the txt runs as follows...
&bodyText=<*font size="16" face="HelveticaNeue Condensed" color="#FF6600"><*b><*i>Sub Head text<*/b><*/i><*/font>
<*font size="12" face="Helvetica 55 Roman" color="#666666">Body Text<*/font>&
(added * above to prevent HTML parsing)
Now, no matter what I do, I can’t get anything passed the end of the first <*/font> tag to display. So in the case of the above, all I get is a correctly formatted…
Sub Head text
...and that’s it. Nothing else.
Any suggestions you could make would be most gratefully received.
Thank you kindly.
View Replies !
View Related
Variable With Html Formatting From Text File
I have imported a variable form a textfile using loadVariables.
All works well.
I have
variable1=this is the text in variable1
in the text file.
Now I want to add some html formatting- but it doesnt show up.
Regadrless of whtehr I have the html tab depressed or not having:
variable1=this is the text in variable one <b>this is bold</b> and <a href="">this is a link</a>
displays the html tags within the brackets as text and does not show any html formatting.
The flahs support pages suggest it is possible to html format text within text files [see bottom of page <a href="http://www.macromedia.com/support/flash/ts/documents/htmltext.htm" target="new">http://www.macromedia.com/support/flash/ts/documents/htmltext.htm</a>] but nothing i have tried works.
any ideas?
View Replies !
View Related
Problem With Formatting Html In Dynamic Text
could someone please show me how to properly format html that load into a dynamic text field. My problem occurs when I try to make a href link that is a different color than the body. Are there any good references out there.
example:
10.16.03
Please go to my new website at www.thebarnburner.com. I'm sure you will enjoy it.
I want the 10.16.03 in bold.
The link needs to have the href and be in a different color, say red.
View Replies !
View Related
HTML Formatting Of Dynamic, AS Loaded Text
Hi guys,
Is there a way to format text loaded into a dynamic text box using
code: textbox1.text = "some text"
I want to dynamically load some hyperlinks into a dynamic textbox using the above code, i.e
code:
textbox1.text ="<a href = http://www.somesite.com> Link 1 </a>"
(cant remeber if that's syntactically correct, off the top of my head)
However, this doesnt recognises the <a href> tags and just displays them as part of the text.
Can anyone offer some help?
View Replies !
View Related
HTML Dynamic Text Formatting Errors
I've read every thread on nearly every forum about this, but it doesn't seem to want to work with me. I am trying to format my external .txt file with html. For example, <b>welcome</b> or <i>welcome</i>
To load the text
Code:
loadText = new loadVars();
loadText.load("text1.txt");
loadText.onLoad = function(success) {
if (success) {
// trace(success);
preloadMC.unloadMovie();
main.myText.html = true;
main.myText.htmlText = this.myNews;
}else{
preloadMC._visible = true;
}
}
The instance name of "main" being the movieclip that has the dynamic text contained within it.
And yes, the dynamic text has the render as html button selected.
And in a .txt file i have myNews = etc, etc, text goes here.
Thank you all very much for any responses.
View Replies !
View Related
HTML Formatting Incorrectly In Dynamic Text Box
So I'm still working on the CMS with Flash site and have encountered another thing that puzzles me.
I'm reading a .PHP page from my server and loading it into Flash and it returns HTML - and luckily not the .PHP script code - to Flash - so that's great.
Except for that it totally ignores the html and shows stuff like %22%3E%09%0D%0A%09%09%09%0D%0A%09% rather than follow <BR> points and spaces and punctuation and what not.
What I'm doing is:
Code:
var menulunch:LoadVars = new LoadVars();
menulunch.load("content.php");
menulunch.onLoad = function(success:Boolean) {
if (success) {
contentveld.htmlText = this;
} else {
trace("could not load text.");
}
};
What am I missing this time ?
View Replies !
View Related
Input Text + HTML Formatting Problem
Okay so here's where I'm at. I've created a contact form in flash that allows you to type in Name/Email/Subject/Message and then send it to the website's email address. It works fine and sends the email and everything, but when the email arrives it's full of messy HTML script.
I'm assuming this has something to do with the input fields in my flash. However I can't fix it and I don't really know what's wrong.
Can someone help me out?
Thanks,
Example Email that I'm receiving :
Code:
E-mail from website.
Reply-To: <TEXTFORMAT LEADING="2"><P ALIGN="CENTER"><FONT FACE="_sans" SIZE="14" COLOR="#000000" LETTERSPACING="0" KERNING="0">test@test</FONT></P></TEXTFORMAT>
E-mail from contact page.
Name: <TEXTFORMAT LEADING="2"><P ALIGN="CENTER"><FONT FACE="_sans" SIZE="14" COLOR="#000000" LETTERSPACING="0" KERNING="0">test</FONT></P></TEXTFORMAT>
E-mail: <TEXTFORMAT LEADING="2"><P ALIGN="CENTER"><FONT FACE="_sans" SIZE="14" COLOR="#000000" LETTERSPACING="0" KERNING="0">test@test</FONT></P></TEXTFORMAT>
Subject: <TEXTFORMAT LEADING="2"><P ALIGN="CENTER"><FONT FACE="_sans" SIZE="14" COLOR="#000000" LETTERSPACING="0" KERNING="0">test</FONT></P></TEXTFORMAT>
Message: <TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="14" COLOR="#000000" LETTERSPACING="0" KERNING="0"></FONT></P></TEXTFORMAT><TEXTFORMAT LEADING="2"><P ALIGN="LEFT"><FONT FACE="_sans" SIZE="14" COLOR="#000000" LETTERSPACING="0" KERNING="0">testestset</FONT></P></TEXTFORMAT>
View Replies !
View Related
[F8] Input Text Field Without HTML Formatting?
Hi gang, got a problem that's likely extremely simple but is driving me round the bend.
I have an Input Text field. The var assigned to it is "newword". The user types in a new word, which is assigned to newword, then my movie runs off and does all it has to do with the word.
However, when I trace(newword), it's tossing on a bunch of HTML code around it that I don't want. So what should be "hello" becomes: "<TEXTFORMAT LEADING="2" Blah dee blah>hello<Bunch of other formatting></TEXTFORMAT>".
How do I get it to just input the text?
I'm in Flash 8, and the "Render text as HTML" button on the properties bar has no effect.
Thanks,
-k.
View Replies !
View Related
HTML Formatting Not Working In Text Field.
I have a progromatically created text field.
html set to true.
the basic formatting - such as <p>, <h1> etc, don't render.
Am I missing something?
var nWidth:Number = mcDisplayBackground._width;
var nHeight:Number = mcDisplayBackground._height;
var nX:Number = mcDisplayBackground._x;
var nY:Number = mcDisplayBackground._y;
var nInterval:Number;
this.createTextField("tContent", this.getNextHighestDepth(), nX,nY,nWidth,nHeight);
tContent.html = true;
tContent.multiline = true;
tContent.wordWrap = true;
tContent.condenseWhite = true;
var lvArticleContent:LoadVars = new LoadVars();
lvArticleContent.onData = function(sHTMLData:String):Void {
tContent.htmlText = sHTMLData;
};
var cssStyles:TextField.StyleSheet = new TextField.StyleSheet();
cssStyles.onLoad = function():Void {
tContent.styleSheet = this;
lvArticleContent.load("flashContent.html");
};
cssStyles.load("presentation.css");
View Replies !
View Related
Formatting A Dynamic Text Box To Take HTML Coding?
Does anyone have an idea of how to do this
Does anyone know??
Here is the AS i used for my external text loading:
myData = new LoadVars();
myData.onLoad = function() {
Home_Text.text = this.hometext;
};
myData.load("hometext.txt");
Anyways of altering that AS code to accept HTML rendering?
Thanks
Abstuce - Hard 2 Understand
View Replies !
View Related
HTML Link In XML Throwing Off Text Formatting
I have this text below in my xml file:
Code:
<page name="contact">Postimpressions Incorporated
1400 Maryland Avenue
Wilmington, Delaware 19805
[ p ] 302.656.2271
[ f ] 302.656.0628
[ e ] <a href="mailto:postimpressions@verizon.net">postimpressions@verizon.net</a></page>
And then when I publish, the text in my swf shows up like this (first line gets bumped down 1 and indented, email link gets bumped down and indented):
Code:
Postimpressions Incorporated
1400 Maryland Avenue
Wilmington, Delaware 19805
[ p ] 302.656.2271
[ f ] 302.656.0628
[ e ]
postimpressions@verizon.net
When I pull the HTML link out, that formatting issue goes away. Anyone know why it would be causing that problem?
This is my code for parsing the xml in flash:
ActionScript Code:
function loadXML(event:Event):void {
xml=new XML(event.target.data);
parseXML(xml);
}
function parseXML(xmlHandle:XML):void {
var pageList:XMLList=xmlHandle.page;
for (var i:Number=0; i < pageList.length(); i++) {
var pageElement:XML=pageList[i];
pages[i]=pageElement;
}
}
View Replies !
View Related
HTML Formatting In Text Fields .... AHHHHG
There has got to be a better way then what I'm doing.
I want to let a user update a portion of their Flash page by using LoadVar and loading from a file the HTML text that is placed into a Text Field.
Problem is that I don't want the user to have to learn HTML formatting or for me to have to do it because its a pain...you know where.
I can type:
htmlText_txt.htmlText ="<P ALIGN="CENTER"><FONT FACE="Times New Roman" SIZE = "24" COLOR="#FF0000"><B>P.O. Box 170 Sheridan, Michigan U.S.A.<B><FONT><P>"
but to do this for each line is a pain...you know where for me or impossible for the person whos site I'm doing.
This then has to be converted to URL Encoding before loaded using LoadVar.
Is there a tool out there to make this ease for us people that don't want to waste the night away just to type in 10 lines in HTML formatting?
Please...LOL. This would be valuable to the user if I could find a easier way.
Thanks in advance and PEACE
View Replies !
View Related
External Text Source Html Formatting
A movieclip with a textbox in it is loading text from a php script using:
Movie_mc.loadVariables("script.php", this, "GET");
The text the php script echos back has basic, supported HTML tags in it. Flash will either show the text with the tags as if it were normal text, or it will not show the text at all.
Using:
"text_txt.html = true;" and "text_txt.htmltext" does not work.
Selecting 'Render text as HTML' for the textbox makes no text appear at all.
When the font is not embedded, the text does not display.
When the font is embedded, the text shows up with the tags visible.
Does anyone know another method that should work?
View Replies !
View Related
HTML Formatting Not Showing Up In Dynamic Text
I have a dynamic text box with this code associated with it:
Code:
aText.htmlText = "";
aText.htmlText += "<b><a href = " + aRSSLinks[i] + ">";
aText.htmlText += aRSSTitles[i] + "</a></b><br />";
aText.htmlText += aRSSDescriptions[i] + "<br />";
The text comes up, but is not formatted as bold or linked. When I trace(aText.htmlText); there are a bunch of random <TEXTFORMAT>, <P>, and <FONT> tags, but not the <b>,<a>, and <br> tags.
Any ideas? Thanks.
View Replies !
View Related
External Text Source Html Formatting
A movieclip with a textbox in it is loading text from a php script using:
Movie_mc.loadVariables("script.php", this, "GET");
The text the php script echos back has basic, supported HTML tags in it. Flash will either show the text with the tags as if it were normal text, or it will not show the text at all.
Using:
"text_txt.html = true;" and "text_txt.htmltext" does not work.
Selecting 'Render text as HTML' for the textbox makes no text appear at all.
When the font is not embedded, the text does not display.
When the font is embedded, the text shows up with the tags visible.
Does anyone know another method that should work?
View Replies !
View Related
Html Formatting Of Text Files In Flash: Help Appreciated
Hello,
I'd like to know a bit more about the 'undocumented' asfunction. I know about the use of external text files which are html formatted to (for example) load an .swf on a defined level with the asfunction.
I want to know if it's possible to use html code in the style of : visited links, hover, active link, rollover.... Because I want to make that textfield a dynamic menu. That dynamic menu works (it loads the movieclips on the correct level if i click parts of the text, but I can't seem to find a way to let the user know what exactly he selected in the textfield, the only thing that happens is the cursor turning into a hand. Question: is it possible to make use of a textcolorchange or something when users hover the links?
Help would be greatly appreciated....
Thanks in advance.
_242
View Replies !
View Related
Dynamic Text Fields, .txt Files And Html Formatting
Basically like the title says, I have my dynamic fields loading external text files. I have the html formatting working, the basic bold, italics, and stuff.
Basically I am designing a site that will be updated by the customer, but with bad experiences from previous clients they screwed things up a lot and I'd have to go in and fix it. I want to create a site that can easily be updated with text files that they can put whatever they want...
A question though, with html formatting, is there a way to include <a href></a> tags so they can put in their own links? Or is this strictly for text formatting.
Any help would be gladly appreciated
View Replies !
View Related
Adding Html Formatting To External Text Field
Hi, apologies if you read this post in my previous entry, i should have started it as a new topic..
I've got a dynamic textfield calling an external text file from the server OK, but I want to add a bit of formatting e.g. bolding the titles. I've read a few posts on this, but am getting a headache working out what I change in my code! Or do I change something in the external file itself?
The textfield is called load_txt (the var: my_lv)
The action applies to the layer is:
my_lv = new LoadVars();
my_lv.load("http://www.europahost.net/nrg/load_txt.txt");
my_lv.onLoad = function(success) {
if (success) {
load_txt.htmlText = this.load_txt;
trace("loaded");
} else {
trace("not loaded");
}
};
Thanks in adv
andy
View Replies !
View Related
[F8] Apply HTML Formatting To Dynamic Text Sourced From XML
Hi, I would have though that this would be a simple procedure but can't find any info that makes sense..
How do I format my dynamic text pulled from an xml source?
i.e. I wish to apply HTML formatting to my XML doc including <b>, <br> etc.
However, when I apply these tags the doc just fails to load into my dynamic text box. I've tried checking render text as HTML but that hasn't worked..
Where am I going wrong? This has to be an easy one..
Thanks,
DigiPencil
View Replies !
View Related
Input Text Field- How To Prevent HTML Formatting
Hi
I am trying to create an input text field which does not insert HTML formatting to whatever the viewer types in it. For example, if the viewer puts the text "hello" into the text box, the value of the box should not be
<p align="left"><font face="Times" size="18" color="#000000" letterSpacing="0.000000" kerning="1">hello</font></p>
but just "hello"
I have unchecked that "allow html formatting" button on the properties bar
but it still inserts those tags. What am I doing wrong?
in the attached example, you should see the problem demonstrated - if you click on the button, it traces the value of the input text box. I would like that to be simply "hello" without all the html tags.
Thanks!
View Replies !
View Related
Dynamic Text Field Ignoring HTML Formatting
Hello,
I have a dynamic text field set to multiline and render as html, but when I assign any text to it which contains simple HTML formatting like <b>boo</b>, Flash Player 9 simply ignores any text between the tags. eg <b>boo</b> doesn't display at all !!!
The text field has both an instance and variable name and I get the same results from both.
If I trace the variable I can see the <b>boo</b> but I can't get it to display.
If I uncheck the render as html option, it displays <b>boo</b> ... obvioulsy unrendered.
I'm obviously missing something simple ... please put me out of my misery.
Thank you.
View Replies !
View Related
|