ActionScript 2.0 :: Load Variables From A Dynamic Text Box?
Dec 14, 2008
Is possible to load variables from a dynamic text box. On the stage I have a button and 2 text boxes, One is a dynamic box called "var_box" and it contains some variables that I input without loading any text file and the second one is another dynamic text box called "output_box", now when I press the button I want that the variables from "var_box" to be loaded in the "output_box", we tried a lot of different things
View 4 Replies
Similar Posts:
Mar 28, 2012
I set up a simple dynamic text on my stage.[code]...
How do I load this valueStr to my myText.text ?
View 3 Replies
Jun 17, 2011
I'm pretty inexperienced with actionscript, and I'm having the hardest time trying to figure out how to load variables from a file and send it to a dynamic text box. The content of an external file, "varload.txt", is "name1=John". Here is actionscript of my flash file:
[Code]...
View 1 Replies
May 1, 2009
The desired affect is simple: I have a single button... with each click I want it to load text into a dynamic text field and load a corresponding picture or movieclip.There are only three unique text/image combinations- after its displayed the third, with the next click I want it to just start over. All the text functions perfectly with each click.
The problem is:I use "createEmptyMovieClip" then use the resulting clip as a loader clip.. With the first click I want a movieclip from the library to load, so I use the "attachMovie" method- it displays the first library fine.With the next click I want to load an external swf- so I call the "loadMovie" method of the loaderclip... The external swf loads just fine replacing the first library clip.The third clip is where I have problems... now I want to load another library item into the loaderclip... so I tried using the attachMovie method again but the external swf remains static... then with the next click, I discover the first library item no longer loads and the external swf remains still playing- it's like once it's been loaded into the loaderclip it cant be moved...
So I tried adding the "unloadMovie" method in the code for the third click.. it successfully removed the swf... but the next line of code immediately after the unload statement, doesn't work. The line calls the attachMovie method for the loaderclip... but the library item doesnt load... Oddly enough, with the next click, the first library item now does load as if everything's fine... It seems like you cant use the unloadMovie and attachMovie on the same executing code? if that makes any sense... the basic idea was that if I couldnt get the attachmovie method to replace the loaded external swf, then I would use the unload method to remove it, then have code immediately after, to then execute the attachMovie method... but it still doesnt load the library clip. and I know it's not a type-o, because when I comment out the loadMovie and unloadMovie statements, it loads both the library items perfectly ? The code is below
var increment:Number = 1;
var verbiage1:String = "Hello World1";
var verbiage2:String = "Hello World2";[code].............
View 2 Replies
Aug 16, 2010
AS3 newbie here finally trying to make the transition from AS2. I have a little application that I am trying to build which has some basic math in it based on user input. I have the numbers stored in dynamic text boxes and now I need to have the results shown after the user hits submit.
I have this code on the results page frame.
ActionScript Code:
var resultsmin:Number = Math.round((Number(devsize.text))*(Number(typemin.text)));
var resultsmax:Number = Math.round((Number(devsize.text))*(Number(typemax.text)));
This probably wasn't even the best way to do it in AS2 but it worked, now in AS3 it doesn't. Something to do with the way var is used now?
View 4 Replies
Apr 14, 2004
A simple input text field at the end of Scene1 then displays the user name in Scene2. How do i detect if they have filled the feild in or not, if they don't I want the resulting text be different.
View 3 Replies
Apr 14, 2004
A simple input text field at the end of Scene1 then displays the user name in Scene2. How do i detect if they have filled the feild in or not, if they don't I want the resulting text be different
View 3 Replies
Jul 17, 2009
My .txt file is called my_text.txt
Inside I have:
myText1=This is test 1.
&myText2=This is test 2.
I tested it out with my dynamic text. If I made the variable myText1, it loaded the first line. If I made it myText2, it loaded the second line. All seemed to be fine.
I have a dynamic textbox, variable named names. I want to be able to change the variable in order to get it to load whichever line of text I want.
I tried:
names = myText1;
loadVariablesNum ("my_text.txt", 0);
But that's not working. I've tried playing around with it in various ways, like
names = eval(myText1);
and such, but nothing is effectively getting it to change. I've been trying to look it up and tried all the different ways people told other people to use, but it's not working for me.
Once I get this work I everything should fall into place easily.
View 3 Replies
Oct 15, 2009
Passing Text Variabes to a form PHP script for emailing.If a user makes a number of selections from visual indicators on frame 1 of a Flash 8 file and textual descriptions of those selections are then actionscripted into dynamic text boxes as text values in a form on frame 2, can the text values of the dynamic text boxes be given variable names that can be sent to and processed by a server side PHP script as regular input type text box variables would be processed?
Example:
User selects 3 images on frame 1 via a mouse on(release) event.
the actionscript being:
on(release) {[code]....
On the form frame (frame 2) would be a movie clip (form_mc with instance name form) with the normal Name, Email, Message input type text boxes along with dynamic text boxes dynamicTextBox1, 2 and 3.On the form Submit button the actionscript would be:
on(release) {
var sendVar = new LoadVars ();
var receiveVar = new LoadVars ();[code]...........
Would this work? All indications I have seen through many Flash/PHP email tutorials indicate not using dynamic text boxes but components like combo boxes etc use variables and not input boxes.
View 10 Replies
Aug 10, 2009
I need to display a few different variables inbetween static text in a dynamic text box. In the movie the users click on pick 1 of 3 characters and 1 of 3 backgrounds. The variables are set onRelease of the button, ie
function pickname(){
if(charSelected == "char1"){
_root.textBox.CharSelectText.text = "Nutmeg";
} else if(charSelected == "char2"){ //else if
[Code]....
To display their name in a tester dynamic text field with just their name in it and no static text
Underneith the images of the characters and bg's is a sentence that gets filled out after you make your choices, ie "One day, [character name] went to the [lbackground name]."
I also need to have the character name and background name different colours from the rest of the text, is there a way to hook up a css file to give just those words different properties from the rest of the text?
View 0 Replies
Oct 20, 2009
I'm working on a pricing calculator and it is all dynamic. I have a local php server that is spitting out variables depending on the level (1,2,3,4)[code]...
View 2 Replies
May 14, 2010
Okay, here is my code which I have in the frame actions:
Code:
char_xp1 = 1000;
char_level = 1;
[code]....
View 1 Replies
Nov 6, 2010
I'm having trouble with subtracting hp (a number in a dynamic text box). There's a variable on the main timeline for hp, and I'm trying to edit this when the character takes a hit.My character has over 350 hp at the beginning, but after one hit, it goes down to something like 1 or 6, and then after the next couple hits it'll go back to something in the 100s or 200s.
I used this code to that the health off:
_root.hp = _root.hp-random(150);
View 1 Replies
Apr 29, 2011
I have read a few tutorials about adding variables to the text within a dynamic text box. However none of them work for me. I would like the box to display the Score of a game (called Score in my code, var Score:Number = 0). I can calculate the score fine, but it is not displaying in the Box. I need to load my Level Complete screen, with the text box inside. Could i do this by creating it using AS3 every time (by defining its properties in the code), or can i add it to my library (and define its properites there) and then declare an instance of it?
View 2 Replies
Jul 23, 2011
trying to make a yahtzee game but cant get it to score the 3 and 4 of a kind. I have dynamic text boxes that convert the dice to a number for scoring called result1, result2, ... How do I test to see if 3 of them match or 4 for the 4 of a kind and add the text boxes if 3 numbers match. I have a button that will start the function called score_3kind.
View 9 Replies
Oct 15, 2009
If a user makes a number of selections from visual indicators on frame 1 of a Flash 8 file and textual descriptions of those selections are then actionscripted into dynamic text boxes as text values in a form on frame 2, can the text values of the dynamic text boxes be given variable names that can be sent to and processed by a server-side PHP script as regular input type text box variables would be processed?
[Code]...
Would this work? All indications I have seen through many Flash/PHP email tutorials indicate not using dynamic text boxes but components like combo boxes etc use variables and not input boxes.
View 1 Replies
Nov 17, 2010
I have a PHP file which is correctly pulling records from a SQL database. What I need to do is place each new record into a new text box. I understand that I need to assign a variable to each record as it comes through the PHP file and that Flash needs to know which variable to assign to which text box. So, in that respect I have added a counter to the PHP script (it is performing correctly)
[Code]....
View 1 Replies
Aug 13, 2006
I am trying to load variables from a text file and having a problem. i am using this code,
[Code]...
I am sure this is something simple, but have no idea what,
View 1 Replies
Sep 26, 2007
im trying to use the following code to load variables from a text file (and later a php file). The code is meant to put a movie clip called mcLoading to show that the text is on the way, and then fade the text in and show it on the stage. The whole code block is inside the constructor of a class.
[code].....
View 1 Replies
May 11, 2003
Is there any way to make line breaks when you load text into a dynamic text box, other than using html? And if not, could someone give me an example of how to do it using html?
View 12 Replies
Oct 8, 2011
So I'm loading text from an external file I've uploaded onto the internet. It loads absolutely fine when I test the movie from my computer, but when I upload it and embed it onto an html page, all of the dynamic text refuses to load. Can someone enlighten me as to what's going on? Or at least tell me how to fix it? XD;
[Code]...
View 9 Replies
Nov 18, 2010
I am at work right now trying to create a power point for our Christmas party. I know I can do so much more with Flash than I can with any other power point program. Right now, I'm trying to figure out a way to load a list of names into one dynamic text field that changes at certain time intervals. I'm using ActionScript 2 right now b/c I haven't learned 3, yet. Is there a way for Flash to access a word document and load a name say, every minute? I know I could add a different variable name in front of each employee name, like content, content1, content2, but I have a list of like 300 names here. That would take up almost as much time as it would creating a slide for each name in Power Point.
View 2 Replies
Sep 15, 2011
I have a question regarding ActionScript 3.0 and using buttons to change numeric values in a Flash project. I am trying to create a program that adds and subtracts numbers when buttons are clicked. Here is the code that I have written for the first button that I want to use:
Code:
//Number values//
var withdraw = 0;
Amount_total.text = withdraw;
[Code]....
However the problem I have is that the K200disp text only displays 1,2,5,10,15 etc while the Amount_total text seems to randomly display 200 or lots of 0s!
View 9 Replies
Jan 13, 2010
I'm using Flash 8 and I'm trying to load new text into a dynamic text box already populated by a xml file.
I have a home page with 5 different buttons on the top menu.
1. Home
2. News
3. Tips
and a few more.
Upon my home page loading, I have a dynamic text box with the welcome text which is populated by my xml file, here is my code for AS2:
function loadXML(loaded) {
if (loaded) {
_root.home = this.firstChild.childNodes[0].childNodes[0];
_root.tips = this.firstChild.childNodes[1].childNodes[0];
[Code].....
What I want to do is load the news and tips text into the same dynamic text box on the home page when the news or tips button is clicked, so I don't have to load a whole new swf for each category thus making the site faster.
What code would I have to use to clear the text from the xml file and how would I load my new text upon clicking the button?
View 0 Replies
Jun 1, 2010
I cant load and external text file into my dynamic text box...when i trace the loaded var it can be found, but when it's loaded inside the text box, the value that appears is really strange.i tried to load the vars into the MC and on a level, the result is the same, it can be traced but does not appear correctly on the textbox..the code i used is here..i made a text box with about_us instance name, loaded the variables and tried to load my text inside it by setting the text property of the textbox but as u will see...
loadVariables("about.txt", "this");
about_us.text = about;
View 3 Replies
Mar 29, 2004
am setting up a webpage with Flash MX. On the homepage I have a dynamic text box with links to the left (currently the links are just typed words). We want it to setup so that when a user clicks a link (such as "HOME") it will access text from a .txt file and load it into the dynamic text box. We want all of the links ("HOME", "PERSONNEL", "RECRUITS", "CONTACT US") to load their text from a seperate .txt file into that same dynamic text box.
[Code]...
View 4 Replies
Jan 18, 2005
When a user enters the website, it will pull text from some location (possibly an XML file) and load it into a text field. The trick is that I want it to randomly load a different chunk of text in each time the user opens the site. There are about 25 different small pieces of text I want to randomly load.
I'm thinking of using XML to store the 25 different text sentences, but am open to other ideas.
View 2 Replies
Oct 17, 2006
I am trying to have a dynamic text field that will load English text. using
Code:
loadVariables("content/english/text.txt.", this);
I want to have a button that on user click it would change the loaded text to spanish lets say or german.
View 4 Replies
Oct 18, 2007
I need text to be displayed with some movie clips or smileys with it in dynamic text box. Like the below but when i tried to do this i am getting some thing like this it is registering with left or right only. how to rectify it? I am using html output for attaching the clip with text for output
View 4 Replies
May 11, 2004
How can i load variables from a matrix within a text file?
for example the text file is copy.txt with the following text:
&p[13][14]=12
View 4 Replies