IDE :: Cannot Use LoadVariablesNum Variables Outside Of Textboxes?
Feb 15, 2010
Does anybody know any reason why I can't use variables loaded from a text file using loadVariablesNum anywhere but in the Var field of a text box? If I try this:
The loadVariablesNum ("textfile.txt",0);it loads the textvariable1=3.14159&variable2=cowfrom the text file, and if I make 2 dynamic text boxes with the Var parameter as variable1 and variable2, they'd have "3.14159" and "cow" show up in them when I run the script. So I know that the textfile is being read and the variables are being loaded.But if I try newvar1=variable1;newvar2=variable2;in my code, and then put newvar1 and newvar2 in my textbbox Var, I get nothing in them. I should be able to assign the newvar variable the same value as variable1, but I can't. trace (variable1);should output the text "3.14159" when run, but it displays "undefined" every time.Every site I have been to says I should be able to access my loaded variable values simply by using variable1, or _root.variable1, or _level0.variable1, but none of these work any differently.
I can assign an instance name to the textbox and then assign a value to that instance name, and if I do that, assuming the instance name is "box")
[Code]...
View 3 Replies
Similar Posts:
Nov 15, 2004
I'd like to know if there is a way of controlling the variables that are sent with the AS command loadVariablesNum when calling an ASP.Let's say I don't want to send two variables that exist in that frame.
View 2 Replies
Nov 15, 2004
I'd like to know if there is a way of controlling the variables that are sent with the AS command loadVariablesNum when calling an ASP.Let's say I don't want to send two variables that exist in that frame.
View 2 Replies
Oct 19, 2010
(and wondering if it's somethin completely unrelated that i'm missing as i can't see how this would have any effect on loadVariablesNum!)
View 3 Replies
Apr 29, 2011
loadVariablesNum("script.php", 0, "POST");
That won't work. Could the error be that it's in a movie clip? Or is the script just wrong?
View 8 Replies
Feb 8, 2003
When I was working with a txt file locally I used this command
file = new LoadVars();
fileURL = "PhoneBook.txt";
file.load(fileURL);
[code].....
View 7 Replies
Feb 13, 2006
I have this script for flash player 6.. [kirupa tutorials][code]this is working fine in flash player 6.. but doesn't work in flash player 8.. so the question is how to rewrite loadVariablesNum so it would work?
View 1 Replies
May 7, 2004
i'm loading a txt file with loadVariablesNum, which contains : a=1 or, when I try : trace(a) is says : undefined or, when I define a dynamique txt filed and in the properties / var I put the variable a from the txt file : it publishs : 1 so, I can read the variable or I cant use it !
View 5 Replies
May 20, 2004
loadVariablesNum("script.php", 0, "POST"); That won't work. Could the error be that it's in a movie clip? Or is the script just wrong?
View 6 Replies
Jan 23, 2006
I'm trying to make some sort of a GuestBook. I'm using one from flashkit. It's working ok but I need to put the hole thing inside of a movie clip. That's where my problems come out.It's just refusing to load my GuestBook.php.Here's the code for loading variables:
NumLow = 0;
NumHigh = 10;
loadVariablesNum ("GuestBook.php?NumLow="+NumLow+"&NumHigh="+NumHig h+"&R="+random(999),
[code].....
View 3 Replies
May 20, 2004
loadVariablesNum("script.php", 0, "POST"); That won't work. Could the error be that it's in a movie clip? Or is the script just wrong?
View 6 Replies
Sep 12, 2009
Everything works fine when I'm testing it locally and sending the variables to the live PHP file online, but as soon as I upload it, everything just kinda goes to hell and nothing gets sent through. I know Flash just changed its security settings to not allow loading from external sources, but I wouldn't think that would make a difference since everything (including the PHP file) is under the same domain. I've put the crossdomain.xml file in there, as well, but still to no avail. My code to send things is pretty simple:
ActionScript Code:
loadVariablesNum("mailto.php"+"?name="+name+"&email="+email+"&message="+message+"&to="+to+"&recipient="+recipient, 0, "POST");
View 1 Replies
Jul 8, 2004
I'm making a game and I need to load variables into my flash movie from a database. I'm using asp and I know it works fine because it outputs what I want. My problem is that when I try to load the data into flash, it won't let me use the variables. If I put a dynamic textfield on the stage with fname (one of my variables), the text field displays the correct data, but when I say trace (fname) with having the text field, "undefined" pops up.
View 5 Replies
Jan 23, 2005
why my MC actionscript with loadVariablesNum("submit.php", 0, "POST"); don't wanna work if I loaded into other _level...
If i don't loaded it work well... but not useful
View 5 Replies
Mar 12, 2003
I've got a question about the path of the txt fileI can easily load a txt file in a movie if the txt is in the same folder as de .swf, but when i try to load a txt file from a different levelfor Example projects/com/1.txt i dīn't see any txtthe code is:loadVariablesNum(projects/com/1.txt,0) i know the code is wrong, but can somebody tell me what i have to do to get a txt form a different level.
View 1 Replies
Nov 6, 2003
I have several cutomized checkbox that it can be selected or deselect and I have a button to determine which of the checkboxes is selected, and throught this button I passed the variable to loadVariablesNum corresponding to which of the checkboxes is selected
code in the button to determine which of the checkboxes is selected:
if (chk1.mark1._visible = true){ //trace("31"); loadVariablesNum("http://url?uid="+_root.uid+"&ans=31", 2); if
[code].....
View 3 Replies
May 7, 2004
I'm using flashmx and my problem is: i'm loading a txt file with loadVariablesNum, which contains : a=1 or, when I try : trace(a) is says : undefined or, when I define a dynamique txt filed and in the properties / var I put the variable a from the txt file: it publishs : 1 so, I can read the variable or I cant use it
[Code]...
View 5 Replies
Nov 18, 2009
I have several cutomized checkbox that it can be selected or deselect and I have a button to determine which of the checkboxes is selected, and throught this button I passed the variable to loadVariablesNum corresponding to which of the checkboxes is selected.
[Code]...
View 3 Replies
Mar 24, 2010
Greetings: I've used this method many times in the past to create an email form in a movie clip with a "send button" that accesses a perl, cgi script to email text input fields. It worked fine in past versions of Flash, but now I'm using Flash CS3 (v9.0, AS 2.0). I've tried 3 different cgi scripts I found online for this purpose and am sure the configurations for sendmail server & perl bins, etc are correct. All of the other "if" and "else" statements on the button work fine. But I can see a Safari (browser) error message saying POST was not used, but clearly it is. I'm trying to trouble shoot whether the problem is from the flash button or the cgi script. Has something changed in Flash CS3 from previous versions, where I'm certain it has worked before???
[Code]...
View 3 Replies
Apr 23, 2005
I'm importing external vars using loadVariablesNum() from .txt files. I know that each variable must be surrounded by amperstands (&) in order define the start and end of each variable.
ie:
Code:
&var_1=abc&
&var_2=xyz&
And then I want to use something like:
[AS]mc.gotoAndPlay(_level#.var_1);[/AS]
But my question is (for simplicity), is there a way to do this if the amperstand at the end is not included, such as:
ie:
Code:
&var_1=abc
&var_2=xyz
Flash returns the first variable above as var_01="abc " which is understandable since it was not closed properly. However, I want to be able to use the gotoAndPlay(); with var_01="abc ". I have tried labelling the frame with abc , but that didn't work.
I also tried using frame_array = new Array(_level#.var_1.split("")); and then said gotoAndPlay(frame_array[0]); but for some reason I couldn't get this to work either....
View 2 Replies
Jan 29, 2010
i have a textbox (totaltxt) within a movieclip (link_mc) which is on frame1, and i am trying to access the contents of totaltxt and put it in another textbox called totalround1 in frame2...e.g. if totaltxt = 100 then totalround1 should equal 100 aswellthis is my failed attempt:PHP Code:totalround1.text = Number(link_mc.totaltxt.text);
View 1 Replies
Nov 26, 2010
I am trying to use arrays with textboxes. What I initially wanted to do was have 3 textboxes ( a, b and c) and when the user inputs information into the textboxes:
Textbox A: Tea
Textbox B: Coffee
Textbox c: Softdrink
It stores the information into an array that I can later view and call upon these strings inputted into the array.
View 4 Replies
Sep 7, 2004
I have been designing dynamic pages with Flash and I can't seem to apply effects such as simple motion tweens and alpha effects to it
View 3 Replies
Sep 4, 2002
I made a simpletext file and used the loadVariablesNum() script in flash to call that file into dynamic text boxes within my flash piece. that's all fine and dandy but now the problem is that I don't know how to make links in that simpletext document to link to specific parts of my flash movie. Basically, I need the simpletext document to have words that you can click that will take you to another frame that has another dynamic box in it with more text.
View 4 Replies
Nov 28, 2009
I have created some input text boxes using AS3. For starters, unless I set the text in the code to = " " you can't type in them. Secondly if I click on each box individually I can type in them. However if I tab through them I can't. Here is a link to the site I'm working on. I'm referring to the calendar / bookings form on the first page. To see the form just click on a date after today. [URL].
View 3 Replies
Jan 24, 2012
I had an onEnterFrame script that would make a cypher of some letters for you. I thought it would be great if I could wrap the code in a function so I could apply it to multiple textboxes at once. Since doing it (wrong!) it only actually does what its supposed to on one of the textboxes. What am I doing wrong?
To make this work you'll need a two textboxes, one with an instance name of text_one and one called text_two
Actionscript Code:
// The String that will reveal itselfcypher_characters("text_one", 10, 5, 2, text_one);cypher_characters("text_two", 10, 5, 2, text_two);function cypher_characters(characters, time_until_start, time_between, frequency,
[Code].....
View 2 Replies
Aug 2, 2010
The following code are used to generate textboxes for my game, but I couldn't remove all of them by using removeChild. Is there a way to remove them?[code]...
View 2 Replies
Oct 18, 2010
i have a code which i manage to load the xml into an xmlList. What i want to do, and having problems with is sorting out the different nodes inside the xml, so that i can display them in their individual textBox. At this point i am displaying some information in one textbox, but i think i need to change that and go in a different direction. Could anyone have a look at my codeps: i removed the url from the URLRequest cause i wasnt allowed to post links.
Code:
var loader:URLLoader = new URLLoader();
loader.addEventListener(Event.COMPLETE, onLoaded);
[code]......
View 0 Replies
Mar 15, 2005
Any quick way to check a dynamic textbox to see if it has text is there a function to do it?
View 4 Replies
Sep 5, 2007
I have two input text boxes. I need to enter a number (1900) into the first box then hit the 'Enter' button, then enter a number (50) into the second box right below the first.
After the 'Enter' button is pressed it needs to lock-in the required value, by selectable = false.
My problem is...I can get the first number to work. I type in the number, press 'Enter', it changes the textbox value to selectable = false...everything is good for that part.
But the second number is where I am having trouble, it seems the function is called, but that's it...nothing else happens.
View 5 Replies