Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




External Text Variable



Hi,

I have two text fields that are displaying dynamic text when a function is called. The thing is that when I click a button it does not always have two variables to display. Some have two some only have one variable.

My function is this

function buttonRollover(me) {
_root.state = eval(me+"_name");
_root.evotes = eval(me+"_evotes");
}

So my issue is that sometimes evotes may not be a variable I need for a specific button rollover but state does have a variable specified.

I understand what is going on, flash does not see a variable present so it fails by displaying undefined. What I would like, though, is to have nothing appear if there is no variable present. Can this be done, can a dynamic text box display nothing if there is no variable defined for it?

Thanks

-brian



FlashKit > Flash Help > Flash ActionScript
Posted on: 10-12-2004, 06:09 PM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Loading External Text Without Variable Name In Text File
i need to be able to load text from a file and put it in a dynamic text box but i cannot modify the text file to put in a variable name

ie the text file cannot contain variablename=1234
but rather must simply contain 1234

Is it possible to load some text without a variable name indicated in the file using flash mx 2004 and, if so, how would one do this?

Load External Text Into Variable? (not For Display In Text Box)
Hello,

I've having a hard time getting this to work, and I hope someone can help. I'm trying to load a value from an external text file into a variable named Q1A. Here's my text file:

&A1=correct

Basically, I'm placing quiz questions, four possible answers and whether the answers are correct/incorrect all in a text file. I'd like to make a 'submit' button that checks whether the answer is correct/incorrect (based on what's been defined in the text file). This lets me use the TXT to update all questions/answers, and it also lets me vary which statement (1st, 2nd, 3rd, 4th) will be the correct answer.

I can load external text into text fields just fine, but how do I use loadvars to define the value of a variable that I'd like to test? Any help would be greatly appreciated. Thank you.

External Text Variable
slight dilemma-

How do I bring in a variable from say, a text file, into a flashtyper movie so that the value of the variable is the text it displays? My actionscript was

loadVariablesNum ("mode.txt", 0);

the text file has

&text=Content

The movie only displays the "C" in Content, and stops!!

How To Load External Text And Put It In A Variable
how can i load some text from a text document into a variable.

Changing External Text To Same Variable
I am creating a course which has several lessons. The top frame of the web course is a flash movie that will show the name of the current lesson.

I want to use one flash movie and possibly one text file to swap in the correct lesson name. In other words, I will have a file which looks like this

lesson1 = this is lesson 1&lesson2=this is lesson 2 . . . and so on

What is the most appropriate way to do this?
I know how to use loadVariables to get text into a movie but that's a one-to-one relationship.

Changing External Text To Same Variable
I am creating a course which has several lessons. The top frame of the web course is a flash movie that will show the name of the current lesson.

I want to use one flash movie and possibly one text file to swap in the correct lesson name. In other words, I will have a file which looks like this

lesson1 = this is lesson 1&lesson2=this is lesson 2 . . . and so on

What is the most appropriate way to do this?
I know how to use loadVariables to get text into a movie but that's a one-to-one relationship.

Text From External .txt File Via Variable - Help
i want to load text from an external textfile into a dynamic textfield using variables inside the textfield (&example = text).
i already have the code for that

_root.bgtext.textfeld.htmlText = this.example;

which works.

but instead of "example" i want to use a variable from my flash movie

>> inside .txt file:<<
&text01 = text

>> in action script: <<
myvariable = "text01";

_root.bgtext.textfeld.htmlText = this.myvariable;

... which doesn't work. does anyone know how to send variables (string) to external textfiles?

thx!
eve

Loading External Text To Variable
code: loadText = new LoadVars();
i = int(Math.random()*20+1);
loadText.load(i+".txt");
j = 0;
//creating the loadVarsText function
loadText.onLoad = function() {
scroller.htmlText = this.myText;
j = this.answer;
};

this code above will load random questions (named q1.txt - q20.txt) into the text area. the questions are identified by the variable "myText". also in the text files are the answers. the answers are identified by the variable "answers". a sample of the text file q1.txt is as below:

code: myText=
<font face="Verdana" size="10" color="#FF0000">
<b>Digestion</b></font><font face="Verdana" size="10">
Which of the following are enzymes found in the stomach? <br> 1) Amylase 2) Maltase <br> 3) Pepsin 4) Sucrase</font>
answer=3

i am able to successfully load myText into the text area ("scroller"). however, i am not able to assign the "answer" to the local variable "j". (which i will use later on for quiz answer checking).

is there anyway i am able to load the answer into variable j?

can someone tell me how am i supposed to compare the variable j? what i mean is "j" is either 1/2/3/4. do i type the code as below? code: if (j==="1") {some animation}

thanks a bunch!

Loading External Text That's Not A Variable
Hi All. This is my first post. I'm working on a project that involves pulling a number from a text file on a remote server. I am familiar with the intricacies of loadVars and loadVariables, but in this particular case, the text file only contains a number. It is not preceeded by a variable name or anything like that. It is just: 40. Is there a way to pull this into flash without a variable name so I can display it in a dynamic text field?

Thanks,
Haig

Loading External Text That's Not A Variable
Hi All. This is my first post. I'm working on a project that involves pulling a number from a text file on a remote server. I am familiar with the intricacies of loadVars and loadVariables, but in this particular case, the text file only contains a number. It is not preceeded by a variable name or anything like that. It is just: 40. Is there a way to pull this into flash without a variable name so I can display it in a dynamic text field?

Thanks,
Haig

Load Variable From External Text File
I would like to load a variable from an external file.
I have been able to successfully populate dynamic text
with external file, but not a not text field variable.

Please see the following code. I would like to populate
the variable vernacular from an external file. That way
it can be changed without a regen.

Thanks for the help in advance.

Shane

// que of fill requests
fillRequests = new Array();

// word sets
// emotional words

vernacular = "Abandoned Abhor Ablaze Abominable Abrasive Absorbed Absurd Abused Abusive Accommodating Acknowledged Acquiescent Acrimonious Admonished Adoration Adored Adventurous Adverse Affected Affectionate Afflicted Affronted Afraid Aggravated Aggressive Agitated Agonized Agony Agreeable Airy Awkward Alienated Alive Alluring Alone Altruistic Ambiguous Ambitious Amenable Amorous Amused Anger Angry Anguished Animated Annoyed Anxiety Anxious Apathy Appealing Appeasing Appetizing Appreciation Apprehensive Ardent Arduous Argumentative Armored Aroused Arrogant Astounded Attentive Avoidance Bemused Betrayed Bewildered Bewitched *****y Bitter Blah Blessed Blissful Blunt Boiling Bored Bothered Brave Breathless Breezy Bright Broken Bruised Buoyant Burdensome Bursting Callous Calm Captivated Captivating Careless Caring Celebrating Chagrined Charmed Charming Chastened Cheerful Cherishing Clandestine Clear Cold Collected Comatose Comfortable Compassion Competitive Complacent Composed Concerned Confused Congenial Content Cool Copasetic Coping Cordial Cornered Creative Crucified Crushed Cursed Cushy Cut down Dainty Defensive Dejected Delectable Delicate Delighted Demure Depressed Desirable Desired Desolate Despair Despondent Devoted Devoured Discomfort Discontented Disgust Dismal Dispassionate Displeased Disregard Disregarding Distracted Distressed Disturbed Doldrums Doomed Droopy Dull Eager Earnest Easy Ecstatic Electric Enchanted Endearing Enduring Engaging Enjoy Enlivened Enraged Enraptured Enthused Enthusiastic Enticing Even tempered Exacerbated Exasperated Excited Exciting Exultation Fanatical Fascinated Fascinating Fear Fearful Fearing Fervent Fervor Fiery Flared up Flattering Flushed Flustered Fluttery Frantic Fretful Frigid Frisky Frustration Full Fuming Fun Funny Furious Galvanized Gay Genial Giggly Glad Glee Gleeful Gloom Gloomy Glowing Gnawing Good Goodness Grateful Gratified Gratitude Grave Grief Grieving Grim Griped Grounded Gushing Gusto Haggard Halfhearted Hardened Harsh Having Fun Hearty Heavy Hectic Hilarious Hopeful Hopeful Horrified Humorous Hurt Hysterical Impetuous Imposing Impressed Impressionable Impulsive Inattentive Indulged Indulgent Inept Infelicitous Inflexible Infuriated Insatiable Insensitive Insouciant Inspired Interested Intimidated Intrigued Inviting Irrepressible Irritated Irritation Jaunty Jealous Jittery Jolly Jovial Joy Joyful Jubilation Languid Languish Laugh Laughingly Lethargic Light hearted Lively Loathe Lonely Lonesome Lost Love Loved Loving Lukewarm Luxurious Mad Manic Martyr Meddlesome Melancholy Melodramatic Merry Mindful Mindless Mirthful Miserable Moderate Mopy Mortified Moved Nervous Nonchalant Not caring Numb Optimistic Overflowing Pain Panic Paralyzed Passionate Passive Patient Perky Perplexed Perturbation Perturbed Petrified Pine Piquant Pitied Placid Plagued Pleasant Pleasing Pleasurable Pleasured Pressured Protected Proud Provocative Provoked Quarrelsome Quenched Quiet Quivering Quivery Radiant Rash Raving Ravished Ravishing Ready to burst Receptive Reckless Reconciled Refreshed Rejected Rejection Rejoice Relish Repressed Repugnant Resentful Resentment Resigned Resistant Restrained Restraint Revived Ridiculous Romantic Rueful Safe Satiated Satisfaction Satisfied Scared Secretive Secure Sedate Seduced Seductive Seething Selfish Sensational Sensual Sentimental Serious Shaken Shielded Shocked Shutter Shy Silly Simmering Sincere Sinking Smug Snug Sober Sobering Soft Solemn Somber Sore Sorrow Sorrowful Sour Sparkling Spastic Spicy Spirited Spry Stoic Stranded Stressed Stricken Stung Stunned Subdued Subjugated Suffering Sunny Supportive Surrender Susceptible Suspended Sweet Sympathy Tame Tantalizing Tantrumy Temperate Tender Threatened Thrilled Tickled Tight Timid Tingly Tolerant Tormented Tortured Touched Tranquil Transported Trepidation Troubled Twitchy Uncomfortable Unconcerned Unconscious Uncontrollable Under pressure Undone Unfeeling Unhappy Unimpressed Unruffled Used Vexed Victim Victimized Vivacious Volcanic Voluptuous Vulnerable Warm Warmhearted Weary Welcomed Whining Winsome Wistful Woe Woeful Worked up Worried Wounded Wretched Yearn Yearning Yielding Zeal Zealous";

// array of words
wordList = new Array();
wordList = vernacular.split(" ");

// fill the page with words!
// fillRegion(0,0,600,337);
fillRegion(30,10,600,215);

this.onEnterFrame = function() {
// pull fill requests from que and execute
if (fillRequests.length>0) {
freq = fillRequests.pop();
fillRegion(freq.x0, freq.y0, freq.x1, freq.y1, freq.d);
}
}

// required because of extra long comment layers
stop();

GetURL Using Variable From External Text File
Hi,
I am sure this is simple but cant find answer anywhere -
I am using getURL to auto load an asp page after anim plays, I want to be able to edit the url in an external text file without having to edit the FLA file.

I am using :

loadVariables("getURL.txt", 0, "GET");
getURL(getURL, "_self");

where 'getURL.txt' contians the address I want to load

Do I need to assign the URL a value in the txt file? and reference this in the getURL command? I have tried everything but to be honest I am not a programmer and am at the limit of my basic action script experience.

Any help much appreciated.

Thanks,
Dave.

Loadmovie According To External Variable From A Text File
dear all,

i will tell you what exactly i am trying to do.
i am making a weather report in flash.
i used an external text file for the temperature levels.so when ever i edit the text file,the flash will change automatically.I used loadvariable("textfile.txt," "")
and is working perfectly.

now,

i need to show rain,sunny,cloudy day animation(like BBC weather).so i used a textfile contaning a variable called day.


sunnyday
rainyday
cloudyday


so,if i type day=sunnyday,the small animation of sun will load into the main movie.

and if i change the variable day=rainyday,the rain animation should load.


i hope you get the idea....

i tried this way and its not working...code is here

loadvariable("climate.txt," "")

if(day = "sunnyday"){

loadmovie("sunny.swf",1)

}else if (day = "rainyday"){

loadmovie("rainy.swf",1)
}else if (day = cloudyday){

loadmovie("cloudy.swf",1)
}


i am not getting the result...whyyyyy???????

i sincerely hope you guys can help me,
am trying this for few days...

Undefined Variable Loading External Text
Still climbing the mountain learning AS; no doubt there is a simple answer to this question (I have tried unsuccessfully to find it in extant threads as well as between my ears).

Trying to augment the Kirupa tutorial "ActionScript Text Animation" (http://www.kirupa.com/developer/acti..._animation.htm)
to take an external text file. When I switch out the line:
text = "There is only one..."
with:
myLoadVar = new LoadVars ();
myLoadVar.load("davetextdoc.txt")
myLoadVar.onLoad = function (success){
if (success == true) {
output.variable = "text"
output.text=myLoadVar.text;
}
}
I get the word "undefined" repeatedly loading itself. The text file is properly formatted(text=dave's text here...) I've tried untold permutations to self-solve. Help is appreciated.

Load External Text Files Into Variable
loadText = new LoadVars();
> i = int(Math.random()*20+1);
> loadText.load(i+".txt");
> j = 0;
> //creating the loadVarsText function
> loadText.onLoad = function() {
> scroller.htmlText = this.myText;
> j = this.answer;
> };
>
> this code will load random questions (named q1.txt - q20.txt) into the text
area. the questions are identified by the variable "myText". also in the text
files are the answers. the answers are identified by the variable "answers". a
sample of the text file q1.txt is as below:
> myText=
> <font face="Verdana" size="10" color="#FF0000">
> <b>Digestion</b></font><font face="Verdana" size="10">
> Which of the following are enzymes found in the stomach? <br> 1) Amylase
2) Maltase <br> 3) Pepsin 4) Sucrase</font>
> answer=3
>
> i am able to successfully load myText into the text area. however, i am not
able to assign the variable "answer" to the local variable "j". (which i will
use later on for quiz answer checking).
> is there anyway i am able to load the answer into variable j?
> can you please correct me if i am wrong in this comparison of string:
> if (j==="1") {
> (play animation for correct answer)

GotoAndPlay(variable) From External Text File
Hi, I am having trouble getting gotoAndPlay(variable) to work from a button within a movie clip, using a value loaded from an external text file at _root level;

loadVariables("aug05.txt","/");

The external text file values are a calendar of events and reference frames.

&e16=<b><font color="#FF6600">Event A
&f16=ea

&e17=<b><font color="#FFFF00">Event B
&f17=eb

I'm using 31 instances of movie clip "event" to display the variable monthly calendar of events, in each instance, defining values accordingly eg. for the 16th of that month, I have the following;

onClipEvent (enterFrame) {
evnt=_root.e16;
frm=_root.f16;
}

The button within this movie clip is supposed to take you to the frame for that event;

on (release) {
_root.gotoAndPlay(frm);
}

but doesn't seem to recognise the "frm" variable at the button action level (though it does pass the variable "evnt" successfully to the dynamic text field within the button).

I've tried everything I could find online to no avail. Is it even possible?

Undefined Variable Loading External Text
Still climbing the mountain learning AS; no doubt there is a simple answer to this question (I have tried unsuccessfully to find it in extant threads as well as between my ears).

Trying to augment the Kirupa tutorial "ActionScript Text Animation" (http://www.kirupa.com/developer/acti..._animation.htm)
to take an external text file. When I switch out the line:
text = "There is only one..."
with:
myLoadVar = new LoadVars ();
myLoadVar.load("davetextdoc.txt")
myLoadVar.onLoad = function (success){
if (success == true) {
output.variable = "text"
output.text=myLoadVar.text;
}
}
I get the word "undefined" repeatedly loading itself. The text file is properly formatted(text=dave's text here...) I've tried untold permutations to self-solve. Help is appreciated.

Problem Loading Variable From External Text
I hope someone could help me on this. I am trying to customize a movie in Flash MX with an external text and it is not working. Here is the description:

The movie contains one Layer and one frame. I placed a Dynamic Text named Mytext on Frame 1. The actionscipt on the frame is as follows:

var Mytext = ""
var text = "This is a test of how a dynamic content would work."

This works fine. But I would like to substitute the value of "Var text" with a dynamic content loaded from an external text file. How can I achieve this and also access more than one variable in the text file? Thanks. Again, I am using Flash MX.



Variable, Dynamic Text Box, External Movie
I've got a Flash movie file with variables declared, dynamic text boxes attached to this variable, and values set throughout this movie that change the content of this text box. It works fine.

Except when I load this movie from another Flash file. Then nothing shows up in the dynamic text box. It remains blank.

What might I be doing wrong?

Thank you.

JSFL: External Variable/Clipboard Text
I'm working on creating an AutoHotKey script and JSFL script to assign an instance name for the selected object on the stage. (I HATE that there isn't a shortcut to create an instance name).

Does anybody know if there is a way to grab text from the clipboard (or even a variable straight from AutoHotKey)? The JSFL I'm using right now is:

ActionScript Code:
for(i in  fl.getDocumentDOM().selection){
    fl.getDocumentDOM().selection[i].name = ;
}

External Text Field As A Variable, A Real No Brainer, But Help
Can i import an external txt file as a varible, I know it can be used to populate a dynamic text field but im trying to get it in the movies as a string variable. Im using the loadvariable command but it seems to be doing nothing..

any help to this no brainer would be gratefully accepted.

Controlling Movie From External Text/variable File
Hi people

Does anyone know if it is possible to do this:

I need to load an external text file to a field in the movie.
I then need to be able to click on a word in this loaded text field that then loads a further external text file into a different field.

ie. so that a text list menu and it's corresponding text menu items can be controlled from external files.

Or some other way to acheive the same result?

thanks!

How To Put External Variable's From PHP Into Variable's In A Function
I already echo my variable's the right way. I want to make it possible to adjust collors trougout my database. This is what my PHP file echos:

&homecolor=33ff33&newscolor=000000

this is how my PHP file looks:

PHP Code:




<?php

require("connection.inc.php");

$query = "SELECT name, color FROM outlinecolors";
$result = mysql_query($query);

while(list($name, $color) = mysql_fetch_row($result)) {
print("&$name=$color");
}

?>







This way of using PHP also works for the text I use in my movie, which I let flash put in a dynamic textfield. So I tought that it should be possible to have the variable colors above being used in the next function:

code:
home_btn.onRelease = function() {
outline.fadeColor(homecolor, 100, tweensspeed, test);
};


"homecolor" is the place where the value/echo from php must come (&homecolor=33ff33) so "33ff33" must be in the function in stead of homecolor.

Can anybody help me?

Greets..

Dynamic Text Field Is Calling The Variable Name Instead Of Variable Content
I'm having a problem getting something to work. I'm sure it has something to do with string variables and my syntax, but can't figure it out.

I have variables named cust1, cust2, cust3, etc. that are being loaded from a text file (these are customer names that will display in a text ticker).

I want a dynamic text field to display the customer names in incremental order, so I created a variable that consists of the string "cust" + a numeric variable called custNumber. At the end of each pass of the movie, custNumber is increased by 1.

var custNumber = 1;
var custName = "cust"+custNumber;

I want the dynamic text field to call the variable custName, but I can't get it to work. It keeps displaying custName as a string ("cust1", "cust2", etc.).

So I created a new variable called scrollText for the dynamic text to call, and made scrollText = custName;. But it does the same as above.

How do I get my dynamic text to call the variable that I create with another variable?

I want my dynamic text field to display the variable cust1, cust2, cust3, which would be "Jones Plumbing," "Smith Electric" etc., but all I'm getting is "cust1", "cust2", "cust3" etc.

Thanks,

Thom

About Refreshing The Value Of A Variable Inside Of Another Variable (in A Text Field)
Hello, I have a simple question, but I'm not sure this is possible in Flash:

I'll simplify the problem so that it's easy to understand.

I have a text field holding a variable called "products".

This variable is defined via ActionScript somewhere else, with something like this:


Code:
products = "Some text here" + variable1;


The problem is that, when "variable1" is updated, the value of "products" will obviously remain the same, as it hasn't been redefined (I could redefine it as [products = products + ""] or something, but if I don't include the "variable1" in the definition it won't pick its new value).

I really need to do this with just one text field, and I cannot redefine the whole variable "products" again, as it is much complex than this example and keeps storing info in different ways depending on what the user does.

Any suggestions?
Thanks in advance

How To Store A String Plus A Variable In A Dynamic Text Variable?
Hi,

I've got a dynamic text field with the instance name rightAnswer_txt.

I declare the variable in the frame it resides in, with the following code var rightAnswer_txt:String = "";

Then, when I want to populate it using the following code:

rightAnswer_txt.text = "You scored " + rightAnswers;

the script comes out with an error saying ...

**Error** Scene=Scene 1, layer=actions, frame=7:Line 15: There is no property with the name 'text'.
rightAnswer_txt.text = "You scored " + rightAnswers;

Any idea what this means anyone please?

Dynamic Text Box Variable = Other Variable, No More Scroll
So I have this textbox. And I want it to display some text. And I want the text to scroll and I want the text to change when you click a button. W007 I did it I am done. But I have a little problem, and I do hope you can help.

I loaded variables from a text file into flash, gave the variables different names, and then I set the buttons that can be clicked on to set the dynamic text box variable to equal one of the loaded variables. Ít wouldn't scroll after that. Whats up wit dat.

I can get you the FLA if you want it, but I am hoping someone will just say oh ya, common mistake, you gotta check a box or something.

Make A Variable = A Variable From A Text Document
I'll try my best to explain this, but it might be easier to see the file itself, I zipped it up and can be found at:

DOWNLOAD ZIP FILE
(the flash file is not pretty, I am building the functionality first)

-----------------------------

The variable it is creating does not call up the variable in the text
document.

I have a textfield called: randomquote

the value for randomquote is being "created" by:

Set Variable: "randomquote" = "q"&VARX2

VARX2 is a random number being generated by:

Set Variable: "VARX2" = Random ( VARX )

VARX is a number being pulled from the text document:

Set Variable: "VARX" = (/:myNumber)


SO, If I hard code randomquote with the value q4 , then the variable q4 from the textdocument is pulled up correctly.

BUT, if randomquote equals q4 (generated from a random number) the variable q4 from the textdocument is not shown, but rather just a simple q4.

Changing Root Variable With Text Variable
Simple question: I'm trying to change the value of a variable on the _root level (called "myVar") to whatever a user types into a text box (mytextvar) on the stage. I have a button that says:

ActionScript Code:
on (press) {
    _root.myVar = _root.myTextVar;
}
It isn't working... any ideas how to make this work?

External Swf And External Variable Problem
I have been working on a website that loads an external movie for each of the seperate pages of the site. This is no problem. However, I have set up the external swf's to have scroll bars and load content from text files. I can not get these to work together. I can use the content movie with the scroll bars on its own and the text loads, I can use the main navigation movie to load the content movie, but I can not get the main navigation movie to load teh content movie and then have the content movie load the text at the same time. *Wheew* I hope that's not too confusing.

Main Navigation movie
- Seperate page of the site
-Text content

the script i use to load the external swf is :
on (release) {
loadMovieNum("bio.swf", 2);
}

the script i use on the external swf to load the text is :
loadVariablesNum("bio.txt", 0);


If I need to explain it more thoroughly please ask me to do so. Remember i can get these two elements to work seperately but not when both used together. :-(

[CS3] [AS2] Using Variable Text Contents As Another Variable's Name
Hi guys. I was wondering if there was a way to use a variable's contents (such as an input text box's contents) as the name of another variable. Both variable will be global. So, if the text box's instance name is "txt_box" and
Quote:




txt_box.text = _global.hello




how would I use the contents of _global.hello as the name of another variable? I think it's something like
Quote:




_global[[_global.hello]] = "text";





or something along those lines.

Thanks,
Sportzguy933

Dynamic Text Variable Variable
Hello,
I have a movie which loads data from a text file into flash (-no problem there).
The twist to this is that one of the fields in my movie loads text into fields from a text file which looks similar to the example below:
myText_district=109
&myText_Ian=189
&myText_Dave=8
&myText_Ray=14

If I select a specific field in my flash movie and put for example" myText_Ian" as my Var in the properties panel I have no problem getting the "109" to echo at runtime.

But what I would like to do is specify the Var in the properties panel as something like:

"myText"+_root.managername

and still get the same result. You see, I want to define the variable "managername" at runtime in a field so that if I type for example "Dave" in the field the movie will substitute "Dave" in place of the variable "managername" all throughout my actionscript and thus retrieve only info applicable to "Dave".
The biggest problem for me is that I am stuck with the property panel because I can't apply actionscript directly to a dynamic textfield.

Is there a syntax that I can use in the Var field of the property panel to get the result I want; to get the variable equivalent to "myText"+_root.managername?

OR

Is there an example somone can show me on how to load variables from a text file into a SPECIFIC dynamic text field completely in action script?

Any help is greatly appreciated.

External Variable
I have a News Section on my flash website. How do i set that equal to a news.txt variable so i can edit it from outside of flash and make my life easier
PLease Help

External Variable
I'm trying to load an external variable to run my loop but it not working, the name of the variable is exNumber the flash file is getting the value just fine, I think that my problem is on the syntax, but I'm not sure. Any suggestions?
Thanks,
Fabio

count = 1;

do {
setProperty("_root.b"+ count, _visible, "1");
setProperty("_root.name_"+ count, _visible, "1");
count++;

} while (count <= exNumber );

External Variable
What is the best way to define an integer variable on
a external text file?

I had something like this:

&numero= 5

The only problem is that I can see it just fine on my flash file as a string. but when I tried to use this variable as a parameter to my while loop is does not recognizes the value 5
any suggestions?

Using External Variable
hi peeps,

im having trouble using the value of a variable contained in an external text file in a computation/calculation. to give you detailed idea of my problem, say i have 'myvar=13' stored in 'data.txt' file. on my flash stage, i tried to issue a loadvariables command to call up the variable 'myvar' contained in the 'data.txt' file to an MC (instance name=myloader). inside the MC i wanted to use the value of 'myvar' in calculation, but everytime i tried to issue a trace command on the resulting calculation output(say sum=myvar+10::trace(sum)) it returns 'undefined' on the trace output window. if you can come up with a sample .fla to demonstration your solution to this one, would be highly appreciated, if you could email it at netserv_inet@yahoo.com

thank you very much guys

External Variable
how to assign external variable to a flash movie hosted in html document without using query string after movie's name

i did it using

<PARAM NAME=movie VALUE="jadmin.swf?myvar=value">

is it possible to use another way

thanks

External Variable Help Please
trying to set the color of a movie clip using a external variable can someone please help?

Using An External Variable
hi all,

I am basically trying to get a number in an external text file to influence the background color of my flash file... the number displayed in the file is correct but when i try to use that number in an if statement it all falls apart:

Code:
var externalData:LoadVars = new LoadVars();
externalData.onLoad = function() {
color_txt.text = externalData.colorCode;
}
externalData.load("colorCode.txt");

var myNumber:Number = Number("color_txt.text");

if (myNumber==1) {
var myColor = new Color(backgroundColor_mc);
myColor.setRGB(0x828238);
}else if (myNumber==2) {
var myColor = new Color(backgroundColor_mc);
myColor.setRGB(0x105788);
}else if (myNumber==3) {
var myColor = new Color(backgroundColor_mc);
myColor.setRGB(0x369636);
}else if (myNumber==4) {
var myColor = new Color(backgroundColor_mc);
myColor.setRGB(0x654884);
}else if (myNumber==5) {
var myColor = new Color(backgroundColor_mc);
myColor.setRGB(0x000000);
}
could anyone point me in the right direction?

External Variable
Hey all,

I have a question - how can I pull an OUTSIDE variable into my flash program.

For Example

<param name="test" value="test1">

How can I then read that in my actionScript?

Or is there a better way to do this?

ANY advice is greatly appreciated!

Get Variable From External Txt
I'm want to get a variable from an external txt-file and pass this variable
to an existing script.

This is part of the existing script (it's a slideshow-script, not written by
me):

this.pathToPics = "/animation/";
// fill this array with your pics
this.pArray = ["image0.jpg", "image1.jpg",
"image2.jpg","image3.jpg","image4.jpg"];
loadMovie(this.pathToPics+this.pArray[0], photo);

However, instead of defining this.pathToPics in the fla, I want to load this
variable from an external text-file (because I would like to change it
sometimes, and I don't want to edit the fla file each time it changes).

In the txt-file I have:
URLToImg=F://www.mywebsite.com/somefolder/animation1/

I already tried:
var externalVars = new LoadVars();
var URLToImg:String;
externalVars.load("URLPath.txt");
externalVars.onLoad = function() {
URLPath = externalVars.URLToImg;
}

and then referring to this variable with:
this.pathToPics = URLPath;

but that doesn't work....

Does anyone know how to do this correctly?

External Variable
Hi,

I have a hard time finding help on what I'm looking for (sorry for my english this is a second language for me)
I'm really not a programmer so I will try to explain waht I need as clearly as possible:

I have a Flash (index.swf) that loads differents Flash (6 swfs) with 3 buttons. It's a scientific web site on the brain Called "Le cerveau à tous les niveaux"...and it uses three different levels of explanation (beginner, intermedaite and advanced) to talk about different aspect of the brain...There is 12 different subject on the brain you can read on for each level..

When you click on a subject, it goes to a basic HTML page.

But my problem is that when you are on this HTML page and you whant to go back by either pressing the Back button or clicking on the "Back to main topics" that appears on every page, you will always go back on the beginners page by default even if you were on the intermediate or advanced page......

Is there a way to set an external variable that will remember on wich level (example "intermediate") when I press the BACK button???
I assume that the answer is yes but can anyone explain to me how to do this??

thanks!

External Variable
Hi,
How can I get a variable from an external domain. So not the one the flash is on.
So basically the page would have &status=1 and I need to get the 1
Bryce

External Variable From URL
Does flash can read variable from url?
Let's say that movie is located on age
http://www.example.com/index.php?var1=x&var2=y

Can i access values from var1 and var2 ?

Via-Net - web directory

Antialias Text With Variable Text Inside Flash Authoring Environment?
Here's the code I'm using, and the question I have is after the code.

<code>
if (_root.button == 1){
mytext = "<b>Available:</b> {Available}<br>";
} else if (_root.button == 2){
mytext = "<b>Price:</b> {Price}<br>";
} else if (_root.button == 3){
mytext = "<b>button 3{button_3}<br>";
} else if (_root.button == 4){
mytext = "<b>button 4{button4}<br>";
} else {
mytext = "<b>Zoning:</b> {Zoning}<br>";
}
</code>

P.S.
These brackets "{}" are used for Generator variables that get pulled in from an access database.



So my question is this...

Is it possible to get this text to show up antialiased in my dynamic text field?

I've already tried to publish the movie with the text field option set to "EMBED ENTIRE FONT", and the only thing that shows up is the data coming from the database... the text that is already embeded in the variable does not show up.

Am I doing something wrong in my code?

any help would be greatly appreciated. Thanx.
-fourfold

Antialias Text With Variable Text Inside Flash Authoring Environment?
Here's the code I'm using, and the question I have is after the code.

<code>
if (_root.button == 1){
mytext = "<b>Available:</b> {Available}<br>";
} else if (_root.button == 2){
mytext = "<b>Price:</b> {Price}<br>";
} else if (_root.button == 3){
mytext = "<b>button 3{button_3}<br>";
} else if (_root.button == 4){
mytext = "<b>button 4{button4}<br>";
} else {
mytext = "<b>Zoning:</b> {Zoning}<br>";
}
</code>

P.S.
These brackets "{}" are used for Generator variables that get pulled in from an access database.



So my question is this...

Is it possible to get this text to show up antialiased in my dynamic text field?

I've already tried to publish the movie with the text field option set to "EMBED ENTIRE FONT", and the only thing that shows up is the data coming from the database... the text that is already embeded in the variable does not show up.

Am I doing something wrong in my code?

any help would be greatly appreciated. Thanx.
-fourfold

Dynamic Text Field: Swap Text With Diff Variable In Same Ext. File
I'm using the recommended


Code:
loadText = new LoadVars();
loadText.load(_global.text_url2);
loadText.onLoad = function(success) {
if(success){}

etc..
which is working well. I just want to attach an action to buttons which will switch the text for different variables in the same text file, in a single text box named archivetitle.

ie.

Code:
archivetitle.text = this.title1;
when button one is pressed



Code:
archivetitle.text = this.title2;
when button two is pressed.


Basically, how do i access an already loaded text object to refresh to a new variable? Thanks!

Dynamic Text Field: Swap Text With Diff Variable In Same Ext. File
I'm using the recommended


Code:
loadText = new LoadVars();
loadText.load(_global.text_url2);
loadText.onLoad = function(success) {
if(success){}

etc..
which is working well. I just want to attach an action to buttons which will switch the text for different variables in the same text file, in a single text box named archivetitle.

ie.

Code:
archivetitle.text = this.title1;
when button one is pressed



Code:
archivetitle.text = this.title2;
when button two is pressed.


Basically, how do i access an already loaded text object to refresh to a new variable? Thanks!

Sending A Variable To An External Swf
I am trying to send a variable to an external swf file which loads into my movie, is this possible?

At the moment, I have an actionscript in my movie. which reiures a value from my main movie.

so all i want to do is to tell the movie that the

index = 1 , 2 , 3 , etc b4 when the movie loads, so that it know which number to use in the script...

It may sound simple, but 4 some reason, i just cant work it at the mo...

anyhelp would be great!

Copyright © 2005-08 www.BigResource.com, All rights reserved