Reiterative Loadvars (dynamic)

It seems that once a new LoadVars object is used, it cannot be re-used to send POST data again.

For example, I have 40 questions on a test.

Whenever the student answers a question, the information uses SendAndLoad by MAIL (see below) to insert a new record in mySQL of the data for that question.

The test goes through the same routine of 40 times and so should insert 40 unique records representing the answer of the student for each question.

I can't create a _global or table loadvars object and then reallocate the array elements in each issue (which would be reused in another setting an array element or the object _global. Flash doesn't let me do.

Any ideas? Forum adobe and google search have not turned to the top of anything yet that this routine below (thread is also below in the section: dynamic loadvars)

for (i = 0; i < maxnumbersinlist; i ++) {}
_root ["display" + i] = myLoadVar ['show' + i];
}

Please explain how this would work, would it? I can't design a send_lv [ques1], [ques2] send_lv.

Where you need to understand what I'm trying to do, here is the site:
http://www.4themax.com/education/regents_quest/quiz-home.html

With the example below, I want to reuse send_lv and result_lv then

Question 1: send_lv.nme = "John";

Question 2: send_lv.nme = "test server 234;

Question 3: send_lv.nme = '3 '. etc.

(data are fictitious, but the data will be different every time the send_lv is mailed to a php file to insert the mySQL data)

Otherwise, I would create 40 objects loadvars different, i.e. the send_lv1.nme in question 1, send_lv2.nme for question 2, etc., which is very heavy.


-the thread of the previous post-
This is WHAT WORKS! THANKS kglad - I also put a kudo to you on my screen.
Tip: I had to make the php file to write the contents of the variable in a file, because it doesn'tdisplay on the screen with echo so that the variable passed from flash to php.

Adobe document source: http://livedocs.adobe.com/flashlite/2/main/00000572.html

var submitListener:Object = new Object();
submitListener.click = {function (evt,:Object)}
var result_lv:LoadVars = new LoadVars();
/*
result_lv. OnLoad = {function (success:Boolean)}

If (success) {}
result_ta. Text = ' sent successfully! ";
} else {}
result_ta. Text = 'Error connecting to server.';
}

};
*/
var send_lv:LoadVars = new LoadVars();
send_lv. NME = "Test Server2."
Sending.Text = send_lv.nme;
send_lv.sendAndLoad ("loadvars.php", result_lv, "POST");
//};
submit_button.addEventListener ("click", submitListener);

<? PHP
$contents = $_POST ['nme'];
echo $contents; DISPLAYS NO CONTENT
Open the file write-only - used to view the contents of the _POST variable sent by LoadVars
$file = fopen ('loadvars.txt', 'w');

write content
fwrite ($file, $contents);

Close the file
fclose ($file);

? >
-forum thread is less: -.
Arfa
The user is in offline mode
View profile

Junior member posts: 3
Joined the: 25/03/2003
2008-01-26 01:01:02
Response | City | Top | Bottom

Hi all

I write actionscript to get variables in a database using php. I used the LoadVars object and you can set a variable using the following line of code that works

_root. Show1 = myLoadVar.display1

In this case, myLoadVar is an instance of the Loadvars class and name1 is part of a series of variables sent from php.

I need to make the right part of the dynamic expression for example (name1, display2, display3 etc.)

I tried to use eval, but it does not work.

Thanks for any help.

ANSWER:
for (i = 0; i < maxnumbersinlist; i ++) {}
_root ["display" + i] = myLoadVar ['show' + i];
}

your code does the trick! Once more, kglad is the man!

I changed to show that you can add multiple variables (tabular) which represents the fields in the questions, and I removed the "_" which gives a urlencoded thing into the mix.

send_lv object includes ALL the fields for ALL the questions in the form of name-pair values, which is what I wanted! Happy! Happy me!

var send_lv:LoadVars = new LoadVars();

totalquestions = 40; whatever number you want

for (var i: Number = 1; i<>

response, lastname, firstname is the mySQL database table fields to insert into

send_lv ["answer" + i] = response ;
send_lv ["lastname" + i] = LastName As String
;
send_lv ["firstname" + i] = name ;
send_lv.totalquestions = 5;
}

send_lv.sendAndLoad ("LoadVars.php", result_lv, "post");

----------------
The for loop can include as many fields as you need! I have set up in the SWF file of sendAndLoad to the php file for Totalquestions = 5, as a prototype. I have created several fields and reached to the POSTER in a php file inserted 5 records.

The psedocode for the php file is:

$variable1 = username; Repeat password, localhost, etc..

$variable2 = $_POST_ {"totalquestions"];}

for ($i = 1; $i<= variable2;="" $i++)="">
$variable3 = $_POST_ {'field1'].} Field1 $i
$variable4 = $_POST_ {'Field2'].} //field2 $i repeat this for all your fields

Open the database

$qry_val1 = ' SELECT * from yourtablename (Field1, Field2) VALUES ("'.") $variable3.' «, (« '. $variable3. » ")';
$result - mysql_query ($qry_val2) or die ('could not query the database'. mysql_error());

} //for loop ends

//close the database mysql_close(dB$)
}

I take the time to put it here to help others if they are looking for the forum instead of asking the same thing again.
I have to admit that dealing with databases is REALLY hard the first time.

Thank you once again together, especially kglad!

Tags: Adobe Animate

Similar Questions

  • dynamically loadVars directly from hyperlink?

    Hi, I created a swf file that keeps track of a variety of users, and then sends the coices to a PHP script via getURL. When the php script receives the reactive power, it sends the user an email with a with a hyperlink. This hyperlink has the choice that they made added to the url. URL ends upward looking something like this in their E-mail:

    MySite.com/shirtmaker.swf? [email protected] & shirtsize = small and Shirtcolor = black

    As you can see that the URL to access a SWF on mysite. Keep in mind that it is initially anentirely different swf that the user makes their choice in.

    My question is, can I load the URL variables directly into the swf file using loadVars? or any other method? Or should I first catch the variables in a script, then turns to the swf?

    At present, the loadVars method does not work.

    Here is the code in the swf file (the aims of an i at the earliest: mysite.com/shirtmaker.swf):

    One of the demands of the job is to get the reactive power in the swf file to e-mail message to the user (where I placed the hyperlink in the order). The underlying idea is that the customer can always use the hyperlink to see what they ordered. Instead of storing the results in a database, the information is stored in their e-mail in a keep, and if they want to see it, a swf file can generate it dynamically when you click. In this way there is a single php script and a swf.

    Thanks in advance for your answer.

    Thanks for the quick response! I'm so happy because I just jump loadVars altogether and it worked. Thank you very much!

    I wonder what maybe the downside to this? It seems much simpler than using loadVars, and it often seems that people are sending only a few variables.

    Very cool

  • Problem of passing a variable to a field of dynamic text in php (Flash 8)

    I am currently working on a flash file, where a person enters
    their score in a box of text entry with an instance name of score, then it
    It converts a percentage and ranks.
    The swf file displays the rank and the percentage in two dynamic text boxes
    with the name of the instances of percent and score.
    This part is for me no problem.
    The main goal is to pass the percent and the partition to a php file called
    grade.php and save the two variables in MySQL.

    After you download the files to a server, I run the swf file and
    It seems that everything works.  But when
    I check the MySQL file, I noticed that a row has been inserted, but no score or
    grade entered.   I can't know
    What is the problem.  If anyone can help
    me with that?

    Here the Actionscript 2.0 code and the php file:

    function findPercent() {}

    percent. Text = (score.text * 100) / 100;

    If (percent.text > = 90) {}

    rank. Text = "A";

    } ElseIf (percent.text < 90 & & percent.text > = 80) {}

    rank. Text = "B";

    other
    If (percent.text < 80 & & percent.text > = 70) {}

    grade.text = 'C ';

    } ElseIf (percent.text < 70 & & percent.text > = 60) {}

    rank. Text = "D";

    } ElseIf (percent.text < 60) {}

    rank. Text = 'F';

    }

    }

    submit_button.onRelease = function() {}

    submitURL = "grade.php";

    Create an instance of the LoadVars object and fill it.

    send_lv = new LoadVars();

    send_lv.score = "percent.text";    (Note: when I used the text of entry as. score.text box, it displays in MySQL)

    send_lv.grade = "grade.text";

    send_lv. Send (submitURL, "POST");

    };

    (grade.php)

    < html >

    < head >

    < title > Grades: add your rank and Score < /title >

    < / head >

    < body >

    Grade display < h2 > < / h2 >

    <? PHP

    require_once ('connectvars.php');

    Connect to the database

    $dbc = mysqli_connect (DB_HOST, DB_USER, DB_PASSWORD, DB_NAME);

    Enter the data in the partition of the POST

    $score = $_POST ['mark'];

    $grade = $_POST ['category'];

    Write the data to the database

    $query = "INSERT INTO transcription (score, rank) VALUES ('$score', '$grade');

    mysqli_query ($DBC, $Query);

    mysqli_close ($DBC);

    ? >

    < hr / >

    < / body >

    < / html >

    If you use such track suggested in the message 4 instructions and the instructions of tracing corresponding to your expectations, the problem will be in your php file.

    I have a problem with your php code, but there is no way (in this forum) to check if your db columns are score and rank and that they have the correct data type.

    p.s. I don't download and fix the files unless I'm hired.  free help I offer only via the adobe forums.

  • Simple dynamic text

    A system that I use is a simple api to extract data. I need to be able to change the text in my flash file with the data retrieved from an API call. Someone has a convenient link to a tutorial on how to do this.

    Thank you

    Tim

    Use a dynamic textfield and assign your new text by using the text property of the textfield object:

    your_tf. Text = "new text";

    to load data, use the loadvars class:

    var receiveLV:LoadVars = new LoadVars();

    var sendLV:LoadVars = new LoadVars();

    {receiveLV.onData = function (src)}

    your_tf. Text = src;

    }

    sendLV.sendAndLoad ("yourfeed.yourfeedsfiletype", receiveLV, "POST");

  • Dynamically change the text during the narration

    Hello!

    I have a file that contains the narration. The contents appear gradually on the stage reading of the narrative.

    On the first image, I have added a dynamic textfield, I called: soustitrage_txt (would be "caption_txt" in English).

    On another layer, on the same frame, I added this code:

    soustitrage_txt.html = true;
    soustitrage_txt. AutoSize = 'left ';
    soustitrage_txt. Selectable = true;
    soustitrage_txt. Multiline = true;
    soustitrage_txt.WordWrap = true;

    var txtFormat:TextFormat = new TextFormat();
    txtFormat.size = 20;
    txtFormat.font = "Arial";

    txtFormat.bold = true;

    I exaggerated the value, to make sure it really does not work...


    _Global.mydata = new LoadVars();
    _Global.mydata.load ("P1.txt");

    _Global.mydata.onload = function() {}
    soustitrage_txt.setTextFormat (txtFormat);
    };

    I need to show the first sentence around the 115 frame, in which I entered this code on my "action layer":

    soustitrage_txt. Text = _global.myData.phrase1;

    A positive point, the text is displayed (yay!), but the negative is that the formatting does not work...

    Finally, when I want to move to the next sentence, around the frame 195, I get the same code (with only a variable to call another name):

    soustitrage_txt. Text = _global.myData.phrase2;

    And now it shows me "undefined"... :/

    Here is an overview of my external text file (I translated it... since it is in French normally):

    phrase1 =Hello and welcome on this guide that will show you how to adjust your workstation step by step. &
    statement2 issetting your workstation correctly will prevent you from having any discomfort as a result of a bad posture or a bad setting. &

    phrase3 =... &

    (and so on...)

    Thank you very much!

    Geneviève

    If you place these signs at the end, followed by a carriage return as you seem to be by what you posted, don't do it. Keep them adjacent to the variables that they define.

    phrase1 = Hello and welcome on this guide that will show you how to set your workstation step by step.

    & statement2 = setting of your workstation correctly will prevent you from having a discomfort that can result from poor posture or incorrect setting.

    & phrase3 =...

    &

  • ScrollBar of a movieclip with dynamic content

    How to make the roll bar work for a movieclip with dynamic content.

    var senderLoad: LoadVars = new LoadVars();

    var receiveLoad: LoadVars = new LoadVars();

    senderLoad.sendAndLoad ("http://www.web.com/my_php.php", receiveLoad, "POST" ');

    receiveLoad.onData = {function (src)}

    var messageA:Array = src.split(",,,");

    messageA.pop ();

    var xPosition:Number = 0;

    var yPosition:Number = 0;

    for (var i: Number = 0; i < messageA.length; i ++) {}

    var msgA:Array is get [i].split(",,");.

    _root.patHolder.attachMovie ("garSpecBtn1", "btn" + i, _root.patHolder.getNextHighestDepth ());

    _root.patHolder ["btn" + i] ._x = which;

    _root.patHolder ["btn" + i] ._y = PositionY;

    PositionY = PositionY + 31.0;

    _root.patHolder ["btn" + i].textBlack.text = Msgto [0];

    _root.patHolder ["btn" + i] .number_lnk = "http://www.web.com/images/" + Msgto [0] + ".png"; ""

    _root.patHolder ["btn" + i] .txtN = "pattern" + Msgto [2];

    _root.patHolder ["btn" + (i)] .onRollOver = btnOverNumber;

    }

    }

    The scroll bar should work with patHolder.

    Add a scrollpane to your stage component and assign an instance name (for example, sp).  assign the symbol from the library of patHolder a login link (for example, patHolderID).  You can then use:

    sp.contentPath = "patHolderID";
    var _root.patHolder:MovieClip = sp.content;

    var senderLoad: LoadVars = new LoadVars();

    var receiveLoad: LoadVars = new LoadVars();

    senderLoad.sendAndLoad ("http://www.web.com/my_php.php", receiveLoad, "POST");

    receiveLoad.onData = {function (src)}

    var messageA:Array = src.split(",,,");

    messageA.pop ();

    var xPosition:Number = 0;

    var yPosition:Number = 0;

    for (var i: Number = 0; i

    var msgA:Array is get [i].split(",,");.

    _root.patHolder.attachMovie ("garSpecBtn1", "btn" + i, _root.patHolder.getN extHighestDepth());

    _root.patHolder ["BTN" + i] ._x = which;

    _root.patHolder ["BTN" + i] ._y = PositionY;

    PositionY = PositionY + 31.0;

    _root.patHolder ["BTN" + i].textBlack.Text = Msgto [0];

    _root.patHolder ["BTN" + i] .number_lnk = "http://www.web.com/images/" + Msgto [0] + ".png"; ""

    _root.patHolder ["BTN" + i] .txtN = "pattern" + Msgto [2];

    _root.patHolder ["BTN" + (i)] .onRollOver = btnOverNumber;

    }

    }

  • Mathematics with three dynamic text...

    Hello!... Is my first post...

    I have three dynamic text:

    1 loading a file .txt with a number like n.nn. [T1d]
    2. being dragged as nnn.nn. [DM2]
    3. output between 1. and 2. [Dt3]

    I load the first number like loadVariablesNum ("MyFile.txt", "0"); ...

    My AS code (Dt3) output is: Dt3 = Number(Dt2.text)/Number(Dt1.text);

    The load is Ok!, but in Dt3 I just read "NaN".

    Can you help me solve this problem?...

    Thanks in advance...

    Ok!... I solved the problem by following the path:
    My .txt (rates.txt) with the following code inside:

    Quote:
    euro = 1 & dolar = 1.20 & book = 0.6825 & yen = 143.75 &

    (I use three Exchange rate).

    As a code I have:

    Quote:
    var variables: LoadVars = new LoadVars();
    variables. Load ("rates.txt");
    var euro: TextField;
    var dolar: TextField;
    var book: TextField;
    var yen: TextField;
    var totaleuro:TextField;
    var totaldolar:TextField;
    var totalpound:TextField;
    var totalyen:TextField;
    var euro_btn:Button;
    var dolar_btn:Button;
    var pound_btn:Button;
    var yen_btn:Button;
    variables.onLoad = {function (success:Boolean)}
    If (success) {}
    euro. Text = this.euro;
    dolar. Text = this.dolar;
    Pound.Text = this.pound;
    Yen.Text = this.yen;
    } else {}
    trace ("is not possible loading data");
    }
    };
    onEnterFrame = function () {}
    totaleuro. Text = String (Number (cantidad.text) * Number (euro.text));
    totaldolar. Text = String (Number (cantidad.text) * Number (dolar.text));
    totalpound. Text = String (Number (cantidad.text) * Number (pound.text));
    totalyen. Text = String (Number (cantidad.text) * Number (yen.text));
    };

    Nevertheless, thank you for your help... I have based my code in your also advises.

    Alex!.

  • Variables and dynamic text fields

    OK, so I'm a complete dunce, but I only use Flash for a few days so please be patient with me.

    All I want to do is a dynamic text field to view a variable using Actionscript. The code is below, but it won't work. Can someone please advise? I have to use LoadVars? I thought it was just for the external data.

    just a little mistake

    var myValue:String = "text to display";
    This.icon_mc.icon_txt. Text = myValue;

  • Help! loadVars ();

    I am trying to load an external txt file, which I can do as well. I then a series of roll on the buttons in a flash when animation rolled on the display of the file transferred text parts.

    at the present time the roll button returns a variable of numer (stationary)

    My problem is that the script below load everything in the text file to each dynamic text box.

    This is the script to load text:

    var vehicleinfo = "subject" + _root.hover;

    vehicleDetails = new LoadVars()
    vehicleDetails.load ("N3.txt")
    vehicleDetails.onLoad = function (success: Boolean) {}
    {if (Success)}
    var subjectNo = vehicleDetails + .under reserves ' "+ vehicleinfo;
    var subjectBaseNo = vehicleDetails + .under reserves ' "+ vehicleinfo +"basis ";
    var subjectSummary = vehicleDetails + .under reserves ' "+ vehicleinfo +"summary. "
    _root.lorry_mc.rollover.subject.text = subjectNo;
    _root.lorry_mc.rollover.base_directive. Text = subjectBaseNo;
    _root.lorry_mc.rollover.summary.text = subjectSummary;

    } else {}

    _root.lorry_mc.rollover.subject.text = "could not load the file."
    _root.lorry_mc.rollover.base_directive. Text = "could not load the file."
    _root.lorry_mc.rollover.summary.text = "could not load the file."
    }
    }

    Any help would be really appreciated!

    See you soon

    Hi thanks for your advice, it reassures me that I could do what I had to.

    It turns out however that it was the way I film script he.

    This is my solution:

  • The use of dynamic text with Actionscript

    I have a variable called "managername. My film requires data in a text document. The problem is that my flash variable name is also part of the name of the entry in the text document. Like this:

    myText_district = 109
    & myText_Ian = 189
    & myText_Dave = 8
    & myText_Ray = 14

    Y at - it a syntax that I can use in the field of the Var of the property Panel to get the variable equivalent to something like "myText"+ _root.managername? ".

    OR

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

    Any help is greatly appreciated.

    Well, you will have to wait until the content of districtmanager.txt load in. All about the right time for the file to load interent. Flash is not wait until what the code load, it just not the loadVariablsNum and then continues on the trace that there no variables (again) with the name myText_Ian or what you have.

    If you are publishing for Flash 6 or higher, you should probably use the LoadVars class. This gives you the onLoad event so you can then put your code in there and make sure that variables are loaded before you try to use them.

    Another question, is what happens when you get a new Manager? You should put in another variable and make the entire file again. That's why I think you should consider possibly develop this with XML or another way of not having to hard-code these things.

  • How can I load a. In a dynamic text box TXT file?

    I'm sure that many people know how to load a .txt file in a dynamic text box. But I did not. I want to be able to reference a txt from the server file in the text box. So that when I change the text file it changes in the flash animation without even modifying the file flash itself. Thank you.

    If you want to follow this tutorial, you should go with the LoadVars class. not loadVariablesNum()

    Linky

  • Align the text in the dynamic text using HTML box

    Hello

    I'm importing text to mysql through php, for an area of dynamic text in flash. I can't text from column 2 to align to the left. It comes out like this:
    Column 1 column 2
    James Kearns
    Mary Peterson
    Thomas Clark

    The php code I have is:
    print ("& dbpages =");
    While ($row = {mysql_fetch_array ($result, MYSQL_ASSOC))}
    Print "< table >. $row ["FirstName"]. "". "< tr > < td align = left > '." $row ['name']. "< table > < /tr > < / table >". " » \n » ;
    }

    The AS code is:

    Where database_txt is the dynamic text box.
    How can I align column 2?

    Thank you
    Paul

    Thanks for your comments.
    I used the tag to format text and solved the problem. In the PHP code I used the tab stops \t. It aligns data in Flash.
    PHP code should now be:
    Print ("& dbpages =");
    While ($row = {mysql_fetch_array ($result, MYSQL_ASSOC))}
    Print "\t".$row['first_name"]. '\t'.» $row ['name']. » \n » ;
    }

    The Flash code is now:

    var resultPages_LV:LoadVars = new LoadVars();
    resultPages_LV.onLoad = function (success: Boolean) {}
    If (success) {}
    var myformat:TextFormat = new TextFormat();
    myformat.tabStops = [20 140];
    database_txt.htmlText = true;
    database_txt.htmlText = resultPages_LV.dbpages;
    database_txt.setTextFormat (myFormat);
    }

  • How to load dynamic text inside a clip?

    Hello all - I have a main scene on the first picture where my 'home' film clip shows. I did it by drag and drop, and then I put a stop action. everything works very well.

    inside this clip of family movie on the main stage, there are links to other video clips. for example, to access my faq page - you click on this button, then it takes you to box 4 on my main stage, where the video clip of my faq (followed by stop action) was dragged/dropped and displays properly.

    in the video clip of the faq, this process is repeated, with buttons taking you different pages (different images to different video clips play - everything works fine).

    so now, I want to add a dynamic text field in the video clip of my faq. I've read many tutorials where I created the text file, but I was not able to view successfully within my video clip of FAQ.

    Here is a code that tells my tutorial dvd place me on the main stage that I practice how it works:

    var myMCL:MovieClipLoader = new MovieClipLoader ();
    var myListener:Object = new Object();

    myMCL.addListener (myListener);


    var myLV:LoadVars = new LoadVars();

    myLV.onLoad = function (success: Boolean) {}
    If (success) {}
    _level5.loadedInfo.htmlText = myLV.info;
    } else {}
    _level5.loadedInfo.text = 'there was an error loading the requested information. Please contact the site administrator. « ;
    }
    }

    and here's some code that I place on the FAQ button in my main video which brings back me to the main stage and plays faq movie clip all passed:

    on (release) {}

    GotoAndPlay MovieClip behavior
    _root.gotoAndPlay("4");
    End behavior

    }

    and finally, here is that some code that I put in my clip from movie FAQ in an attempt to display my dynamic text in the FAQ clip - so far without success:

    _level0.myLV.load("VARs/FAQs.txt");

    NOTE:
    I published this see - does not.
    I have my text FAQ starting as info = file
    I eliminated white spaces in my text file
    I use flash 8 pro

    can anyone offer some suggestions? Thank you!

    Hey clBeech - I GOT it! YAHOOO!

    Man - I've been racking my brain and took off a few days of this problem - it turns out that your second post was the answer - he just took clearing me my head to look at once again - I solved all of this as an hour ago - is the code - set 4 main Timeline frame that has worked:

    [
    Stop();
    var myLV:LoadVars = new LoadVars();

    myLV.onLoad = function (success: Boolean) {}
    If (success) {}
    _level0.mainfaqs.loadedInfo.text = myLV.info;
    } else {}
    _level0.mainfaqs.loadedInfo.text = 'there was an error loading the requested information. Please contact the site administrator. « ;
    }
    }

    myLV.load("vars/faqs.txt");

    ]

    I can't thank you enough - although this was not a BIG problem of programming, I couldn't proceed without him, and it was big for me. Thank you for taking the time to following up with me - seriously!

    now, I continue with my project - the scroll for my dynamic text buttons - everything seems to work.

    have a great weekend my friend!

  • Feild dynamic text with dynamic ScrollBar

    I have a Feild dynamic text with a dynamic scroll bar.
    It loads a file of plain ASCI text with html formatting.
    but I still can't manage to get the text to format.

    The biggest problem with the format is a large space between paragraphs.
    I don't know why, but I think that the framework must need a var to render as html.
    Can anyone help please?

    I don't understand what you're asking. But if your textfield displays extra space between paragraphs using:

    var my_lv:LoadVars = new LoadVars();
    my_lv. Our = {function (src:String)}
    If (src! = undefined) {}
    myTxtFeild.text = src.split("\n\r").join("\r").split("\r\n").join("\r");

    } else {}
    myTxtFile.text = "Error loading text.";
    }
    };
    my_lv. Load ("CadnetPage1_html.txt");

  • help needed on loadVars

    Hi all, I need help on this one.

    Here's the thing I want to create a flash application where random data are called from a text file. My problem is how to get flash to call a random data from the text file. Here's what I got so far:

    _Global.Qno = "q" + Math.round (Math.random (5)); "."

    loadVarsText = new LoadVars();
    loadVarsText.load ("quote.txt");

    loadVarsText.onLoad = {function (success)}
    If (success) {}
    dyntxt = _global.qno;
    } else {}
    trace ("empty");
    }
    };


    Here are the contents of my text file:
    and q0 = Data1 and q1 = data2

    Now when I run the application, all that I get is the name of the variable displayed on my dynamic textbox.
    If someone could help me, I would be really grateful.
    Thanks in advance.

    It should work...

Maybe you are looking for