[F8] SendAndLoad Problem With Answer From Server
I tested one of my old pages, where I now use sendAndLoad method. From this site I dont recieve success == true. :?: is how can I find out, what problem with server is. From other site - other server, which I tested I recieve the success == true.
Code: var submitListener:Object = new Object (); submitListener.click = function (evt:Object) { var result_lv:LoadVars = new LoadVars (); result_lv.onLoad = function (success:Boolean) { if (success) { result_ta.text = "Hello"; } else { result_ta.text = "Error connecting to server."; } }; var send_lv:LoadVars = new LoadVars (); send_lv.name = name_ti.text; send_lv.sendAndLoad ("http://www.penzionuhradku.cz", result_lv, "POST"); }; submit_button.addEventListener ("click", submitListener);
FlashKit > Flash Help > Flash ActionScript
Posted on: 06-30-2006, 12:32 PM
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
SendAndLoad Problem With Answer From Server
I tested one of my old pages, where I now use sendAndLoad method.
From this site I dont recieve success == true.
:?: is how can I find out, what problem with server is.
From other site - other server, which I tested I recieve the success == true.
Code:
var submitListener:Object = new Object ();
submitListener.click = function (evt:Object)
{
var result_lv:LoadVars = new LoadVars ();
result_lv.onLoad = function (success:Boolean)
{
if (success)
{
result_ta.text = "Hello";
}
else
{
result_ta.text = "Error connecting to server.";
}
};
var send_lv:LoadVars = new LoadVars ();
send_lv.name = name_ti.text;
send_lv.sendAndLoad ("http://www.penzionuhradku.cz", result_lv, "POST");
};
submit_button.addEventListener ("click", submitListener);
SendAndLoad Problem With Answer From Server
I tested one of my old pages, where I now use sendAndLoad method.
From this site I dont recieve success == true.
:?: is how can I find out, what problem with server is.
From other site - other server, which I tested I recieve the success == true.
Code:
var submitListener:Object = new Object ();
submitListener.click = function (evt:Object)
{
var result_lv:LoadVars = new LoadVars ();
result_lv.onLoad = function (success:Boolean)
{
if (success)
{
result_ta.text = "Hello";
}
else
{
result_ta.text = "Error connecting to server.";
}
};
var send_lv:LoadVars = new LoadVars ();
send_lv.name = name_ti.text;
send_lv.sendAndLoad ("http://www.penzionuhradku.cz", result_lv, "POST");
};
submit_button.addEventListener ("click", submitListener);
SendAndLoad To Php On Another Server
Hi,
I'm trying to use SendAndLoad to send var's to some php code on a different server to the one that my html/.swf is on. It works offline fine, but not online. I put System.security.allowDomain("www.server1.com","www .server2.com");
in as well, but not helping.
any ideas??
thanks for any help
boombanguk
Need SendAndLoad To Keep Trying If Server Hiccups
Okay, here's the deal. I've created a word game and every round it makes a sendAndLoad to get the latest word information. Sometimes, however, my server hiccups. You know how it is, you go to a web page and it just kinda hangs. So you stop the request, make another and everything connects immediately. How can I do something like
if connection happens in x seconds, great
if not, stop the request and make a new one
repeat step 2 if not successful
Any help would be greatly appreciated.
Sendandload Not Working From Server But Ok On Design Machine
hi,
I have got a form working on my development/design machine - works really well.
But, when we put the swf onto the server it just stops working altogether unless I use a send command.
This is really confusing and not really useable since we need to read the response back from the server.
Any ideas?!
Many thanks.
SendAndLoad Works From Hardrive But Not On Web Server (using Http://toscript.php)
Hello,
I have a php file that returns a list of directories to my flash program, which in turns builds some buttons to access the files in those folders.
You can download the fla here:
http://seefreshnet.web120.discountas...electLogo3.fla
You can see the php file response here:
http://www.builditgreek.com/directories.php
This program works just fine when tested on the hard drive, but when I've tested it on 3 DIFFERENt servers it won't work, likes it not getting the response from the php files?
Any ideas why this is happening,
Thanks a ton
SendAndLoad Dosent Works On A Remote Server But Worls Locally
Hi,
I really have a serious problem using the sendAndLoad method which i use to retrieve variable from mysql DB uploaded on a remote server. I have the php files in a folder functions which is under web and the AS classes and swf and html in the root of the web folder uploaded on the FTP server. When I execute this method locally everything is working perfectly but when it is uploaded on the server with the same db i get undefined value (vars.lastorder = this.lastorder;).I actually need to get the last order id from the PHP script. When I try and pass data the method is working and the server executes insert query but when i try retrieve im not able to retrieve the value remotley I really dont have an idea about this problem cause its functioning on the local level and not remotely. Im using Apache 2.0 server locally and the hosting provider has 1.3.37 could this be a problem? Or there are some security issues involved? Or do you see a problem that the action script files and the php are not in the same folder but i dont think so cause the other methods are working.
Can you give me any suggestions im really trying hard with this problem 3 days. The code that I use is posted below.
Attach Code
/** ACTION SCRIPT 2.0 CODE */
dataIn.onLoad = function() {
if (this.result1 == "1") {
var listOfItems :Array = new Array();
listOfItems = shoppingCart.getCart();
var i:Number;
var vars:LoadVars = new LoadVars();
for (i=0; i<listOfItems.length;i++)
{
var dummy:LoadVars = new LoadVars();
var itemx:Item= new Item();
itemx = listOfItems[i];
vars.productname = itemx.getName();
vars.quantity = itemx.getQuantity();
vars.lastorder = this.lastorder;
vars.sendAndLoad(ip+"/functions/order2.php",dummy,"POST");
}
shoppingCart.removeAllItems();
totalPreis =new Number(0);
grid1.removeAll();
custName = _root.od_payment_first_name.text;
custSurname = _root.od_payment_last_name.text;
_level0.gotoAndStop("thankYouFrame");
} else {
Alert.okLabel = "Nein";
var alertbox:Alert = Alert.show("Sorry there has been a technical problem !!", "Cart alert", Alert.OK);
}
};
/** PHP CODE * PART OF IT /
$resultx = mysql_query("SELECT tbl_order.od_id FROM tbl_order ORDER BY tbl_order.od_id DESC LIMIT 1");
for($x = 0 ; $x < mysql_num_rows($resultx) ; $x++)
{
$row = mysql_fetch_assoc($resultx);
$last_order = $row['od_id'];
}
if ($result1 == 1)
{
echo "&result1=1&lastorder=$last_order&";
}
else
{
echo "&result1=0&lastorder=$last_order&";
}
dbClose();
Close Window
Stream Works From Local Desktop To Server But Not Server To Server
I have flash media server running on linux. If I launch a test application from my desktop that points to the flash media server (rmtp://myserver.com/live) it works beautifully. However, If I launch an application from my server(http://myserver.com/myapp) and have it point to my flash media server (rmtp://myserver.com/live) i get a rejected from server error. Does anyone know why this would behave like that and how it might be fixed? Thank you.
VideoError: 1000: Unable To Make Connection To Server Or To Find FLV On Server
I've spent a lot of time in the past couple of weeks learning Flash. I developed a Flash (swf) file that plays a Flash video (flv) with cue points. It all works very nicely locally, but when I put it on the server and try to access the html file, the Flash control is white (nothing visible) and a popup error message comes up with this error. I've looked all over the web (including non-English sites), tried playing with all the Publish settings I could think of (version check, local/network access, omit trace, enable debugging) and tried adding error handling code to the swf file itself. I've also tried changing the path for the flv file to be relative, absolute and somewhere in between, but nothing works.
Does anybody know what can cause this error?
VideoError: 1000: Unable to make connection to server or to find FLV on server
at fl.video::VideoPlayer/play()
at fl.video::FLVPlayback/http://www.adobe.com/2007/flash/flvplayback/internal::showFirstStream()
at fl.video::FLVPlayback/http://www.adobe.com/2007/flash/flvplayback/internal::handleVideoEvent()
at flash.events::EventDispatcher/flash.events:EventDispatcher::dispatchEventFunctio n()
at flash.events::EventDispatcher/dispatchEvent()
at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::setState()
at fl.video::VideoPlayer/http://www.adobe.com/2007/flash/flvplayback/internal::httpNetStatus()
Thanks in advance,
shovavnik
How To Load Images From Client Side When The Swf Is Hosted On A Server Without Uplaoding It To Server?
I'm trying to build a online image resize tool.
problem i face are:
1. I build a button that allow user to browse the file. Once file is selected, it doesnt show full path.
2. lets say if it shows fullpath, but i try to load it into a movieclip, and it doesnt work because the swf file is located at the server and not the client's place.
3. as far as i know, flash can only load images which is located in the same server or internet.
4. if i use php, asp, cgi.. it can only allow me to 1st upload the image then resize later, but this is not wat i want.
5. I need to 1st resize then upload later, because if i have 100 and more photos taken from digicam, it's going to be very slow and heavy.
What i have tested:
1. upload "image3.jpg" into the same directory as the "viewer.swf", and it works.
2. do not upload the swf to the server, but run locally from the user's computer and open "image3.jpg" and it works.
3. upload the swf to the server and open "image3.jpg" from the user's computer and IT DOESN"T WORK!
please help me out.
Thanks~!
Attach Code
//---------- Import -------------
import flash.display.BitmapData
import flash.net.FileReference;
//---------- objects -------------
var dlgOpen:FileReference = new FileReference();
var dlgOpen_Listener:Object = new Object();
//---------- _root.value -------------
//Value transfer from <object> or <Embedded> tag.
var strOutputFileField:String = _root.OutputFileField;
var iMaxPPI:Number = eval(_root.MaxPPI);
var iMaxWidth:Number = eval(_root.MaxWidth);
var iMaxKB:Number = eval(_root.MaxKB);
var bDebug:Boolean = eval(_root.bDebug);
lblNo.text = "Picture " + _root.PictureNo;
//---------- Variables -------------
//var bCropProcess_Flag:Boolean = false;
//var bIsValidFormat_Flag:Boolean = false;
//---------- Listener -------------
//dlgOpen_Listener
dlgOpen_Listener.onSelect = function(selectedFile:FileReference):Void
{
//Flag the crop process has been started
bCropProcess_Flag = true;
//update filename, cannot get full filename because flash don't allow
txtFilename.text = selectedFile.name;
//Create into a movie clip or a bitmapdata
_root.tmpBitmap.loadMovie(selectedFile.name);
CreateBitmap();
};
//---------- Functions-------------
//OpenImage
function OpenFileDialog(event:Object):Void
{
dlgOpen.browse([{description: "Image Files", extension: "*.jpg;*.gif;*.png;*.bmp;*.tif"}]);
//_root.tmpBitmap.loadMovie(txtFilename.text);
}
//Load Image into Bitmap Object
function CreateBitmap()
{
}
function sendData(pixels:Array, h:Number, w:Number){
//Create the LoadVars object and pass data to PHP script
var output:LoadVars = new LoadVars()
output.img = pixels.toString()
output.height = h
output.width = w
//The page (and this movie itself) should be in a server to work
output.send("jpeg.php", "output", "POST")
}
//---------- Others -------------
//Add Events and Listener
dlgOpen.addListener(dlgOpen_Listener);
btnBrowse.addEventListener("click", OpenFileDialog);
//Clean up and stop
stop();
Edited: 11/23/2007 at 07:34:09 PM by zerodevice
SOAP, C++, C#, Or Other Access To Flash Media Server Server Management ActionScript API,
I'm writing code to manage a farm of Flash Media Servers, and I need to call some Flash Media Server APIs from languages other than ActionScript.
I'm happy to write some of my code in ActionScript subroutines, and just use the NetConnection remote call API to invoke those functions. But I can find no way to do this.
I was initially enticed by the alleged support for Web-Services, but was disappointed to find that it only (appears) to support consumption of web services - not PROVISION of web services.
I saw that there was an external API accessible from flash media player itself, but that appears to require embedding the media player in a web browser, etc.
Is it - perhaps - possible to directly invoke the flash-media-player from a C# application using their COM-bridge in .Net? And then use that to invoke remote connections - without having any client side actionscript?
Any other ideas?
Flash Media Server 3 And Windows 2003 Server Help For Live Streaming
Hi
I installed FMS 3 (developer) on my Windows 2003 Web Edition.server online
I booted the FMS 3 and it seems that it works correctly (I did the port scanner and is ok)
But I can not see the live streaming applications.
I followed the guidance of Tom Green
http://www.adobe.com/devnet/flashmediaserver/articles/beginner_vod_fm3.html
In local everything works, but in windows server 2003 does not see the movie: I see only the green bar.
Please, someone has had similar problems to my and resolved?
What should I do on Windows servers?
The firewall is open on port 1395, but I do not have results.
Also, if using Flash Media Encoder 2.5 (locally) and use <Stream to Flash media Server> after entering the username and password I have this error
Primary - [ AccessManager.Reject ] : [ authmod=adobe ] : ?reason=needauth&user ...
Someone can help me?
Thank you
Swf Cannot Display In Apache Http Server. Is It My We Browser / Server / Script
hi there,
i'm using dreamwerver , apache (xampp) on my computer.
the problem is anytime i embed a flash swf in my web pages it does not show / display. i checked the mime types and its there
Quote: application/x-shockwave-flashswf
this is also my embeded script in my html,
Quote:
<script language="javascript">
if (AC_FL_RunContent == 0) {
alert("This page requires AC_RunActiveContent.js.");
} else {
AC_FL_RunContent( 'codebase','()=7,0,0,0','width','488','height','277','id','services','align','middle','src','slidesh ow/services','play','false','quality','high','bgcolor','#ffffff','name','services','allowscriptaccess', 'sameDomain','allowfullscreen','false','pluginspage','() ); //end AC code
}
</script>
<noscript>
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="()=7,0,0,0" width="488" height="277" id="services" align="middle">
<param name="allowScriptAccess" value="always" />
<param name="allowFullScreen" value="false" />
<param name="movie" value="slideshow/services.swf" />
<param name="play" value="true" />
<param name="quality" value="high" />
<param name="bgcolor" value="#ffffff" />
<embed src="slideshow/services.swf" play="false" quality="high" bgcolor="#ffffff" width="100%" height="277" name="services" align="middle" allowscriptaccess="always" allowfullscreen="false" type="application/x-shockwave-flash" pluginspage="" />
</object>
</noscript>
please any help will be welcomed.
thanks
ally
Flash Media Server Only Works Local On Server
i just installed a developers version of the flash media server on a windows server.
i don't have any problems while starting my applications on the server itself.
the problem only appears when i try to connect from a different computer which is not located in this network,
at least a connection from "outside".
there is no firewall right now on that server that this can't be the problem.
when starting the media server by the managment console i also do login with the domain-name of the server and not with localhost...locally all is working well...but not from outside.
i also try to test port 1935, 443 and 80, but none succeed from outside.
what i also tried is to run a version of the flash communication server 1.5 on my home pc also running a windows server. in this case i had the same problems: could only get a connection locally but not from outside...i.e. the connection to the server failed.
anyone an idea?
Immitating Flash Streaming Server With Development Server
We have an FMS 2 application that we are getting ready to port to FMS 3. It works on the development server, which I understand, is full featured like the Flash Interactive Media Server. Since our customers are primarily K-12/colleges, and our application only streams very low quality audio we would like to suggest that our customers purchase the cheaper FMS Streaming Server 3.
The question:
Is there a way to make our Flash Media Development Server act like Flash Media Streaming Server with out purchasing a license, in order to test application compatibility? We don't want to have to purchase the streaming server only to find out it won't work and then pay another $3,500 in order to upgrade to FMS Interactive, when we could just pay $2000 to upgrade our existing FMS 2 license to FMS Interactive.
LoadVars With Server Side ActionScript (Flash Com Server)
I'm making a simple login application. I want to send a username/password while connecting to FCS, and have the SSAS of main.asc connect to a PHP document that will lookup the username/pass and make the necessary checks for the information in a mySQL database.
I'm trying to use the LoadVars() object, maybe you can't do this with SSAS? Or maybe i need to include some other actionscript file (I know when you use components you have to specify load("components.asc"); at the top of the main.asc file --- i'm hoping it's something that easy )
This is my first FCS app, I've done a lot of research but this one's sort of stumping me. I keep getting an error that looks like this:
/opt/macromedia/fcs/applications/my_app/main.asc: line 9: ReferenceError: LoadVars is not defined
Here is my code for main.asc:
ActionScript Code:
application.onAppStart = function(){ this.userCount = 0; this.users = [];}application.onConnect = function(thisClient, username, password){ thisClient.username = username; //authentication functions var my_lv:LoadVars = new LoadVars; //line 9 where error happens my_lv.load("http://10.10.1.200/_websites/quickconnect/verify.php?username="+escape(username)+"&password="+escape(password)); my_lv.onLoad = function(success){ if(success == true){ thisClient.username = my_lv.username; thisClient.email = my_lv.email; thisClient.firstname = my_lv.firstname; thisClient.lastname = my_lv.lastname; thisClient.usertype = my_lv.usertype; this.users[this.userCount] = thisClient; this.userCount++; } } //if login is okay //add user to users list this.acceptConnection(thisClient); }
LoadVars With Server Side ActionScript (Flash Com Server)
I'm making a simple login application. I want to send a username/password while connecting to FCS, and have the SSAS of main.asc connect to a PHP document that will lookup the username/pass and make the necessary checks for the information in a mySQL database.
I'm trying to use the LoadVars() object, maybe you can't do this with SSAS? Or maybe i need to include some other actionscript file (I know when you use components you have to specify load("components.asc"); at the top of the main.asc file --- i'm hoping it's something that easy )
This is my first FCS app, I've done a lot of research but this one's sort of stumping me. I keep getting an error that looks like this:
/opt/macromedia/fcs/applications/my_app/main.asc: line 9: ReferenceError: LoadVars is not defined
Here is my code for main.asc:
ActionScript Code:
application.onAppStart = function(){ this.userCount = 0; this.users = [];}application.onConnect = function(thisClient, username, password){ thisClient.username = username; //authentication functions var my_lv:LoadVars = new LoadVars; //line 9 where error happens my_lv.load("http://10.10.1.200/_websites/quickconnect/verify.php?username="+escape(username)+"&password="+escape(password)); my_lv.onLoad = function(success){ if(success == true){ thisClient.username = my_lv.username; thisClient.email = my_lv.email; thisClient.firstname = my_lv.firstname; thisClient.lastname = my_lv.lastname; thisClient.usertype = my_lv.usertype; this.users[this.userCount] = thisClient; this.userCount++; } } //if login is okay //add user to users list this.acceptConnection(thisClient); }
Flash Media Server Vs PROXY Server/firewire
Hi All,
Can anyone help us, we have a multiway communication app developed in flash utlising FMS for audio communication. But now we find out that the end client is sitting behind a proxy server. What are the best ways of being able to send the communication through their poxy server without making major changes to the server itself? Otherwise this whole project is floored because no connection can be made.
note: it works fine when the client is not behind the firewall.
Any help would be greatly apreciated.
Gz
Error: The Callee (server(not Server Application)) Is Not Available And...
Ok i am stumped. Here is the scenario, tested in IE6 and IE7, same problem; works FINE in Firefox:
I have a lobby that launches flash movies in new windows using window.open... The first movie opens fine, but if i close the window containing the 1st movie, and try to launch it a second time i get this error:
"Error: The callee (server(not server application)) is not available and
disappeard; all connections are invalid. The call didnot execute." (only get this error in IE6/7)
I am using LocalConnection to communicate between the lobby and the movie, javascript to open the new windows, and flashVars/php to pass key data to the newly opened movie...
What the hell is going on? Is this a javascript error or a LocalConnection issue?
Im so stumped, please help!
Flash Media Server / Proxy Server / AS 2 Help
I was wondering any of you guys on the board can help me with an issue I'm having on this project I'm working on...
I'm working on this flash video player that loads .flv's stored on a Flash Media Server through a proxy server. So the swf that's on server A loads a .flv on server B through a proxy server. The thing is that I built the player in AS 2.0 -using the FLVplayback component (I know I know, but I'm just learning 3.0) , and it's not working right now, and we have diagnosed that it's most probably because the ProxyType is not set and it needs to be HTTP i think. I know you can do it in 3.0, but I'm not sure of an equivalent way to do it in 2.0? Would I have to write something to extend the class?
Help!
Thanks in advance
Flash Media Server, Does It Need Server Side?
Ive been importing my videos and selecting flash media server, which I thought was streaming. However its always worked fine and I dont understand what these extra files are that are needed on the server? Are my videos just converting to progressive video? Because I never knew they needed special files yet they have always worked or so it seems!
Flash Media Server Not Connect With Server
Hi I'm newbie to Flash Media Server,
I just trying to make a video saving tool with webcam, Its possible at only with FMS (found with google..).
Now Started to learn basic thinks, But I'm struck in the basic level, Thats, After install FMS, I'll go to ...//Adobe/Flash Media Server 3/fms_adminConsole.htm (in local system). for change administrator tool, At this position, I have one problem.
I have attached my error jpeg, Please give me the solution and push me to the right way.
Thanks...
Window Media Server And Flash Server
hi experts,
I am rather new to Flash Media Server, but quite impressed with what flash server can do. however, i have a few questions which i could not find any answer on the website:
1) Could Flash Media Server co-exists on the same server with Window Media Server? Can both run at the same time?
2) Could Microsoft cluster service support Flash Media server or Window Media server? If not, is there any other way for high avail support?
Thank you guys in advance.
Accessing Flash Media Server From Another Web Server
Hi,
I have installed Flash Media Server 3 Developer Edition on a server to test out some flv files but cannot seem to access the files from another web server. I have not created an application in FMS3 but have placed the videos files in the VOD Media folder. Could this be a firewall issue and if so what port do I need to open up?
Kind regards
James (UK)
Flash Media Server / Proxy Server / AS 2 Help
I was wondering any of you guys on the board can help me with an issue I'm having on this project I'm working on...
I'm working on this flash video player that loads .flv's stored on a Flash Media Server through a proxy server. So the swf that's on server A loads a .flv on server B through a proxy server. The thing is that I built the player in AS 2.0 -using the FLVplayback component, and it's not working right now (works if it doesn't have to go through the proxy server), and we have diagnosed that it's most probably because the ProxyType is not set and it needs to be HTTP because Proxy servers only recognize HTTP. I know you can do it in 3.0, but I'm not sure of an equivalent way to do it in 2.0? Would I have to write something to extend the class?
Help!
Thanks in advance
Flash Media Server Vs. Com Server?
I'm on a Mac, and am researching the Flash Media Server options.
I have downloaded some of the authoring kits available for the Mac, but am a
bit confused about the demo/trial of one that says
Flash Communications Server.
Is that different or the same thing as the Media Server?
Jeff
~~~~~~~~~~~~
Jefferis Peterson, Pres.
Web Design and Marketing
http://www.PetersonSales.com
Server Not Working On Live Server
So I just purchased the flash media server yesterday and migrated the files and applications to the live site. And things just wont work. I have encoded videos in the definst folder, but nothing shows up. The site takes a really long time to load and often crashes my firefox. I have verified that the server is running and all the services are running. I am using a Red Hat Linux server. has anyone had this problem or does anyone have a suggestion to trouble shoot this problem.
Also i cannot log into the admin console i am using the correct user and pwd.
Edited: 03/23/2007 at 07:50:54 AM by mulligan03
Media Server And Web Server Interaction
Hi all i am new to flash media server ... i have a question before i have to post an architecture diagram for Comunication between media server , web server and Flash media server client ...
My question is that i want to know that ... lets suppose i have a simple live stream application installed on media server that reside on a third party and the flash client along with other website data is located on the webserver thats again another location. So once the connection is established with the flash media server if the webserver goes down will the flash media server keep on streaming to the flash client ...
In my opinion it will keep on streaming as webserver has nothing to do with the flash media server and the rtmp://ip:port//....... this connection is independent to the web server .. But i m not sure and wana ask the Guru's advice on this ...
I will appreciate you replies
Thanx
Bilal
Save "Shareobject" Data In A Server Without Flash Media Server.
Hi there!
I´m Triyng to save "shareobject" data in a server from a Flash Game, in order to save each player score or any data. I´ve heard that it's made doing "sharedobject.getRemote". So each player would logg in and save their score wherever they are (from any PC conected in a server). So the Flash cookies should be in the server.
The problem is that to make that user would need to have the Flash Media Server installed...
So it´s possible to save "Shareobject" data in a server without Flash Media Server.
Thank you in advance
XML SendAndLoad
I'm trying to use sendAndLoad to pass an Xml object to a cgi (coldfusion or tango) and get some XML back. Exactly what it is allegedly designed to do.
Problem is, its not passing the xml object, hence I'm getting nothing back. The code for doing this currently looks like this:
-----
function loadresults () {
_root.output = "Loading the results xml...";
requestdate = "<requestdate>21/09/00</requestdate>";
requesttime = "<requesttime>19:00</requesttime>";
requestcovers = "<requestcovers>2</requestcovers>";
XMLString = "<request>"+requestdate+requesttime+requestcovers+ "</request>";
requestXML = new XML(XMLString);
requestXML.sendAndLoad("fields.cfm", this);
}
-----
SendAndLoad()
afternoon/morning/evening...
Has anyone had any problems with the sendAndLoad function on a Mac with IE5 and the flash 6 plugin?
I'm sending XML data to a php script to interpret. This works fine in a PC envrionment, but when viewed on a mac the XML data doesn't seem to reach the php file. The data disapears or gets deleted when the sendAndLoad function is carried out.
loginXML = new XML();
receiveXML = new XML();
login = loginXML.createElement("login");0
login.attributes.version = "";
loginXML.appendChild(login);
loginName = loginXML.createElement("loginName");
loginNameValue = loginXML.createTextNode("flash");
password = loginXML.createElement("password");
passwordValue = loginXML.createTextNode("flashkit");
loginName.appendChild(loginNameValue);
password.appendChild(passwordValue);
login.appendChild(loginName);
login.appendChild(password);
receiveXML.onLoad = resultXML;
loginXML.sendAndLoad("xmlscript.php",receiveXML);
can anyone help.
thanks.
SendAndLoad...how?
I am trying to set up an on-line schedule for a lab that is included in a Flash website. Is there any way to pass a variable from Flash to a text file that is sitting on the server, and then have the new variable reload into Flash?
I understand some of the sendAndLoad code, but I haven't seen anything on how to actually send more than one variable at a time to any sort of external file, much less a text file. Coldfusion files seem to be the order of the day.
So, I have a visual calender, and I want to be able to click on a day, and then select a time and input my name and then have that show up on the calender. Any ideas on how to pass a variable to a TXT file?
SendAndLoad Help...please
I am building a Flash MX site where a section of the site will have Bios of people.
I have a database built out using MySQL and PHP.
I created this button function in my Flash movie
randall.onRelease = function() {
getBio = new LoadVars();
getBio.memberName = this._name;
getBio.send("php/bios.php", "_blank", "POST");
};
This works perfectly! My PHP echoes the info exactly how I need it. URL encoded and all!
randallBio=Randy+was+born+and+raised+in... etc
Now that I know the info is being interpreted correctly, I need to get it back into Flash.
Can anyone help me with converting my current send function into sendAndLoad?
That would be SWEEEEEET!
Thanks in advance!
- Patrick
SendAndLoad();
Hi,
I have some variables that I want to send to a database via an ASP page. Then I want to retrieve the same updated values from the database and show these values in Flash. I'm using the sendAndLoad() method but I'm not getting the values back correctly. (I'm always getting the same values that I originally sent)Can anyone help? Thanks.
Code:
on (release) {
var postVars = new LoadVars();
postVars.p = b1.rating;
postVars.s = b2.rating;
postVars.o = b3.rating;
postVars.q = b4.rating;
postVars.c = id; // contestant id
postVars.sendAndLoad("../interact/PostAndGetRatings.asp",postVars,"POST");
postVars.onLoad = function (success) {
if (success) {
status = "success";
trace("returned")
trace("p="+postVars.p);
trace("s="+postVars.s);
trace("o="+postVars.o);
trace("q="+postVars.q);
} else {
status = "error";
}
}
}
SendAndLoad Help
Soon i was planning on doing some mySQL work with flash and decided to learn the new sendAndLoad. I'm a little confused on this and there's not much i could find on the topic. What i'm trying to do as a test is submit a variable to a php page, have it read it and then have flash read back the value.
test link: .http://maximohosting.com
Here's what i have for a php page. It checks for a name and then prints out a URL encoded type variable answer:
<?php
$formData = (strcmp($REQUEST_METHOD,'GET') == 0)? $HTTP_GET_VARS:$HTTP_POST_VARS;
if(isset($formData['name'])) {
$text = $formData['name'];
}else {
$text = "noname";
}
echo "text=".$text;
?>
then for flash i use two variables. one called "name" and the other "text" with a button containing this action.
on (release) {
function doIt() {
max = new LoadVars();
max.name = name;
response = new LoadVars();
response.onLoad = getResponse();
max.sendAndLoad("test.php", response, "post");
}
function getResponse() {
text = "this should display: " + response.text;
}
doIt();
}
anyways, nothing happens. Can someone tell me what i'm doing wrong? Thanks - Max
MX: SendAndLoad
Hi,
I'm completely new to Flash and thus far I am finding things a little difficult. I am writing an application which lists a bunch of divisions from the database into a combo box, and when a division is selected the data is sent to a php script, a query is performed, and a list of firstnames and surnames are "supposed" to be returned. Eventually on the output as it reads each record I want to create objects such as a checkbox and text fields dynamically (not a problem), but for now I'd do with just being able to get the data into flash.
The combo box is working fine, and by using c.send I can get the correct query return code back into the browser. However no matter what I try I simply cannot work out how to get the new data into flash so it is accessible. Could someone please help me with how this is done structurally.
The following code returns nothing in the statement.. not even a failure:
Code:
var c = new LoadVars();
c.returnTeam=returnTeam;
c.sendAndLoad("http://localhost/getClients.phtml","_self","POST");
c = new LoadVars();
c.onLoad = function(success){
if(success){
getURL("java script:alert('"+ firstname0 + " " + lastname0 + "');");
} else {
getURL("java script:alert('something went wrong');");
trace("something went wrong...");
}
}
I am not getting the sucess or the failure comments, which has left me scratching my head in confusion.
However, if I change the sendAndLoad comment to just send then a new IE window is opened with the information which is to be imported into Flash. This appears to be okay.
PLEASE HELP! Thanks.
SendAndLoad?
Hi,
I need to send some variables to a php script which returns an xml output depending on the initial variable sent. Is this the correct way to do this? thank you for reading!
code:
var Data = new LoadVars();
Data.a = "test";
Data.b = "testing";
var dataXML = new XML();
dataXML.onLoad = parseXML;
dataXML.sendAndLoad("http://sendxml.php", Data, "POST");
PHP Code:
if ($_POST[a] != null) {
call xmlfunction($_POST[a]);
}
SendAndLoad Is Going Nowhere ...
Code:
Login = new LoadVars();
Login.username = username;
Login.pword = pword;
Login.sendAndLoad(_global.URLString + "signin.asp", this, "POST");
Login.onLoad = function(){
trace("loaded");
/*
if(Login.signedin=="true"){
_global.isSignedIn = true;
_global.Account = Login.name;
_global.Username = Login.username;
_root.user_forms.gotoAndStop("s_success");
} else {
_global.isSignedIn = false;
_global.Account = "";
_global.Username = "";
_root.user_forms.gotoAndStop("s_failed");
}
*/
}
stop();
Hi guys,
this is doing *nothing* for me. I'm getting nothing returned on the sendAndLoad, no reaction that it's doing anything at all....
username and pword traces return the appropriate value.
_global.URLString + "signin.asp" returns http://carey.srv/signin.asp as it should .. and the asp script is error-free.
I'm running out of excuses for why it's not working anyone got any suggestions?
Cheers,
Ben
Sendandload
Im using ...
receiveVars.onLoad = function(success) {
if (success) {
trace("SENT STUFF DONE!!!!!!!!!!!!!");
savedstatus = "level saved";
} else {
savedstatus = "error, try again";
}
whats happening is my file is saving correctly, but its still displaying "error, try again" in the savedstatus variable, why is this? does my php file have to send something back to the flash, so sendandload knows its been a success??
thanks
boombanguk
SendAndLoad
hi,
im using this line, in a movieclip, which itself is loaded into another movie (using loadmovie), this is the line
sendVars.sendAndLoad("http://www.website.com/scores.php", receiveVars, "GET");
strange thing is, when i run the movie clip by itself, that above line loads in the data fine, but when i run it from the parent movie, it doesn't..any ideas??
thanks
boombanguk
HELP WITH SendAndLoad()
Hello all, I know this has probably been brought up before, but I am trying to make a login page for my site. In flash I have created 2 input text boxes with the vars username & password, and a button with the following code:
on (release) {
var lv = new LoadVars();
lv.sendAndLoad("test.php",lv,"POST");
lv.onLoad = function() {
success = lv.success;
gotoAndPlay(2);
}
}
on frame 2 I have a dynamic text box, with the var success
test.php contains:
<?php
$username = $HTTP_POST_VARS['username'];
$password = $HTTP_POST_VARS['password'];
if ( $username == 'admin' && $password == 'admin' ) {
echo 'success=true';
exit;
}
else {
echo 'success=false';
exit;
}
?>
The problem is, everytime I click the button, no matter what is entered in the input boxes, I always recieve false back. Can anyone help me out please? Thanks in advance, Nonexistant
SendAndload Php
I can't get the sendAndload() function to execute my php values.
The code I'm using appear below.
I triple checked the syntax etc but still no success.
Any help will be greaatly appreciated.
Thank You
iaustin
//my test.php3 file
<?
$newvar= 10;
echo "&newvar=" . urlencode($newvar);
?>
//my flash 5 code
function fsendandload(){
ioc1 = new LoadVars();
ioc2 = new LoadVars();
ioc1.newvar = 3;
ioc1.sendAndLoad("http://www.toMySite.com/test.php3", ioc2);
returnvar = ioc2.newvar; //text field
}
SendAndLoad To Asp
Hi
I am trying to send a bunch of form fields to an asp page which then writes them to a db
here is some of the code
code:
var targetObject = new LoadVars();
//
targetObject.onLoad = function(success) {
if (success == true) {
outputie.htmlText = targetObject.toString();
} else {
outputie.htmlText = outputie.htmlText+"<br>"+"no success";
}
};
//
function sendData() {
myVars.sendAndLoad(targURL, targetObject);
}
outputie is just a text box for testing
myVars is the list of variables 'name=craig&address1=ma+hoose' etc
targURL is the full url, do I have to put a '?' at the end of it eg targURL = "http://www.mysite.com/myscripts/myfile.asp?"
also is the targetObject setup properly, ie am I using it in the right way?, I dont want the page to refresh when a response comes back.
Any help?
SendAndLoad
why is this not function :
submittedData = new LoadVars();
submittedData.inputData = "text";
submittedData.sendAndLoad("http://localhost/exercise/careTaker.php","post");
the php file is ok i test it aside
is the last line true
Sendandload With PHP
Hi All,
This is my actionscript :
function imageDone() {
uploadstatus = this["errormsg"];
}
function imageDone1(){
var h = new LoadVars();
h.onLoad = imageDone;
h.username = _global.username;
h.gallerynum = _global.setNum;
h.imagenum = _global.imageNum;
h.imageload = infos_txt.text;
h.sendAndLoad("scripts/setimage.php", h, "POST");
_global.browserused = "1";
}
This is my PHP:
<?php
include("MYonnect.php");
$username = $_POST['username'];
$gallerynum = $_POST['gallerynum'];
$imagenum = $_POST['imagenum'];
$imageload = $_POST['imageload'];
$imagefrom = "../img/".$imageload;
$errormsg1 = "File Uploaded";
$qr = mysql_query("SELECT userdir FROM users WHERE username='$username'");
$row = mysql_fetch_array($qr);
$rString .= "&errormsg=".$errormsg1;
$userdir = $row['userdir'];
system("/usr/local/bin/mogrify -format jpeg $imagefrom");
$file_name = current(explode('.', $imageload));
$imageload1 = $file_name.".jpeg";
$newimage = "../img/".$file_name.".jpeg";
$newimage1 = "../users/".$userdir."/images/".$file_name.".jpeg";
copy($newimage, $newimage1);
system("/usr/local/bin/mogrify -resize 400x300! $newimage1 ");
mysql_query("UPDATE userimages SET imagefile='$imageload1' WHERE username='$username' AND setnum='$gallerynum' AND imagenum='$imagenum'");
unlink($imagefrom);
unlink($newimage);
echo $rString."&";
mysql_close($conn);
?>
My problem is that whilst i can get this to work with SEND only, it outputs to a new browser window which i don't want it to do.
I want to be able to use sendandload and therefore not have a new window opened and thus not cause problems for customers who have popup blockers.
Any help the experts out there can give would be appreciated.
Thanks
lawrence
SendAndLoad
hello,
I want to get data of an MySQL database. How do I get the data into flash. I want to know that because I don't fully understand the way they use onLoad en Load functions( new LoadVars() );
for example what is onLoad for an Load, and how do I get new information. Create another loadvars, or can I use the one I created first..
thanx...
|