ActionScript 3.0 :: URLLoader Keeps Receiving Same Variable Value
Aug 16, 2011
ActionScript [code]...
As you see, the code dynamically creates movie clips. The problem is that after I first launch the program (whether it'd be in Flash or the SWF) it loads perfectly the first time but after, it doesn't. If e.target.data.Count equals 1 in the beginning at first launch, any change I make to the database to change the value of e.target.data.Count is not reflected in the program.
I want to instruct a server-side PHP script to generate a dynamic PDF using variables I submit from Flash. I then want to download that PDF back into my Flash application. Can I use "Loader" or "URLLoader" ? If so, how do I structure my code to render the PDF within Flash when it comes back from PHP? ...or do I have to use Flash Remoting or other means to achieve my goal?
I'm querying a web application in a remote server through XML files and receiving answers in the same file format. Until now, sometimes I received a connection error:
Error #2044: Unhandled ioError:. text=Error #2032: Stream Error. URL: http://server/Services/startSesion.com at reg_jugadores_fla::MainTimeline/queryGQ() at reg_jugadores_fla::MainTimeline/reg_jugadores_fla::frame1()
When this occurs, trying to access the services through a web browser, there's a test page where you can try queries, returns a "500 Internal server error". I managed that problem adding a listener to catch the error:
But since yesterday I can't connect anymore using Flash while it's possible to access the test page. I'm not able to talk to any support guy as the company is closed for vacations! I added listeners to try to know what's happening and this is the result in the output window:
AFAIK, status=200 means OK but why the COMPLETE event isn't dispatched?. So, is there anything I can do or just wait until the tech guys return from the beach?
How ever when I keep getting back "error:empty request". I emailed the site owner and he said that my program may be dropping the data during redirects.[URL]
I am trying to load an external text file but keep receiving the following error message:
Code: Select allTypeError: Error #2007: Parameter url must be non-null. at flash.net::URLStream/load() at flash.net::URLLoader/load() at lee.dataload::TextLoader()
this is the code i'm using, i'm very new to actionscript so it's probably loaded with errors:
I just build a simple web server, but now in one of the pages I would have to have a flash (.swf) embbeded. Maybe an easy task, but also I would like that the .swf receives data from the PhP page, but I cant figure how Simply that when I push the button in the .swf, the sampletext changes to a variable name I have in php.[code]
But when I try to make them both receive and pass it says
Quote:
Error: Error #2136: The SWF file file:///E|/Andrew%20Documents/ColiisionDetection%20Kit/New%20Folder/passingandreceiving.swf contains invalid data. at CLb() at CLa()
I am receiving a variable into an animated flash floorplan. The variable reflects the room name on the floor plan. I am successfully receiving the variable but need to show the room in a hover state (i.e. button over) when flash loads
Here is the action script in flash MX that im using
function doSubmit(){ sendData = new LoadVars(); recData = new LoadVars();[code].....
I am able to send data to the database but the script does not send back the variable data "success".I have 2 input fields on my form, one drop down and 2 radio buttons, a dynamic text field and a Butto.the data from the input fields, the drop down and tyhe radio buttons all get to the database, this part is working great.The dynamic text field shows the data from the error loading variable "Error Loading file".When it should have picked up the variable from the php variable and show the word "Success".Does anyone know why it send my data to the database and won't return the variable from php?
All of the tutorials I have found re: local connections seem to outline 1 swf sending info & the other swf receiving. Is it possible to have two swfs using exactly the same action script for their variables to effect each other? I've got two swfs with 2 different sets of buttons who react the same way on roll over. Once a button is selected it remains highlighted. I want to know if I can have a button in swf 1 highlighted but un-highlight when a button in swf 2 is selected?
Im working with this little sidescroller tile based game, im saving maps to xml file. But got this little problem. I would like to do something like this.
var currentLevel:int = 1; var myMap:String = "map" + currentLevel; var myMap = xmlData.myMap.tiles.text();
so i would like to put that variable to that getting data from xml so if my currentLevel changes its getting diffrent data from xml file. so is that possible to put variable to that xmlData.myMap.tiles.text();
What I want to do is pretty simple but I must not know how to do it. I want the URLFactory to create the Array and store it in the variable "dataArray" and use the Array in the Main class by calling the GetList() of the URLFactory class. What I have returns nothing...
Basically I need to set a variable equal to URLLoader.data (var something:String = URLLoader.data) so I can use this variable in other classes.
my first flash webpage sends data to a php script. I then do
var result_data:String = String(contactLoader.data); if (result_data == "ok") { navigateToURL(strURL, "_self"); }
So if the data is sent with no problems, it will load up my new url. Problem is, this new url needs this data to display it. So, if my php file holds the data in variables, how can my new url retrieve these in real time? (meaning that data goes straight from swf to php to new swf) I have been trying LoadVars, but not sure if this will work in real time, maybe it will.
Not getting data back into flash from php that queries mysql data, think the problem is with my as3 code here?The php works, the as3 posts to the php ok, its the returning of the variables to as3 that I am unsure about and seems to be the problem?
public static function MineData():void{ var myRequest:URLRequest = new URLRequest("login.php"); var myLoader:URLLoader = new URLLoader();
I'm setting up a kind of database, where the data are coming from a specific url. I receive the source code of that url, get the data I look for, and display this in a text box. This works fine as long as I start the swf locally. However, when I copy the swf to my home page, the data obviously cannot be received anymore.
To make it more clear (with fictional url): Homepage [URL] contains the swf; tries to automatically read and display the source of [URL]
I'm trying to reset my flash movie from inside toolbook by sending a variable to flash. I could have two problems: either flash doesn't understand toolbook or my actionscript is just wrong. How should I recieve a the command from toolbook? I've tried alot of different things.
I am currently working on a project that involves using sockets. I am using Flash CS5 and AIR2.0. I am also using another program that will be acting as the socket server (Esperient Creator).I have successfully SENT socket commands from my AIR app to the server.What I need to do is RECEIVE socket commands within my AIR app from the server program. I read somewhere that this was a new feature for AIR 2.0. If anyone has any insight on how to get this to work.
As silly as it sounds, i need the trace to see the error. I am using cs4 for this and have not found anything so far to explain why it is not working. You can test it out without needing anything on stage.
This is the error i get and do not know why. undefined is the varSend trace
TypeError: Error #1010: A term is undefined and has no properties. at Untitled_fla::MainTimeline/frame1() is the varLoader trace
I have built a simple contact form that sends t an email address via a php script. This works fine, (message detalis are sent as URLVariables, which are the data property of a URL Request whose method is set to POST). The PHP script returns a boolean value to confirm that the details have been successfully forwarded to the mail server:
I am using the sendAndLoad class to perform a script through PHP and load the variables back into the swf. Using Firefox Firebug, I am able to tell that everything is executing correctly, including the PHP script returning the following variables:
&mySubscriberID=36&firstName=Bill
But the variables are not making it back into the swf file. Here is the code for the first frame of my flash file:
[Code]....
I also have dynamic text fields with the above variables assigned to them.
the sendAndLoad class to perform a script through PHP and load the variables back into the swf. Using Firefox Firebug, I am able to tell that everything is executing correctly,including the PHP script returning the followingvariables:&mySubscriberID=36&firstName=BillBut the variables are not making it back into the swf file. Here is the code for the first frame of my flash file:
stop(); var sendLV = new LoadVars();var recLV = new LoadVars(); recLV.onLoad = function(success:Boolean){trace("recLV back from php");} sendLV.onLoad = function(success:Boolean){ nextFrame(); trace("sendLV back
Currently I have a simple setup which sends some data to PHP and then PHP returns a variable to flash. I have no problem tracing out the returned variable in Flash, however i'm strugling to send back more than one variable.[code]If I remove the trace and echo for fromPHP2, it's all good, however with with my second echo for fromPHP2 it just gives me back undefined:[code]It seems that fromPHP1 is basically returning both echo's.
We are thinking of adding a feature to a main page of a flash site that I will be building shortly, but it requires sending data out to an API where it will be processed and send back to Flash.The form will need to post a number of variables to a URL and then interpret the response code.. is this possible in AS2?
I'm writing a flash chat program using XMLSocket.It's connecting and sending data just fine. The server is sending the data back just fine (I checked the packets on Ethereal), but Flash is just not receiving any data.[code]The server is a Java server written with the NIO classes.
Im having problems with listening double clicks on masked obj. i have the double click enabled = true, listeners set etc, but double clicks done on a masked area are not captured.if i click outside the mask, everything works.
I am using the sendAndLoad class to perform a script through PHP and load the variables back into the swf. Using Firefox Firebug, I am able to tell that everything is executing correctly, including the PHP script returning the following variables:
&mySubscriberID=36&firstName=Bill
But the variables are not making it back into the swf file in a usable fashion. The variables sent back look like this: