This is Interesting: Free Magazines for Graphics designers and webmasters  


Home > Archive > Flash Site Design > June 2004 > Dynamic text: Easy I think...





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Dynamic text: Easy I think...
Mighty Ravenscar

2004-06-17, 11:14 pm

Hi,

Trying to do a simple thing and feel like an idiot for not being able to. I'm
sure this must ahve been asked befor, but I couldn't find the answer when I
searched...

Trying to make different text files appear in the same Dynamic text Box,
depending on what thumbnail is clicked. I think I have to change the variable
of the text box, but nothing seems to be working. Here's a simple test i tried
and it doesn't seem to work: (the text box has an instance name of
"Description," the text files is called Design_Omega.txt):

Description.text = Design_Omega ;
tellTarget (Description) {
LoadVariablesNum("Design_Omega.txt", 0) ;

}

Any and all help would be greatly appreciated.

{R}

J formerly private news

2004-06-18, 12:14 pm


createEmptyMovieClip("holderMC", 1);
holderMC.loadVariables("Design_Omega.txt");
holderMC.onData = function() {
Description.text = this.var1;
};


where your txt file begins with 'var1='


"Mighty Ravenscar" <webforumsuser@macromedia.com> wrote in message
news:catdm6$pfq$1@forums.macromedia.com...
> Hi,
>
> Trying to do a simple thing and feel like an idiot for not being able to.

I'm
> sure this must ahve been asked befor, but I couldn't find the answer when

I
> searched...
>
> Trying to make different text files appear in the same Dynamic text Box,
> depending on what thumbnail is clicked. I think I have to change the

variable
> of the text box, but nothing seems to be working. Here's a simple test i

tried
> and it doesn't seem to work: (the text box has an instance name of
> "Description," the text files is called Design_Omega.txt):
>
> Description.text = Design_Omega ;
> tellTarget (Description) {
> LoadVariablesNum("Design_Omega.txt", 0) ;
>
> }
>
> Any and all help would be greatly appreciated.
>
> {R}
>



J formerly private news

2004-06-18, 12:14 pm

or more up to date with:: this Is the newer of the two ways I think, but
both do the same sort of thing.

loadVarsText = new loadVars();
loadVarsText.load("Design_Omega.txt");
loadVarsText.onLoad = function(success) {
if (success) {
trace("done loading");
Description.text = this.var1;
trace(Description.text);
} else {
trace("not loaded");
}
};


"Mighty Ravenscar" <webforumsuser@macromedia.com> wrote in message
news:catdm6$pfq$1@forums.macromedia.com...
> Hi,
>
> Trying to do a simple thing and feel like an idiot for not being able to.

I'm
> sure this must ahve been asked befor, but I couldn't find the answer when

I
> searched...
>
> Trying to make different text files appear in the same Dynamic text Box,
> depending on what thumbnail is clicked. I think I have to change the

variable
> of the text box, but nothing seems to be working. Here's a simple test i

tried
> and it doesn't seem to work: (the text box has an instance name of
> "Description," the text files is called Design_Omega.txt):
>
> Description.text = Design_Omega ;
> tellTarget (Description) {
> LoadVariablesNum("Design_Omega.txt", 0) ;
>
> }
>
> Any and all help would be greatly appreciated.
>
> {R}
>



J formerly private news

2004-06-18, 12:14 pm

just add the below code with the right text file to the buttons, you might
have to add Description.text = ""; to the first line of the handler if the
text appends im not sure :P

but the var for the text field is incedental for this function, make sure
also that the text box is dynamic! not static!

"J formerly private news" <ruffup@msn.com> wrote in message
news:caupe4$gda$1@forums.macromedia.com...
> or more up to date with:: this Is the newer of the two ways I think, but
> both do the same sort of thing.
>
> loadVarsText = new loadVars();
> loadVarsText.load("Design_Omega.txt");
> loadVarsText.onLoad = function(success) {
> if (success) {
> trace("done loading");
> Description.text = this.var1;
> trace(Description.text);
> } else {
> trace("not loaded");
> }
> };
>
>
> "Mighty Ravenscar" <webforumsuser@macromedia.com> wrote in message
> news:catdm6$pfq$1@forums.macromedia.com...
to.[color=darkred]
> I'm
when[color=darkred]
> I
Box,[color=darkred]
> variable
> tried
>
>



Sponsored Links


Copyright 2003 - 2008 forum4designers.com  Software forum  Computer Hardware reviews