ActionScript 3.0 :: Timed Text Style Tags Not Working?

Jun 16, 2010

Using an FLV playback component, I am reading subtitles into a dynamic text box. I'm essentially using the same XML code seen here:URL]..Only problem is, the style tags aren't working for me.  They do nothing, and the font style options selected on the stage in the FLA seem to override any style tags.
 
I'm wondering - does the text box need to be created in Action Script (as opposed to on the stage)? [FYI, I just tried this, this did not seem to work either].  What else could it be?
 
(Note that I can achieve styling through using CDATA tags, which makes matters more confusing to me.  I'd prefer to use the timed text ones if they can work, as they are a little better for readability).

View 2 Replies


Similar Posts:


ActionScript 3.0 :: Importing Html With <strong> Tags And Using CSS To Style Text

Jan 6, 2010

I'm importing html with <strong> tags and using CSS to style my text however everything it runs into a closing </strong> tag it adds a line break for some odd reason and i was wondering if anyone knows a way to fix this?

View 1 Replies

Regex :: Using Regular Expression And TextFormat To Style Text Between HTML Tags?

Mar 1, 2012

I've been struggling with this problem for a while:I have a string containing HTML and I'm using a regular expression to get the characters between the tags. I'm then attempting to apply a TextFormat to those characters.The problem is that I'm using the TextField's "htmlText" property instead of it's "text" property (because I don't want the HTML tags to be visible). So, the character index that's returned from the regular expression is incorrect, when I apply the TextFormat.Here is some sample code which illustrates the problem:

var txt:String = "<b>Sample</b> string with bold text";
var tf:TextField = new TextField();
addChild(tf);

[code].....

View 2 Replies

HTML Tags Not Working In Dynamic Text Box?

Oct 30, 2009

My HTML tags are not working in a dynamic text box. Im guessing it is cause of the scrolling and maybe it dosn't see <br> so it dosn't allow them. This is the code i am using below.

TextField.prototype.maxviewable = function(){
if(this.maxscroll>1) return this.bottomScroll;
var b = (this.html) ? this.bottomScroll-1 : this.bottomScroll;
if (!this.length) this.text = ">>";

[Code].....

View 1 Replies

ActionScript 3.0 :: Multiline Html Tags Not Working On XML Loaded Text?

Jul 25, 2010

I have a dynamic textfield on the stage which is rendered for HTML. Then I load the xml text in it, but the CDATA html tags are not working(it works on singleline, but not on multiline)

I tried setting wordWrap/html etc to true but nothing seem to work.

View 9 Replies

ActionScript 2.0 :: XML Cadata HTML Tags Not Working Dynamic Text Box?

Apr 11, 2011

i am making an flash histroy the desc text shoud be accept the cadata Structures i tried to make this , i dont know where i am missing . i am getting the desc text in ( "filed") inside an mc called " nod" i am loading this mc from library plese check my code

stop();
left.useHandCursor = 0;
var gata:Boolean = true;

[code].....

View 1 Replies

ActionScript 2.0 :: Make A Variable And Put It Between The Style Tags

Jul 24, 2008

simple code here, works just fine.

Code:
var myStyles:TextField.StyleSheet = new TextField.StyleSheet();
myStyles.setStyle("p", {color:'#808080'});
myStyles.setStyle("h1", {color:'#84ABDB'});

[code]....

Here is my problem - want to make a variable and put it between the style tags.

For instance:

Code:
var blah:String = "Hello there";
my_txt.htmlText = "<p>blah</p>";

Without it just writing "blah" I need it to get the string from the variable.

View 1 Replies

ActionScript 2.0 :: Use Multiple Anchor Tags Each Having Unique 'hower' Style?

Feb 19, 2009

Can I use stylesheets with pseudo classes? Basically I want to use multiple anchor tags each having unique 'hower' style.

Code:

a.blog:link, a.blog:visited {
font-style:italic;
color:#6969A5;

[code]....

I know to use Textfield.Stylesheet class in flash, but will it really work the way it works in a normal html page with multiple anchor styles?

View 6 Replies

ActionScript 3.0 :: ComboBox Style: Can't Style Text

Oct 23, 2009

I've got a comboBox component on the stage, instance name 'combo'. I want to style the text. I followed the adobe instructions, but they seem not work, and I get no errors.

Code:
import fl.data.DataProvider;
import flash.text.TextFormat;
var tf:TextFormat = new TextFormat();

[code].....

View 2 Replies

ActionScript 3.0 :: Display:none Not Working On Image Tags?

Jan 6, 2010

I have a TextField that has been populated with html text, which includes images using the <img> tag. I don't want to display these images to the user, however when I apply a StyleSheet with the img tag having the display property set to none, it doesn't appear to work.

img {display:none;}

View 1 Replies

ActionScript 3.0 :: Flash HTML Tags Not Working Well

May 2, 2011

I'm experiencing problems with HTML tags within textfields (multiline textfields). HTML rendering is activated. Fonts are embedded for bold and regular Verdana. In AS3 I also have declared the field as html (instancename.htmlText = "tekst".Now I have all my html code in a sql database which load through php. The whole text loads including the bold, underlined and italic htmltext make up.The problem is that the text on line 1 shows as:"8: you must click ok" (<b>8:</b> you must click ok<br>)But the text on line 2 shows as:" : submitting" (<b>9:</b> thanks for submitting <br>)I have checked the html tags over and over and there is no fault in that.

View 3 Replies

ActionScript 3.0 :: HTML Tags Not Working When Embedding Font?

Jul 26, 2010

I've got a dynamic textfield(inside a movieclip) in my project that loads XML text which includes HTML tags like bold.

It works great but when I embed the font in flash using the properties panel the HTML tags no longer work, how can I fix that?

View 4 Replies

Actionscript 3 :: Inject HTML Tags In An MX:Text Control With A Bound Text Value That Renders Properly?

Jun 29, 2011

i am working in a flex application, i have an mx text control or I can use whatever control I need to do display the text value, but what I am trying to accomplish is to be able to format that text value with html 'before' it gets bound to the text control.<mx:Text text="{data.combinedCriteria}" width="99%">In the .as file that manipulates the combinedCriteria property of data,

View 1 Replies

Flex :: Datagrid HeaderColor Style Is Not Working

Jun 16, 2010

I am trying to change the datagrid header color by editing headerColor style. I could change the font size, font family...etc except the headerColor. My code

[Code]....

View 4 Replies

Flex :: FillColors Style Seems Not Working For Button?

Jun 14, 2011

I use mx.controls.Button control and I'm trying to change its colors:

import mx.controls.Button;
//...
var myButton:Button = new Button();
myButton.width = 70;

[Code]....

and it doesn't work. However cornerRadius style and many others work well.
How do I change colors of the button?

How do I setup color for a button?

View 1 Replies

Css :: Flex Style Not Working In A Trival Case

Jun 15, 2009

I must be making a simple mistake (new to Flex). Here is main.mxml:

[Code]...

The Canvas renders fine in design mode (a nice deep blue) but when I run the application (either in the browser or in the Flash Player) the frame is red (the color from the Application tag). If I specify the color for the Canvas directly, instead of through the styleName, it works as expected (blue canvas at runtime). I'm using FlexBuilder3, and would much rather put colors in a .css file than on every Flex element Additional problem description ... has nothing to do with an external .css file. Even if I declare the CSS styles within the main.xml file, it still looks fine in Design mode and wrong when it runs. I am completely stymied.

[Code]....

View 2 Replies

ActionScript 3.0 :: Converting HTML Tags To XML Well-Formed Tags?

Sep 10, 2009

I have HTML file, I changed its extension to .XML.I'd like to convert HTML tags to valid XML document using AS3.

View 6 Replies

ActionScript 3.0 :: Using A Rich Text Editor To Style A Flash Text Field?

Oct 6, 2010

I've been trying to build a user interface that would allow someone to change the content of a dynamic field (loaded from a text file) using a rich text editor. However the editor inserts inline css style tags like <span style="text-decoration: underline;"> which Flash aparently can't understand. If the editor were instead to insert the following: <span class="ul"> where the stylesheet defined it as:

[Code]...

View 1 Replies

ActionScript 3.0 :: Converting Style Code From Classic Text To TLF Text?

Jan 10, 2011

I've got a project that currently uses classic dynamic text fields that pull in information from an XML file. The text contains a 'keyword' that's referenced in the XML, that can be situated anywhere in the complete sentence. This keyword needs to be a different colour and font size... but as I said, it can appear anywhere.

Currently this works by getting the keyword from the XML, finding its length, finding the index of where it starts, splicing the main string, and then setting TextFormat to the number of chars in keyword, which changes the font size and colour for just that keyword in the sentence.

This works great for the classic dynamic text boxes. It doesn't however work with TLF text, it just applies the new format to the entire text field. I don't have any experience with TLF text as I've just upgraded to CS5 and now need to make this work in Hebrew.The code snippet for the keyword colour change looks like this:Where screen01Norm & screen01Key are things pulled from XML & screen_01.txt_box_combined is the text field.

var newFormat:TextFormat = new TextFormat();
newFormat.color = 0x319aca;
newFormat.size = 50;

[code]....

View 1 Replies

Actionscript 3 :: Get Tags From Text?

Mar 19, 2012

How to trace out the tags with the hash (#Example #FOO #hello_world #foo-bar #2012) at the end of the text but not the ones within the text? [URL]...

View 3 Replies

ActionScript 3.0 :: How To Get Text Out Of Content Tags In XML

Mar 29, 2009

I'm trying to get the text out of the content tags in the XML here. I have everything inside and including the feed tags stored in a variable, and it's working correctly. But when I try to make an XMLList for the entries, nothing transfers in.

View 1 Replies

ActionScript 2.0 :: XML Loaded Text HTML Tags?

Aug 21, 2009

I'm loading some info from an XML document. In the custom tags in the XML doc is text, this text gets loaded into flash and then populates a text field (so different XML elements being referenced, and then amalgamated into one text field)So I have...

Code:
_root.care.htmlText = "<b>Fabric</b><br />"+nFabric[0]+"<br /><br /><b>Features</b><br />"+nFeatures1[0]+"<br />"+nFeatures2[0]+"<br />"+nFeatures3[0]+"<br /><br /><b>Care

[code].....

View 2 Replies

ActionScript 3.0 :: External Text File And Tags?

Sep 30, 2008

I made a scrollbar in action script §3 all from scratch and loaded an external text file edited in text Wrangler to display in the field, and sudden all my HTMl tags are not responding though added htmText to it. Well, the only tag responding is the link tag, the rest no, like bold, or italic or colors.

View 1 Replies

ActionScript 3.0 :: Removing Html Tags From RSS/XML Text?

Nov 7, 2008

I have managed to get rid of unwanted line breaks and returns in the RSS text I am bringing in to populate my dynamic text fields. The Dynamic Text fields are set up not to render text as html, are multiline and have the fonts embedded. I keep seeing things like, <p style=""> at the beginning of the story or <THI.TO> in the middle of the story. Is there any way of deleting anything that appears as <anything> and replace with a space? Here is the code I am currently using to eliminate the line breaks. Also is there any way of turning hyphenation on?

View 2 Replies

Actionscript 3 :: Find All Hash Tags Within A Text?

Jun 2, 2011

I need to find all hash tags in this text using ActionScript 3 (AS3):

Lorem ipsum dolor #sit_amet, consetetur
sadipscing, sed #diam-nonumy
eirmod tempor #invidunt ut labore #et

What's a good method to do this?

View 3 Replies

Xml Imported Text - Separating Tags And Timer

Jan 12, 2009

i have an xml file .... i have imported it into flash mx 2004, tutorial i have even applied css properties to it ( i know thats prop easy for most of you guys but im happy ) my question is this ... i would like to rotate messages on some kind of timer ... ie xml file - ( im guessing at this point cos its worked so far ... )

<message>
<caption1>this is caption 1</caption1>
<caption2>this is caption 2</caption2>
<caption3>this is caption 3</caption3>
</message>

flash action script ... what i would like to achieve... the flash file to import the xml file into a dynamic text box which i have done, but at the moment it is showing all the captions in one go .. i would like to show.. caption1 .... wait X amount of time ( a variable in seconds ? - how would i do that ? ) a motion tween to get rid of the message ( not sure what yet but i understand the basic principles so will experiment and be creative ) caption2 .... etc.

View 5 Replies

ActionScript 2.0 :: <p> Tags In Text Fields Set To HTML?

Mar 4, 2003

We have invalid characters in text fields ie: <p> tags, when loading data from a local object (even though the text field is set to render as HTML) ?

Questions:

1) has anyone encountered this before?

2) know of a work around?

3) find/replace script we can run through the local object to replace the any <p> tags arising?

View 2 Replies

ActionScript 2.0 :: Dynamic Text And HTML Tags?

Aug 18, 2003

I am loading some text into a dynamic text field from an external text file using the methods described on kirupa's tutorials. I want to be able to bold some text, and make some other text links, using html...

I thought it might work if I just added the html tags to the text file, and the chose to render the dynamic text field as html..but the tags don't do anything, and are still read in as normal text.

View 1 Replies

ActionScript 2.0 :: Text From XML With HTML Tags Not Displayed?

May 12, 2009

there is a menu, and when i press a btn, it attaches a movieclip with some textfield in there. the text reads the xml tags, but doens show the css styles.i got this so far:

[AS]
//attach text holder
var Textos:MovieClip = RaizMC.attachMovie("holder Textos", "conteudos_mc", RaizMC.getNextHighestDepth())
//init TextArea
Textos.texto_txt.html = true;

[code]....

the css file is good, xml loaded correctely, everything seams ok, exept for my textfield. it simply doesnt read the <spam class"someStyle"></spam> i also did the <![CDATA[ ]] on the xml.

View 2 Replies

ActionScript 3.0 :: Load Text From An Xml File With Some Html Tags?

Apr 7, 2009

I'm trying to load text from an xml file with some html tags in it but its not working.

When I add <br/>

I get this error

Code:
TypeError: Error #1095: XML parser failure: Unterminated attribute.
at ProfileSammy/::xmlLoaded()
at

[Code].....

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved