ActionScript 2.0 :: Obtain The Variables/contents Of A Php Or A Text File From Server Using LoadVars()?
Mar 5, 2010
I am trying to obtain the variables/contents of a php or a text file from my server using loadVars(), and the problem is that flash can get data from almost every server but from mine. (some shared hosting service) I just tried the code provided in the help files:
Code:
var my_lv:LoadVars = new LoadVars();
my_lv.onLoad = function(success:Boolean) {
if (success) {
[code]....
I'm sure that I did no mistake in typing the URL, for it works fine in the browser (also no spaces, no freaky chars), and when i change the URL to another domain (and put the txt file on that server) everything works fine. I tried both possibilities "network access" and "local access" as well as running from an exe projector. But no chance.
View 4 Replies
Similar Posts:
Mar 13, 2006
use loadVars to read variables from .txt files on a different server with flash, do any of you know because I'm getting really annoyed?
View 14 Replies
Mar 21, 2012
I am using FMS 4.5 and have a simple application which I want to use to send two strings to a php file. But I get a compilation error whenever I try to assign any value to these objects:
Here is main.asc:
<code>
var variables = new LoadVars();
variables.username = "uname";
variables.send(http://url.abc.com/test.php,POST)
</code>
I can't compile with the second line. FMS just says: Sending error message: Compilation error
How do I send variables to a HTTP URL?
View 2 Replies
Feb 18, 2005
I was trying to create a preloader that preloads content loaded by the LoadVars() Object. For some reason, the getBytesLoaded and getByetesTotal variables of the LoadVars object kept retuning a null value. Below's how I do it:
PHP Code:
var news_lv = new LoadVars();
var url = "news.aspx"
news_lv.load(url);
[Code]....
View 2 Replies
Feb 18, 2005
I was trying to create a preloader that preloads content loaded by the LoadVars() Object. For some reason, the getBytesLoaded and getByetesTotal variables of the LoadVars object kept retuning a null value. Below's how I do it:
PHP Code:
var news_lv = new LoadVars();
var url = "news.aspx"
news_lv.load(url);
[Code]....
View 2 Replies
Mar 11, 2010
I have problem with obtaining variables from php script.
Here is my php script
<?php
echo "&Files=1,2,3";
php>
And now in the actionscript 2.0
var GVars:LoadVars = new LoadVars();
var Pictures:Array = new Array();
GVars.onLoad = lVars;
GVars.load("[URL]");
function lVars(){
trace("Files: " + this.Files);
Pictures = this.Files.split(",");
} trace("Array: " + Pictures.length);
Here is the output in the trace window
Array: 0
Files: 1,2,3,
As you can see the first is Array:0 which means that actionscript ran first trace
("Array: " + Pictures.length);
End then lVars function. I cannot load variables from php in correct order.
View 4 Replies
Jun 23, 2009
I would like to send data from PHP to Flash however, it sends just fine but when displaying on Flash, it does not display the contents in the variable. Instead, it displays the name of the variable. This may be a simple answer but I'm quite new to this. Here is the code in Flash.
[Code]...
View 7 Replies
Apr 27, 2010
So I have a URL that I need my Flash movie to extract variables from:
example link: [URL].. I need to get the aID and the bID numbers.
I'm able to get the full URL into a String via ExternalInterface
var url:String = ExternalInterface.call("window.location.href.toString"); if (url) testField.text = url;
Just unsure as how to manipulate the String to just get the 1234 and 5678 numbers.
View 2 Replies
Sep 14, 2011
How to obtain flash variables from a dynamic URL generated from a back-end server programming like asp.net ?
I need to obtain the variable and its value from the URL that is being generated from an aspx page.
View 1 Replies
Nov 21, 2010
I made a Flash-based "news section" for my website. This file uses a text field (with render-as HTML) and an instance name of dynamicText. The actionscript fills this text field with content from a TXT file called homeNews.txt.Everything works great, except if I make additions to the TXT file and re-upload to the server, the Flash file still calls an old version of the TXT file from my cache. This even happens after emptying the cache. This is a huge problem if I need to add daily updates. This problem only occurs on the server and not when testing locally.
Here is the code I put in my Flash file:
Code:
Ext_text = new LoadVars();
Ext_text.onLoad = addText;
Ext_text.load("homeNews.txt","POST");
[code]....
View 7 Replies
Jul 18, 2006
I am trying to control the visibility of a movie clip using a boolean variable contained within a text file.
The mc i want to make invisible is in a swf which is loaded into a 'master.swf' using a MovieClipLoader object.
I have managed to get text to display across various boxes in my loaded (child) MC using a loadvars obeject defined in the masterMC and used by the childMC. I just cant seem to be able to get the value of my Boolean variable to go with the text variables and therefore control the visibilty of my MC.
This is my code - (in the master movie):
var myLV:LoadVars = new LoadVars();
myLV.onLoad = function(success) {
if (success) {
[Code]....
View 2 Replies
Apr 21, 2007
I'm trying to send a negative value to a text file using loadvars().
so i did this:
send_lv.xPos = currObj._x;
but if the _x is negative, the minus is replaced by '%2D' How do i send the minus sign??
View 2 Replies
Sep 12, 2008
The code it concerns is this:
(which I found here on kirupa i belive)
myData = new LoadVars();
myData.onLoad = function() {
[code].....
View 3 Replies
Nov 12, 2008
Im trying to load a variable from a text file with loadVars.The txt file has this -
Code:
num = 10
The flash looks like this
Code:
var load_lv = new LoadVars();
load_lv.load("tmbnum.txt");
load_lv.onLoad = loadTextVariables;[code]....
View 1 Replies
Oct 20, 2010
I have built a simple Flash application that will be presented using a projector, the application will show messages in the form of questions that will come from a simple flat-file text file or XML file.
In addition to this I would also like to be able to add my own messages using a simple HTML form.
I've been looking around the web for some resources, but have been struggling to find what I am looking for. The basic idea is that the flash application will loop through these different messages from the XML, but then when a user types in a message that will also appear within these messages. Think of it as a sort of dynamic tag cloud.
View 2 Replies
Oct 22, 2005
I have on one file (player1.fla), a movie that plays MP3s from an array, which I specify in that movie. The code for that works just fine.I've duplicated the file and renamed it to a different one (player2.fla) so I could load the MP3s from a variable (array) on a text file. This way, to add more songs, all I would have to do is update the text file.
I changed the code around a tiny bit in the "player2.fla" file to accomodate for loading a text file, but nothing more.*My Problem* The text file loads properly and displays the Title of the mp3, but it won't play the mp3.The text file looks something like this: (just an example)
Code:
&songs=song1.mp3, song2.mp3, song3.mp3
&songTitles=my song1, my newer song, the third song
My script is very similar to this: (shortened; just an example)
Code:
lv = new LoadVars();
lv.onLoad = function() {[code]......
View 3 Replies
Aug 3, 2007
I'm trying to load the content of a .txt file dynamically... If I leave the .txt file in the same root with the .swf it works perfectly, but I tried moving the .txt files into another folder and it stopped working...
Code:
var path ="/info/myInfo.txt";
var my_lv = new LoadVars();
my_lv.onLoad = function(success) {
if (success) {
// actions go here...
} else {
trace("error load text files");
}};
my_lv.load(path);
"info" is the name of the folder the .txt file is in... I even tried upload it to my server and giving the absolute address like [URL] but nothing...
View 4 Replies
Jan 26, 2010
I have a block of html text which is displayed to the user in a TextArea. Currently, the I have embedded the HTML as an XML object within one of my classes, but this seems like a terrible design. I would like to put the HTML in an embedded file and load it into an XML or String object.
I've tried to search for how to do this, but my searches return information on embedding images and fonts, not text which can be loaded into Strings.
Is it possible to embedded text or xml files and load them into variables in Flex?
View 1 Replies
Jan 31, 2009
I'm loading content from a text file into a text field in Flash. In that text file I have some simple html tags like <b>, <i>, and <img>. I'm setting the textfield as html text:
myTextField.htmlText = myContent
The img tags work fine, but for some reason the bold and italics are not displaying...the tags are being correctly stripped from the text, but there is no bold or italic text. I'm embedding all the characters I need, but do I need to somehow embed the bold/italics versions of those characters?
View 1 Replies
Jan 3, 2003
I have been trying for a few days to obtain information about the users of sites. No success so far.In flash I am using:
loadVariablesNum("mailPHP.php", "0", "POST");
My php code is:
PHP Code:
<html>
<body>
<?php
$mail_to="northls@nbkayaking.com";[code].....
I know I have made an arseup somewhere.
View 14 Replies
Nov 12, 2009
i need to do a form composed by a text field and a button.on the press of the button i should output a string that is composed by a default part (ie: http:url...) and by the text inserted in the text form (ie: hello) in order to obtain a string like this one.
View 4 Replies
Jul 30, 2003
Is it possible to pass the contents of an array to JavaScript code which then creates a text file on the local machine?
View 10 Replies
Feb 9, 2009
I'm experimenting with loading an array of elements into my Flash project using the LoadVars property (I'm using Flash 8 - AS 2) The elements are queried from MySQL using PHP to a page named "elements.php" and loaded into the Flash file. It works fine, but I'd like to be able to protect the "elements.php" page so that the variables queried from this page cannot be viewed by someone who types the absolute path to the elements.php file in the browser address bar [[URL]. Using includes, I'm able to protect other pages in my site from direct assess but these methods don't seem to work when the URL is called from within my SWF file.
My fear is that someone might decompile the swf to reveal the LoadVars URL present in the actionscript. I know there are ways to obfuscate the code, but I'm not sure how well these methods really work. I also understand it is practically impossible to completely hide the code from someone who is REALLY intent on getting it, but I'd like to make it as difficult as possible.
View 3 Replies
Mar 4, 2011
I have a php page which outputs the following:
DisplayValue=%3cfont+face%3d%27Arial%27+color%3d%2 7%23FFFFFF%27+size%3d%2730%27%3eGambling+Hotline+1
[code].....
View 1 Replies
Apr 20, 2004
I'm trying to grab the number of variables I'm loading using LoadVars.
View 5 Replies
Aug 3, 2005
I will be trying to obtain data from a periodically updated xml file. As far as I know, this file will simply continue to have data added to it indefinatly. Is there a way to load only the newly added data to the xml object? As opposed to loading the entire xml file each time I want to update my flash movie with new data added to the xml file?
View 3 Replies
Apr 20, 2004
I'm trying to grab the number of variables I'm loading using LoadVars.
View 5 Replies
Apr 5, 2010
i want to do is read variables from a php file on a remote server. i have the php file on the server and im echoing back a result. all i need in plain english is the AS3 to intercept read and display this variable in a text box.
View 21 Replies
Apr 27, 2007
I have an application that reads a PHP script and populates the Flash applets using the following on frame 1:
[Code]...
A combobox (created with the returned data) is created on frame 61. When a selection is chosen in the combobox I need to add the value returned from the combobox to the variable catvar, add this variable to the LoadVars object and run the script again. It seems to set c.catvar initially but when I use the 'sendAndLoad command the second time c.catvar isn't included. Is it possible to add variables to a LoadVars object created
on frame 1 from frame 61?
View 1 Replies
Mar 26, 2004
ok i have a movie clip with a dynamic text field being animated... i have a text file with this in it
&textline1=time
&textline2=place
&textline3=year
&textline4=month
now how do i make the movie clip to first go from frame 1 to 10( last frame in teh movieclip) with the text time and then when the movie clip starts again it should say place and so on and so forth.. depending on how many textline variables i define in the text file?
View 5 Replies