Problem with component scrollbar

Hey.
I just tried out this tutorial and it works fine.
http://www.kirupa.com/developer/mx/dynamic_scroller.htm

But instead of a txt file i want to load an php file with some html tags inside - this php file works the way it is suppose to.

My problem occurs when trying to use to above tutorial with my php file - html tags are ignored… Anybody have a solution?

Thats because Flash doesn’t support very many HTML tags, and you have to HTML enable your textbox and such…

You also need to replace .text with .htmlText to tell the textbox to render the HTML that it is able to.

scroller.html = true;
scroller.htmlText = this.kirupatext

To see the HTML tags you can use, check this out…

http://www.macromedia.com/support/flash/ts/documents/htmltext.htm

I’m only using supported tags so no problems there… And html is enabled.

I tried your solution but it does’nt help.

Here’s my as:

loadText = new loadVars();
loadText.load(“mytext.php”);
//creating the loadVarsText function
loadText.onLoad = function()
{
scroller.html = true;
scroller.htmlText = this.mytext;
};

Where’s the error in it?

Whoops. The error was me.

The as code works fine. But in my php file I specify some pixel fonts I’d like to use - these are ignored…
And they are linked and exported properly within my library…

Here’s my php file:
http://www.adpape.net/example.txt

I’d like to use these pixelfonts - but can it be done? They are ignored right now…

Got a solution for that one?

You can use the pixel font on your textbox that is in Flash. You have to embed the font outlines for people without the font to be able to see it though.

Just click on your textbox, open the properties panel (CTRL+F3) and choose the font… then click on the button that says “Character…” in the properties area and choose to embed font outlines for “All Characters”.

I use to fonts - one for the headline and one for content.

But I just found a solution…:slight_smile:

I dont have the time to post the solution now (work). So I’ll post the solution tonight - maybe someone else could use the info.

Thanks lostinbeta for your help on the html part….

Here’s the problem i wanted to solve:

I had a dynamic text field in which I wanted to display some blocks of text - a headline and some content belonging to that headline. There could be any given number of text blocks.

I wanted to use a specific font for my headline and another for my content. In order to do this I have to put some html tags in my php file. You can check out my php file here:
http://www.adpape.net/examples/kirupa_scroll.txt

Next up is to put the output from the php file into a dynamic textfield in flash. The text field must have multiline enabled. In a keyframe you put the following actionscript:

loadText = new loadVars();
loadText.load(“yourfilename.php”);
//creating the loadVarsText function
loadText.onLoad = function()
{
scroller.embedFonts = true;
scroller.html = true;
scroller.htmlText = this.output_variable_name_from_php_file;
};

scroller is the instance name of the dynamic text field.

In order to get your selected fonts exported you need to export them for actionscript and give them a name. As you can see in my php file I have used the names “headline” and “sub”.

The way you export them in flash is to select new font from the library menu and then select the font you want to use and them give it a name and press ok. Afterwards you rightclick the font symbol you’ve just created and then select linkage. Then select the option “Export for actionscript” and click ok.

Now you should be all set to go.