ActionScript 2.0 :: [FMX04] LoadVariables Need To Be Run Twice
Jan 7, 2006
i'm calling a php file, which is supposed to make an xml file. whenever i call the php file using this syntax, most of the time i get "cannot load file" in the xml loading section, but this updates the xml file.
[code] loadVariables("http://localhost/file.php",this,"POST");[/AS]
but when i do it this way. [code] loadVariables("http://localhost/file.php",NONE,"POST");[/AS]
the "cannot load file" messge doesn't get displayed, and the file loads perfectly, but this doesn't update the xml file.
so everytime i have to first use "this" and then "none".
what can i do so that whenever php is called, it'll update the xml file, and still load in the swf.
View 2 Replies
Similar Posts:
Feb 20, 2011
i'm calling a php file, which is supposed to make an xml file. whenever i call the php file using this syntax, most of the time i get "cannot load file" in the xml loading section, but this updates the xml file.[code] loadVariables("http://localhost/file.php",this,"POST");[/AS]but when i do it this way.[code]loadVariables("http://localhost/file.php",NONE,"POST");[/AS]the "cannot load file" messge doesn't get displayed, and the file loads perfectly, but this doesn't update the xml file.so everytime i have to first use "this" and then "none".what am i doing wrong? what can i do so that whenever php is called, it'll update the xml file, and still load in the swf.
View 4 Replies
Apr 12, 2009
Ok, not sure where my other thread is, unless it needs to be manually approved by the moderators? If so, then my bad for making a 2nd thread.It doesn't exactly work... well when I use preview in CS4, it doesn't give any errors about not finding the file on the URL, I tested a fake URL to see if it would give an error and it did. So it is accessing the file perfectly. The chmod is set to 0777 on the settings.txt file.I don't understand why it's not "working" - all I need to do is view the flash file on site1.com - where the actual flash file is hosted on site2.com - I figured that it wasn't working before was because it was loading the settings.txt file from telltarget("..") - so viewing it on site1.com was searching for settings.txt on site1.com (I think???)That's why I need to get the loadVariables() working with a url so that when I view site1.com with the embedded flash file, that it will show it correctly.
View 2 Replies
Jan 12, 2003
ok. i would like to load a .txt file into a dynamic text box on which i have on the stage.when i did it i went from the C drive, but does it have to be in the library? i honestly have no clue as to what i am doing. unless, should i upload the .txt to my server and use a http:// for the URL? then for target is that the instanse or Variable name for my dynam. text box? and what does the method mean
View 1 Replies
Oct 9, 2004
I am trying to load a variable from a text file named "variable_file.txt"he variable in the file is "var" and I am trying to assign the word "value" hen I run the following code:
Code:
loadVariablesNum("variable_file.txt", 0);
trace(var);
[code].....
View 11 Replies
Aug 6, 2009
I have the following line, which is just a loadVariables:loadVariables("data.txt", _root.fa);This loads a data file, located at the root level, which includes the name of an .mp3 file, which is located in a folder; root/media:&faFile=player1.mp3.And then later I have this line which loads the sound from the .mp3:[code]
View 37 Replies
Aug 6, 2009
I have the following line, which is just a loadVariables:
Code:
loadVariables("data.txt", _root.fa);
This loads a data file, located at the root level, which includes the name of an .mp3 file, which is located in a folder; root/media:
Code:
&faFile=player1.mp3
And then later I have this line which loads the sound from the .mp3:
Code:
this.sound.loadSound ("media/" + faFile, true);
But when I run this I get:
undefined
Error opening URL 'file:///jeffrey/Downloads/mp3%5Fplayer%5Ffiles%5Fedit/media/undefined'
This is Flash CS4.
View 14 Replies
Oct 28, 2009
I got a big problem. I want to load data from an asp file, but i can't get it work. It says 'undefined when i trace' Only extern text is working.
[Code]...
View 2 Replies
Feb 15, 2010
I have read a little bit about loadVars and loadVariables, so I am trying to read and write to a .txt on my server. This is my functions: (only Read works, but Send doesn't)
ActionScript Code:
function Load(F, VAR) {
var DATA:LoadVars = new LoadVars();[code]...........
There are no errors or something; but the file is the same after Send();
View 5 Replies
Apr 19, 2005
Okay, so ive loaded some data from PHP into a textbox in Flash with loadVariables, but then found out, that loadVariables, havent got a way of checking if everythings loaded. So im gonna use LoadVars instead,This is the old loadVariables code:
Code:
on(rollOver){
loadVariables("document.php", _parent, "POST");
[code].....
View 1 Replies
Mar 28, 2006
Im developing a game. In some parts, i need to save some info on database (like experience, money, level, ...).
But i cant let people inject code on the server side script (php).
If i send the variables via post, the injector may create a form and send too =(
In php, i've tried to get the referer from where the data came from... without success, from flash, the referer comes null =(
If i make SESSIONs, the injector may enter on the game, after that, he goes to the form to inject the data, the session will not be erased =(
View 3 Replies
Jan 30, 2007
I have a problem with loadVariables from different movieclips, I don't know how to do. I wannt to load loadVariables from 2 mc in to one php script(email.php). My mc's are "send_mc" and "answer_now" Her is only one mc loaded, but I wannt two mc to be loaded.. This is my script, so far...
Code:
buttonS.onRelease = function(){
_root.send_mc.loadVariables("email.php", "POST");
}
View 1 Replies
May 12, 2008
i'm trying to send out some input form variables top a php script via loadVariables() and it's working, but the only problem is that flash also sends out all the html font information along with the form data. so instead of getting something like "Name: Phil" the php script gets:[code]is there a way to keep this from happening in flash or do i need to start getting fancy with the php?
View 3 Replies
Sep 7, 2009
have a little flash plugin, which is a form to submit the user's mail address to a database for receiving a newsletter.The flash contains a dynamic textbox where the user enters his mail address, which has the variable-name "u". The code must also send the newslettername (variable "l") and the command (variable "cmd").The code for the submit-button looks like this:[code].....
View 1 Replies
Oct 27, 2003
I'm newbie in AS Flash (and new in this foro) and I have 3 swf.Principal is the first one that loads pliego and this one load textos.I have 3 files txt's and 3 files jpg's by now (_global.tope=2) and All is OK while I'm testing on my pc.When I'm testing on my site, the Dynamic Text doesn't load txt files!The size of biggest file txt are 5 KB
View 6 Replies
Dec 11, 2003
I'm doing my portfolio in FlashMX using Actionscript. Everything in that sites has a preloader.
Anyway, in the actual portfolio section I use variables form a .txt to load each work (that way I can add in a more easy way new content). The .txt contains location of images, text shown, titel, and some other variables. Each .txt is aprox. 350bytes.
The problem is that if the variables aren't loaded fast enough the content of each work is shown wrong.
Is there a way to calculate getBytesTotal() for variables ?
View 11 Replies
Mar 1, 2005
When I use the code below it works fine and loads the CSS-file and shows the the html-textarea as it should be CSS-formatted. BUT when I try to put the SAME code into a movieclip within another fla-movie it does not work (loads text but not css) and I get un "undefined" all the time. After trying a lot of different things I've come to the conclusion that it MIGHT have soemthing to do with the .onLoad that gets "undefined" in some way. As you can see below I'm getting two vars from input textfields and then use a button to activate the function loadCSS().
[Code]...
View 6 Replies
Mar 11, 2012
when i load a swf file within another swf file my loadVariables do not show.so basicly i have loadVariables in my as2 movie clip which works fine but hten when i load it within as3 movie clip these loadVariables within the as2 movieclip do not work is there any way of makign this work this is what i used for loading hte variables.[code]
View 9 Replies
Feb 19, 2004
someone knows if a directory can be opened using loadVariables and then placed into an array or loop. I know files can be loaded individually, but I want to be able to see all the files using PHP and my .swf file.
View 2 Replies
Jul 26, 2004
I'm trying to send email from Flash. The email form is in a movie loaded with loadMovie. When I call the email.php page, it seems to take forever to do its thing and then nothing happens.
I based my script on the flash email form here in the Kirupa Tutorials and I've tried every way of giving the path to my variables - that is, the path to the text fields in the form via _root and _parent. I've tried appending variables the the loadVariables url and just tried posting them. I can't even get any results when I use the print function in the php script. Here is my php script:
PHP Code:
<?php
$name = $HTTP_POST_VARS['name_txt'];
$email = $HTTP_POST_VARS['email1_txt'];
$interest = $HTTP_POST_VARS['interest'];
[Code].....
It seems like my variables aren't reaching the form, but I'm also concerned hat is is taking forever for any data to be returned to the flash movie (I've got an on(data) event on the form).
View 1 Replies
Feb 27, 2003
im using loadVariables to get variables from an asp page
the return string is fine but i cant access variables
so my array is call module and my return string is module[1]=blah&module[2]=blah
in my debugger it shows module and the shows module[1] and module[2] as 2 seperate objects from the array and i cant access the values from module[1] and module[2] even if i rename the to module1 and module2
View 1 Replies
Jul 1, 2003
I've got a windows that I can move with the startDrag script. This works just perfectly fine. When I load some text into a textbox inside the mc (window mc) the drag-script isn't working, neither is the close window script. But the text loads just fine. Why is this happening? I haven't changed anything in any of the scripts. If I just delete the loadVariablesNum("info.txt",0); line I can move the windows again.
View 4 Replies
Mar 9, 2008
it has many different sections(15 or so). Now i have made the movie and created all the checkboxes needed in the form.
I have given each one an instance name - e.g. chk_individualtax1
Made a global variable for each checkbox to get the .selected value - e.g. _global.individualtax1 = chk_individualtax1.selected;
At the end of the movie I have put a trace command to check that the variables are working( because they are on different timeline levels)- e.g. trace(individualtax1);
Now my problem comes here because now I am trying to send these variables off to the server using the getURL command. - e.g. getURL("send.php", "_blank", "POST");
This works and the email is sent off to me via php. however only the variables on the main timeline are sent? is there a difference in fetching global variables off different levels of the timeline Now should I rather be using the loadVariables command and if so how?
View 1 Replies
Mar 10, 2008
I have an email form in a flash file. Currently I am using the send variables coding as for whatever reason, it doesn't function if I use loadvariables:Here's what I have set up on my submit button:
on(release)
{
if(form.name == "" || form.phone == "" || form.email == "" || form.message == "")
[code].....
View 1 Replies
Sep 16, 2009
I want to load different .txt files into my flash movie, based on the url. ex: http:[url].....
flash would use: loadVariables("textfile1.txt");
View 2 Replies
Nov 6, 2009
I have a PHP-site/script called webshop.php with a $_SESSION variable where I store id's of products. I've tested the script via the browser with functions ?add_item=11 etc... Everything works at that side.
Now, I want to call this script from a flash-movie and thought this little code could do the job: loadVariables("/webshop.php?add_item=" + id, this);
But it doesn't work. (I've also tried with a hardcoded id just to test, webshop.php?add_item=11).
View 2 Replies
Oct 15, 2010
I use loadvariables to get data from mySQL using PHP and up to Flash. Flash gets the data flawlessly. Now one of the data I load into Flash is a path to an image.
My problem is, when I check the imgVar variable, it telles me, its value is: images/news/001.jpg
Now When I use the AS:
loadMovie(imgVar, blanker);
it does nothing (blanker is the movie clip I load the picture to).
When I use the AS:
loadMovie("images/news/001.jpg", blanker);
it shows the picture...
My other question: If I solve this problem, how Can I resize the externally loaded image by just setting either the height or width and doing the resize so that it won't deform my image.
View 4 Replies
Jul 26, 2004
I'm trying to send email from Flash. The email form is in a movie loaded with loadMovie. When I call the email.php page, it seems to take forever to do its thing and then nothing happens.
I based my script on the flash email form here in the Kirupa Tutorials and I've tried every way of giving the path to my variables - that is, the path to the text fields in the form via _root and _parent. I've tried appending variables the the loadVariables url and just tried posting them. I can't even get any results when I use the print function in the php script. Here is my php script:
PHP Code:
<?php
$name = $HTTP_POST_VARS['name_txt'];
$email = $HTTP_POST_VARS['email1_txt'];
[Code]....
It seems like my variables aren't reaching the form, but I'm also concerned hat is is taking forever for any data to be returned to the flash movie (I've got an on(data) event on the form).
View 1 Replies
Oct 8, 2002
I would like to know if it's possible todo something like this:loadVariables("script.php?id=<? echo "id"; ?>",0,"POST"); // the echo thing is nonsense I know, but is it possible to paste the $id, that I'm trying to pass to the external script, from my adressbar (browser)?
View 2 Replies
Apr 19, 2004
Like any of it's simple, but here's what I've got...I'm doing my loadVars, everything's going peachy, but now I want to swap the variable. I've got a bunch of vars in a text file, and here's how I'm doing it right now...
Code:
on (release) {
output1.text = myLoadVar.name2;
}
Now, this works ok, but with as many vars as I'm planning for, I'd like something that I didn't have to make a ton of frames just to have it run.
Code:
on (release) {
output1.text = myLoadVar.(name('prevnum'+1));
}
How do I do this?
View 5 Replies