Loading dynamic text

Well heres another one…
I have four buttons that open the same mc. But each button has different dynamic text content. The problem is that when I click on a button it started the mc, and only when I click on the button a second time does it load the dynamic text for that button. So my question is…

How do I tell the text to load when the mc stop on a certain frame? I want the text to load after the mc has stopped on frame 14.

Also is there a way to put a url link in the dynamic text that I want to load?

thanks, LOTW

set your dynamic text box with a varName
remember to enable to “render text as html” at the properties panel

then you could simply put a actionscript on frame 14
varName = “<a href=‘htmlsource’>this is a link</a>”;

you should be able to get your text display at frame 14 and with a hyperlink.

hope it helps.

:slight_smile:

Hi Gordian, and thanks for the info but, could you elaborate a little more,

I can kind of understand the links, but what do you do if you have more than one link intermixed within regular text within the text box?

And I still don’t understand how it get’s loaded into frame 14 without me having to click on the button a second time?

Thanks, LOTW

simply create the action in frame 14…meaning the movie will start playing…then when it reach frame 14 it will execute the action…

var1=“key in your text here and <a href=‘webpage.htm’>your link here</a>”

what the line of command above does is to set the variable var1 with whatever is within the " " and once var1 have a value…the dynamic text box will display it…

just do a simple practice first and understand the concept before doing it on your actual one…

just create a simple dynamic text box say at frame 10…name the variable as Var1 and remember to enable the parse HTML…
run it first…

then insert the actionscript
var1=“key in your text here and <a href=‘webpage.htm’>your link here</a>” into say frame 5 and run it again …then you will see the effect…

to create a action in frame 14 simply create a keyframe at frame 14 first then you are able to insert the action there…

as for the link intermixing in the text…just write it as what you will do with html…but you could ignore the <html>…</Html><Body>…</Body> and stuff like that…simply write your link using the <A Href>…</A> tag…

hope it clear up everything…

:bandit:

I understand the loading the var1 text. But I still can’t figure out how to put the links within the text. Can you post some sample script that I can look at to get a better understanding of it?
thanks, LOTW

ok…I figure out why you can’t understand already…

because the forum render my sample as html…

simply enter html code as it is and remember to enable the render as html under the properties panel.

I have also read your another thread pertaining to this issue…

why you get funny result is because of your quote…

remember to use only single quote ’ ’ when using it in your html code…because a double quote “” will imply to flash that it is the close of the code in front and the beginning of another code…

think this should clear up your doubt…

:bandit:

Thanks for getting back to me, you know I haven’t had this hard of a time with something so simple, then the time I forgot my own name!!LOL

I can’t figure it out, I am unclear as to where I am putting the code, does it go inside the text box or in the link box, I have no Idea, I feel that it’s a syntax error on my part.

I cut and pasted a line from my other post into the text box and all it did was display the pasted text?

Thanks LOTW

hey man…

you are getting me confused…

ok here it goes again…

first you create your dynamic text box …with “Render Text as HTML” enabled…it is a button with the symbol <> found in the properties panel of the text box…

then you put whatever text you want into the var1…

and simply insert your link as per how you do it in html…that is using the **A href=‘yourpage.htm’ your link description here /A **
NOTE: I leave out the <> purposely so as to prevent the forum from parsing it as html…but you will need to put them in when writing the code…

you can insert as many link within your text as you like…just do it like how you will with a html page…

and remember two very important things…

that is the enabled the render text as html and use single quotation mark ’ ’ within your code and not " " because by doing that flash will interpret it wrongly…

think this should clear up most of your doubts…

:slight_smile:

Well this is what I have figured out

Say I typed a paragraph of text inside a dynamic text box. One of the words I want to be a link. So I highlight that word and then go to the properties window and type in the url. That seems to work. What I don’t understand is what all this means… [COLOR=blue]text = “a href=“www.somewhere.com”>click here/a”;[/COLOR] I mean I understand HTML but What was travisua talking about. Are these things two different was of doing it?

What am I missing, besides by brain LOL.
LOTW

Well I figured out where I am dropping the ball. You said something about Var1. So apparently I have no idea what a var1 is, I must have missed that in the previous posts
can you explain what that is?

thanks for your patients, LOTW

ok…

when I say var1 I am assuming that you are trying to use a variable to load the text into the dynamic text box…that means you are not typing it into the text box…

therefore I ask you to create the text box and name the variable as var1 for example…

and you will need to tell the button to set the value for var1 when click by the following actionscript:

for a button you created by converting it into a button symbol

on (release){
var1=“whatever text you want and hyperlink here %A href=‘yourpage.htm’% your link description here%/A%”;
}

for flash button component
you need to write the onClick function and under your click handler you simply put the function name onClick

function onClick(btn) {
if (btn == buttonName) {
var1=“whatever text you want and hyperlink here
%A href=‘yourpage.htm’% your link description here%/A%”;
}
}

by doing all this… it will load the text into the text box whenever the button is click…

got it?

oooopss forgot to mention…I change the <> to % so as to prevent it being parse as HTML again!!!

:stuck_out_tongue: