FORUMS: list search recent posts

3d carousel tutorial question

COW Forums : Adobe Flash

<< PREVIOUS   •   FAQ   •   VIEW ALL   •   PRINT   •   NEXT >>
3d carousel tutorial question
on Sep 18, 2007 at 7:12:42 pm

I had a question for anyone familiar with Lee Brimlow's flash tutorial on 3d carousels( I'm trying to figure out a way to format the dynamic text that is read in from the xml document. For example making a bold header or a different color and font size, or inserting paragraph breaks.

Any ideas?


Return to posts index

Sher Ali
Re: 3d carousel tutorial question
on Sep 18, 2007 at 10:48:12 pm

You can use only those html tags which are supported by flash. You also set the dynamic text field's text first setting its html property to true and then assign the text using its htmlText property.

You can use external css file to define rules for html tags. Following is a sample code, which I use in almost all of my projects.

import TextField.StyleSheet;
var flash_css:StyleSheet = new StyleSheet();
flash_css.onLoad = function(success:Boolean) {
if (success) {
//When the style css file is loaded succefully then do nothing
//as it will be used later when required
//trace("Styles loaded:");
} else {
//in case of error show a trace message
trace("Error loading CSS");
//load css file

once the stylesheet is loaded and suppose you have a text field myDescriptionText which has some text along with html tags then apply the newly loaded stylesheet as:

myDescriptionText.html = true;
myDescriptionText.htmlText = "This is a bold text";
myDescriptionText.styleSheet = flash_css;

Sher Ali

Return to posts index

<< PREVIOUS   •   VIEW ALL   •   PRINT   •   NEXT >>
© 2018 All Rights Reserved