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




This LoadVariablesNum Wont Work



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 Complete Forum Thread with Replies

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

Can't Get LoadVariablesNum To Work
I have this very simple actionscript:
--
loadVariables("Cat2.txt",0);
trace(cat);
--

and this very simple text file (created using notepad) in the same directory as the .fla named "Cat2.txt":
---
cat=me
----

and yet the output is not "me" as I would expect but
"_level0.cat".

I have also tried the text file
---
&cat=me
----

I have also tried declaring the variable in the actionscript:
--
var cat;
loadVariables("Cat2.txt",0);
trace(cat);
----

I have also tried changing the input text file name to all upper or all lower case.

Nothing changed the output and I am very frustrated. I am using the trial MX version, if that makes any difference. I would be grateful for any help or suggestions.

Thanks,
Lisa

This LoadVariablesNum Wont Work
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?

LoadVariablesNum Doesn't Work Sometimes?
Sometimes my loadVariablesNum code doesn't seem to work. Usually it works on high-speed and usually it doesn't work on dial-up.

Why? What can I do to make it always work?

Here's the code:

On successive frames in the first loop that loops quite a few times are:

loadVariablesNum(_root.text_file, 1);
_level1.pass_dynamic_text = _level1.dynamic_text;
_root.save_dynamic_text = _level1.pass_dynamic_text;
_level0.displaytext = _root.save_dynamic_text;

On successive frames in the final loop that loops forever are:

_level1.pass_dynamic_text = _level1.dynamic_text;
_root.save_dynamic_text = _level1.pass_dynamic_text;
_level0.displaytext = _root.save_dynamic_text;

So what could cause the text to not make it to the screen sometimes?

LoadVariablesNum Doesn't Work Within MC..
Hello everybody.. [maybe this shoud be moved to Server Side part of a forum]

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), 0);
stop();

I was trying to give a mc instance name and do it like _root.mc.loadVar... but no luck.. thanx for any help..

LoadVariablesNum Doesn't Work Sometimes?
Sometimes my loadVariablesNum code doesn't seem to work. Usually it works on high-speed and usually it doesn't work on dial-up.

Why? What can I do to make it always work?

Here's the code:

On successive frames in the first loop that loops quite a few times are:

loadVariablesNum(_root.text_file, 1);
_level1.pass_dynamic_text = _level1.dynamic_text;
_root.save_dynamic_text = _level1.pass_dynamic_text;
_level0.displaytext = _root.save_dynamic_text;

On successive frames in the final loop that loops forever are:

_level1.pass_dynamic_text = _level1.dynamic_text;
_root.save_dynamic_text = _level1.pass_dynamic_text;
_level0.displaytext = _root.save_dynamic_text;

So what could cause the text to not make it to the screen sometimes?

Arrgh LoadVariablesNum With Goto's Won't Work..
OK, I have a very simple movie here - just 3 frames:

Frame 1's Actions:

CheckLog = "thkkette";
gotoAndPlay (2);
loadVariablesNum ("demo.txt", "0");



Frame 2's Actions:

if (CheckLog == "barracuda") {
gotoAndPlay (3);
} else {
gotoAndPlay (2);
}


Frame 3's Actions:

if (CheckLog eq "barracuda") {
snake = CheckLog;
} else {
snake = "CheckLog is not equal to barracuda";
}
stop ();

(snake is a dynamic text field in frame 3)



Contents of demo.txt:

Status=How+Annoying+Is+This?&CheckLog=evil



So frame 3 should never be reached, right? CheckLog is only ever assigned at the start frame 1 (with the value "thkkette") and by loadVariablesNum (with the value "evil"). Therefore CheckLog is never equal to "barracuda" and so we should never go to frame 3..

BUT WE DO!!!!
EVERY TIME!!!!

please tell me what's going on! I'm trying to write a simple login script and this problem is stopping me dead in my tracks...

cheers,

Darkwhiteorange

Why LoadVariablesNum Doesn't Work On Netscape For Linux?
Why loadVariablesNum and any declaration of variables don't work on Netscape for Linux?
I need it to call a CGI and give back the values to flash.

Help me, please!!!

LoadVariablesNum Is Server Sensitive? My Email Form Wont Work
Hello,
I use an email form i got from a tutorial here, i got it to work once with loadVariablesNum, but only on one server.. 2 other servers dont allow it to happen, right now it is using a ASP backend..

I tested the code with a getURL and it worked, any ideas how to make this work, this is my code on my form button


Code:
on (release) {
if (!email.length || email.indexOf("@") == -1 || email.indexOf(".") == -1) {
EmailStatus = "Please enter a valid E-mail address";
}
else if (!name.length) {
EmailStatus = "Please enter your name";
}
else {
loadVariablesNum("http://www.disneypromotions.com/sendmailJB.asp", "0", "POST");
EmailStatus = "Sending... one Moment ..";
gotoAndPlay(2);
}
}

LoadVariablesNum(URL,0,"POST") Doesnt Work With CFM Pages
Hi all,

We are working towards making a Flash course AICC compliant. The LMS seems to use Cold fusion as the URL to which we are posting is a CFM page.

I am using the following command inside a movie clip which contains the required variables and values
loadVariablesNum(_parent.str_URL,0,"POST");

_parent.str_URL contains the path in it i.e. something like http://www.abc.com/xyz/data.cfm

The data doesn't seem to get posted to the server. Should there be any care that needs to be taken in the .CFM files i.e. any code to be added. And what is the code that is to be added in the .CFM files for it to send back variables and values to Flash after the posting is done.

Just to say that it is a bit urgent.

With warm regards,

Pavan Kishore K. S.

LoadVariablesNum(URL,0,"POST") Doesnt Work With CFM Pages
Hi all,

We are working towards making a Flash course AICC compliant. The LMS seems to use Cold fusion as the URL to which we are posting is a CFM page.

I am using the following command inside a movie clip which contains the required variables and values
loadVariablesNum(_parent.str_URL,0,"POST");

_parent.str_URL contains the path in it i.e. something like http://www.abc.com/xyz/data.cfm

The data doesn't seem to get posted to the server. Should there be any care that needs to be taken in the .CFM files i.e. any code to be added. And what is the code that is to be added in the .CFM files for it to send back variables and values to Flash after the posting is done.

Just to say that it is a bit urgent.

With warm regards,

Pavan Kishore K. S.

LoadvariablesNum?
need help!

Im loading variables from a .txt in me first frame.

the variables are easily traced in the second frame, but not in the first. What is this?? I loaded them in the first!!

Thank you for helping!

/marcus

LoadvariablesNum To Thanks
Hi! I've got the form working, and I'm in love with PHP! But, and there' s always one of those, while the submit button sends the form variables to the right place, the next command is to take the user to a thank you page, which it is failing to do. here's the actionscripting:

on (release) {
loadVariablesNum ("benzMailPHP.php", "0", "GET");
gotoAndStop ("thank you", 1);
}

here's the site:

http://www.ernstbenz.com/benzsite.html

thanks

LoadVariablesNum
Hi, i am having problems with the if statment.
on (release) {
if (whatgoes here?) {
loadVariablesNum ("http://www.blahblah.com", 0);
gotoAndStop ("home");
} else {
info = "please check your details and try again";
}
}

I have this problem where by i am trying to send variables, however if one of the variables is blank, i have a variable saying " please check your details and try again " how do i make this active? at the moment the variables are being sent even if some of them are not filled in? please help
[Edited by tupac4eva on 09-26-2001 at 07:17 AM]

LoadVariablesNum....
Hello!

I can't load a *.txt - File, with this expression:
LoadVariablesNum("../cgi-bin/etc.", 0);
But the path is 100% right, and the file is on the same server as my *.swf - File, what's wrong?

If I copy the .txt - File in the same directory as the swf -File and if I change the filepath, everything is allright.

Thank You

Mfg
FlashNiete

LoadVariablesNum
Hi,

I have a “load variables” question.
Is it possible, to load variables from the local disk?

What I mean is: I am testing my MC. And I have on frame2 the action
loadVariablesNum ("text.txt", 0);
Do this action (loadVariablesNum) work also LOCAL (for testing) or must I put the “swf” and the txt file to the web????

Thanks
David

LoadVariablesNum
Hi,

I have a “load variables” question.
Is it possible, to load variables from the local disk?

What I mean is: I am testing my MC. And I have on frame2 the action
loadVariablesNum ("text.txt", 0);
Do this action (loadVariablesNum) work also LOCAL (for testing) or must I put the “swf” and the txt file to the web????

Thanks
David

LoadVariablesNum
I am trying to load a number from a textfile into a movieclip and I've put the following actionscript in frame 1 of my movieclip

var count = loadVariablesNum("puppycount.txt", 0);

the textfile is in the same directory as the movie
why won't this work???

thanks

LoadVariablesNum HELP
Why don't I ever make it to frame 3? It always stops on 2.
Please someone help!

Frame 1:
loadVariablesNum("test.asp", 0, "GET");

Frame 2:
if (tmpUserName == "test"){
tmpUserName = "fubar";
gotoAndStop(3);
} else {
tmpUserName = "Did Not Get It";
stop();
}

Frame 3:
stop();

test.asp:
<%
Response.Write "tmpUserName=" & Server.URLEncode("test")
%>

LoadVariablesNum
What am i doing wrong


tekst.txt : variab1=hello+world

loadVariablesNum("tekst.txt", 0);

variab2 = variab1;

Now variab2 is empty !!!! what am i doing wrong ! i also can't use variab anywhere in my flashmovie except the textbox on the root movie!

LoadVariablesNum?
Will I run into problems using the loadVariablesNum Action in the fashion below.

loadVariablesNum("http://www.newstoday.com/v1/text/homeIntroduction.txt", 0);
loadVariablesNum("http://www.newstoday.com/v1/text/homeIntroduction_Headline.txt",0);

What I think could be a problem is that I’m loading the text variables into the same level.

It seems to work in my current tests but I’m not positive as to why. Shouldn’t the second text files replace the first in the same level. Perhaps it works because the in dynamic text box has its variable already declared and in the text file the variable is assigned as well. So the info gets put away before the second text file comes in to replace it on the level. Or can the two variables coexist on the same level?

Thanks

LoadVariablesNum
hello-
I'm just now upgrading to actionscript in MX and have been using a great book called From the Source, Actionscripting advanced by Derek Franklin,

But as I read, he mentions the book was written with the beta version so I'm wondering if something has changed with using the LoadVariablesNum

Offline, my test works but online at two different servers I can get an external text file which contains a variable to load.

I've used both absolute and relative urls as below:

loadVariablesNum("http://www.johnsoncreativegroup.com/mxtest/recipe.txt", 0);

a few frames later, I use:
recipeBox.text = recipe;

The instance of the textbox object is named properly and again, everything works offline, but I can't figure why it doesn't online.

I have a jpeg photo that get's loaded into a placeholder movieclip right next to the dynamic text box and that always works, so I know it isn't a Flash 6 plug-in issue.

Is there some new parameters or syntax I'm missing?

The text files are simple text files and use:
&recipe=peanuts and eggs... etc

I'm vexed!

LoadVariablesNum
can i use loadVariablesNum in MC and the variable from the txt file is transferred to be a variable of the MC.


ray chan

LoadVariablesNum Into Swf
hi !

So, I'm using adapting a php mailer form in a contact_area.swf which loads in from the main.swf my problem is this:

the form works fine and sends the message from the form to the "webmaster" but on the users end the confimation message
never arrives it pauses a "wait" label although the message has been sent.

I think it could be a loadVariablesNum problem the script goes like
this:

//on keyframe
loadVariablesNum(mailform, 0);
answer = confirm;

//on next keyframe
if (answer != confirm) {
gotoAndPlay ("done");
}


does this make a differnce if the swf. containing the form is loaded into the mainmovie?


thankyou

LoadVariablesNum
im making a small flash/php/mysql chat application and im having jus a smal prob, when flash loads the variables using the LoadVariablesNum, if there's somewhere in the value of the loades variables a "&" then it takes the "&" as if its saying "read next variable", is there a way to make it where the "&" is read as a value not as a "next var" ????

HELP LoadVariablesNum
I've been pulling my hair out with this one all day.

I'm trying to get variables from a database through ASP, but Flash MX 2004 never gets them. When I run the ASP file in my browser all the variables come in fine. Just can't get it into flash.

Here's what I'm doing...

loadVariablesNum("http://ss-appsvr/technology/SS_Images.asp", 0, "POST");

What the heck am I missing?

LoadVariablesNum
On the page here. I have used loadVariablesNum action in the section Ask Me. Now when the even occurs i.e. the submit button is presses, loadVariablesNum doesn't work. Note that it works fine on pc but after loading it gets kinda disabled. Any help?

LoadVariablesNum()
I have used a loadVariablesNum action in my movie for a form. Now on the PC it works fine and well without any problem and even within the browser, but after uploading on the server, it sucks and does nothing sort of loading variables. Any suggestions?

Loadvariablesnum
If I load the "m" variable from a text file(loadvariablesnum("data.txt",0)) I can put it in a dinamic text field but if I use
trace(m) in says undefined
and I want to use the m variable in a for
loadvariablesnum("data.txt",0)
for(i=0;i<m;i++)

Loadvariablesnum
If I load the "m" variable from a text file(loadvariablesnum("data.txt",0)) I can put it in a dinamic text field but if I use
trace(m) in says undefined
and I want to use the m variable in a for
loadvariablesnum("data.txt",0)
for(i=0;i<m;i++)

LoadVariablesNum
loadVariablesNum - can someone explain to me what this means??

I have a form connected to a php script (email directed to myself) which I receive but the fields are blank.

The instance names of the input text boxes correspond with the php but the email I receive is simply this:

From: , , , ,

What am I doing WRONG???

Action for submit button is

on (release) {
loadVariablesNum ("process2.php4", 0, "POST");
gotoAndStop ("2");
}

LoadvariablesNum?
Ill try to explain as best as I can...!!

I have a main Movie called "index.swf" in that is an empty movie clip called "loader".

another movie called "content.swf" gets loaded into the "loader" movieclip. so far so good....

Within "content.swf" there is a dynamic text box that gets it information from a text file...variable called "news"...

It all works If I play just "content.swf", but the text doesnt load when I play "index.swf"?

The code in the 1st frame of content.swf is:

loadVariablesNum("news.txt",0);

Is this a level thing? I tries level 1, but no luck?

Any help appreciated,

Thanks

LoadVariablesNum
ok anyone know why this code doesn't work when published as flash7 but does as flash5??

I have this code on a keyfame, and in the same folder as the published file I have my text file - urls.txt

loadVariablesNum("urls.txt", level0);

when i am using getURL to call a web page I am passing in a variable from my text file.

its works fine when i publish it as flash5 but does nothing as flash7

any clues??

i'm using a flash MX2004 pro on a PC

Cheers
B

LoadVariablesNum Help
Hi I am having a problem with the loadVariablesNum command - I thought
that it took any varibles in the project and would put take them where
you tell it, no matter where they are located (root, in clips, etc..)
but as you can tell in the code below(_parent) I have a movie clip that
has the button in it because it does a little animation. I have tried
to use _parent.loadVariablesNum too but that doesnt work either, I just
get the emails with blank answers. I have used this code many times
but not from a movie clip seperate from the text boxes.


Here is the code:


on (release) {
if ((_parent.txtemail.indexOf("@"*) != -1) &&
(_parent.txtemail.indexOf(".") != -1) && (length(_parent.txtemail)>5))
{
_global.mcnabb = 5


} else {
}
}


on (release) {
if (_parent.txtname != null && _parent.txtemail != null &&
_parent.txtmessage != null and _global.mcnabb == 5) {
loadVariablesNum("contactgener*al.asp", 0, "POST");
gotoAndPlay("valid");
} else {
gotoAndPlay("invalid");
}


}


Any ideas on what im doing wrong?

I Am Using LoadVariablesNum
--------------------------------------------------------------------------------

Dear All,

I am using LoadVariablesNum("chat2.txt", 0) to load the content of the text file [ chat2.txt ] and displaying it on the Text Box with the name scrollField. Now i am able to display text as it is in the Text Box no problems.

How can I display Smilies [ Images ] inside the Text Box?

The following will be the sample content of the file chat2.txt

scrollField=<p>karthik: hello how are you?
<p>john: I am fine thank you "img src=smile.gif".
<p>karthik: Thats very nice to hear "img src=smile.gif".
<p>john: did you see the news paper today.
<p>karthik: No i didnt. Whats so special.

Now this text box doesnt recogonize tag. What shall i do here.

Now I am not an expert on flash so could you give me some suggestion on how to make this possible.

Any help regarding this would be greatly appreciated.

Have a great day.

Help With LoadVariablesNum
I have a quick question. Is there an opposite of loadVariablesNum? Something like unloadVariablesNum? Like if I load a text file and then would like to unload it later on (without loading another file into the same level) how would I do that? Thanks!

LoadVariablesNum
Code:
loadVariablesNum ("text.htm", 0);

This code worked great in AS2. It would get variables from text.htm.

Would someone be able to demonstrate how this now works in AS3?

LoadVariablesNum And .asp
I have used Flash for a few years, but not enough to be dangerous, so I consider myself a newbie.

A while ago I had a flash app (that worked) that had the following code in a button:

on (release) {
loadVariables("post.asp", "", "POST");
}

The post.asp would either return "go=true" or "go=false", so my variable "go" would get the value passed. I am currently using Flash MX and this code does not seem to work anymore. I know it is not the .asp code that is the problem. I even changed the .asp file to 1 line code:

<% response.write("go=true") %>

And I still can't get this to work. Can anyone help?

Thanks,
Mark

[CS3] LoadVariablesNum Help
Hey guys, I just signed in and it says the last time I visited was back in 2003 wow been a long time.

Anyway, I have a question and maybe one of you can help me out. I did a search before posting and really didnt find anything that helps.

I am developing a site for a guy See it here

and he wants to use the flash map you see there.

Ok now this swf file loads a file called stateLinks.txt. This text file has a link for every state. All I have to do is create the appropriate page and put it in the txt file.

Everything is working fine except for one thing. If you click on the state of Arizona, it opend the appropriate page in a new window.

What I would like to know is what do I need to do to get it to open in the same window?

This is what my action looks like:


Code:
loadVariablesNum ("/wp-content/themes/Vybe/stateLinks.txt", 0);
any help you can provide is greatly appreciated

LoadVariablesNum
Ok, maybe if I ask this question, it may solve my problem.

I have two sets of dynamic textboxes.

Bot sets read from a text file this way....

loadVariablesNum("myfile.txt", 0);

I need both sets to read independently.

That is, if one condition is met, set 1 will show the text and set 2 will not.

I do not want to duplicate text files or put a black box over a set of boxes to simply hide them.

How can this be done?

Thanks,

'%' Ignored When Using LoadVariablesNum
I am trying to load some body text which is in a .txt file, for example the text in this file is like follows: "myText=THIS IS 100%".

This is then being loaded into a dynamic text field. The text in this field is "THIS IS 100" and it will not load in the % symbol. The text field in my flash is embeded, im embedding 'Punctuation' and specifically saying '%' to be on the safe side.

The problem is flash does not seem to be able to do this, I have tried writing the text in the .txt document like "myTest=THIS IS 100\%" but it still cannot be seen.

Any ideas??

LoadVariablesNum Does Something Odd
Hello All,
When I use this:
loadVariablesNum("portfolioitem.php", 0);
It loads the php (which is just a text file for testing purposes) with no problem.

But when I use this:
loadVariablesNum(["portfolioitem.php?dummyVar="+random(2100)], 0);

Even though the expression resolves properly, I get an error and Flash doesn't load the text file anymore:

Error opening URL "file:///E|/clients/pathname/portfolioitem.php?dummyVar=1823"

Any ideas?
Thank you

LoadVariablesNum..
Okay, this is the deal, I have a the function, loadVariablesNum(); in my movie, and for some reason, when you refresh, the variable, on my site doesn't change, although it should. It's a live hits counter. Now, when I view the movie in flash, on my computer it works perfectly, just the way I want it, but when I upload it to my site, if I refresh the variable doesn't change, even though it should, the counter isn't live, and to add on, it only changes when you exit out of the current window, and open a new one, but it still won't change if you refresh in that new window..This is all so confusing, anyone have any solutions, or reasoning behing my .swf file's flaw? Thanks in advance!

LoadVariablesNum
Hi everybody, fusionwebstudio again.

I am using

on (release)
{
loadVariablesNum("http://www.garrapinadas-del-rey.com/fla_email.cfm", 0, "POST");
gotoAndStop("sent");
}
in order to send the info from a form into a cfm file located on an external server.
This form is on a Flash Projector application. I don't know if it is possible to do this. If not, anybody knows how to send an email from a Flash Projector application using ColdFusion?

Thanks

FusionWebStudio

LoadVariablesNum
Im using the following line of code:

loadVariablesNum("http://myserver/file.jsp", 1, "POST");

The variables are sent with no problem.

The only thing is the browser opens a new window when the variables are sent.

How do I stop the new window from opening?

Thanks for any help.

Yoogie8

LoadVariablesNum
Hi,

I have seen numerous forums on this topic but have a different problem,

A Background
I have a SWF that has more info buttons that calls-up a new window with pre-entered text. As we wish to have more
than one button we would like to use external text files so that we can have many different buttons but one popup window
in our SWF.

B Text file
File name
mytext.txt
Text file content
my_text=I want to see this text in my popup
text, second line
text, third line
&fName=peter&
&lName=pumkin eater&
&age=44-1&
&done=yes&

Action code
// attach the variables to level 0
loadVariablesNum("mytext.txt", 0);
// use a loop to preload the variables
this.onEnterFrame = function() {
if (_level0.done == "yes") {
// the variables have finished loading
trace(_level0.fName); //outputs nuno
trace(_level0.lName); //outputs mira
trace(_level0.age); //outputs 24
// delete the method to end the loop
delete this.onEnterFrame;
}
};

Problem
1. The trace values come-up so we know that the text file works,
2. The text box has the correct my_text var,
3. There is NO text in my new window

Please help, any ideas will be most welcome.

Thanks and regards

Loadvariablesnum W/ Php
Im using loadvariablesnum to load some variables from my php doc, is there a way i can test to see if its loaded or not to jump to the next frame..?

Right now im having it load into a string.text to test if there is text in it, but i dont want to use a string.text

LoadvariablesNum (Help Please)
I have a problem, prob a small one but for a beginner its a big..

I have made a flash page that uses

Code:
loadMovieNum("fla/mainPlate.swf", 1);
to load a background animation. From that swf file i use

Code:
loadMovieNum("fla/about.swf", 2);
loadMovieNum("fla/about2.swf", 3);
to load the content. The problem now is that when i use

Code:
loadVariablesNum("main.asp", "0", "GET");
to get the content text it doesnt work.

If i access the about.swf direct trough the browser it all works but not when i try to access it from the mainPlate.swf...

I think it is something about levels but im not sure..
Can anyone help me with this?

LoadVariablesNum
Greetings, all!

I have a relatively simple task that I can't get to work.
I want to read values from a textfile on the fly.

The textfile is called "colours.txt" and contains the following text:
Quote:




test=Hello




I am using the following code to read it (the code sits in the first layer [Actions]):
Quote:




var test = "x";
loadVariablesNum("colours.txt", 0);
trace("test: " + test);




When I execute the file, the trace shows "test: x"... can anyone tell me why? What am I doing wrong?
Thanks in advance!
~Marcel

LoadVariablesNum Into
I am fairly new to actionscript and think i may be trying something above my station here!
I have a main .swf file and when a button is clicked I am loading a new .swf into a blank movie clip instance on the main stage. This works fine.
The problem is that this new .swf is pulling text from a .php file. When I load the .swf on its own the text displays fine, however when I click the button and the .swf loads in the main movie, the dynamic text does not appear.
Can anyone out there stop me from pulling out what little hair I have!!

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