ActionScript 2.0 :: LoadVars Working Locally, Not Live?
Sep 19, 2009
I'm having a bit of trouble with a Flash/PHP voting system. Basically, it's using a loadVars object to send a simple Number variable to a PHP file that connects with a database and returns.
But for some reason, I can only get the votes to count when I test locally with an absolute path to the PHP file on the server. When I put it live, it will read the PHP file but doesn't seem to be able to send the voting data to it. Here's my code:
ActionScript Code:
//----- On load data function -----//
var dataIn:LoadVars = new LoadVars();
var dataOut:LoadVars = new LoadVars();
[Code].....
Like I said, everything works fine in local testing, but when I put it live, the votes don't get counted, whether I use an absolute or a relative path to the PHP file on the server.
View 9 Replies
Similar Posts:
Sep 12, 2009
Everything works fine when I'm testing it locally and sending the variables to the live PHP file online, but as soon as I upload it, everything just kinda goes to hell and nothing gets sent through. I know Flash just changed its security settings to not allow loading from external sources, but I wouldn't think that would make a difference since everything (including the PHP file) is under the same domain. I've put the crossdomain.xml file in there, as well, but still to no avail. My code to send things is pretty simple:
ActionScript Code:
loadVariablesNum("mailto.php"+"?name="+name+"&email="+email+"&message="+message+"&to="+to+"&recipient="+recipient, 0, "POST");
View 1 Replies
Feb 8, 2009
I'm using a MovieClipLoader in order to load in a couple of images into my flash during runtime. And it works perfectly when I play it locally, as well as from the FTP so to speak, but when I go "live" with it - that is with a URL... it just doesn't work! The XML file that goes with it works very well, and I've traced the paths and they're the same live and local.
View 1 Replies
Apr 21, 2009
I missing a file that needs to reside on the server to get this working?
View 1 Replies
Mar 17, 2012
i have a "swf" file which is picking url from xml & displaying the image, when i tested it locally it works fine, which means it picks up URL from XML & displaying corresponding image. After i uploaded it on server, it doesn't show anything.
View 2 Replies
Jul 18, 2011
I have tested other embedded videos and they will play remotely so I know the hosting site is working.Currently,the live video will play locally and remotely from this computer where all the files are stored but only the skin is visible on any other remote computer's web browser.
View 2 Replies
Nov 5, 2009
I have a flash project, its working fine in local system, but the same file is not working in live here is the link of the site, its showing blank page, the flash contents are not loading... [URL]
View 12 Replies
Dec 14, 2009
I have a flash project, its working fine in local system and checked this file with uploading in someother websites, its working fine there too, but the same file is not working in live here is the link of the site, its showing blank page, the flash contents are not loading.URL...and here the same file which i have uploaded it in other server its working fine.URL...
View 2 Replies
Jul 31, 2009
Why does my swf's skin referenced by a simple component FLA work locally but NOT live? There's no AS3 in the component FLA. It's just a one-layer component referenced to the the FLV. When I test locally, IN FLASH CS4 ONLY, and click on "Animalia - Verse From the Zoo" the FLV and skin load and the video (source FLV - "Sequence01.flv") plays. But the same thing live only loads the swf for the FLV file area but NO SKIN. Try it yourself, please:Has anyone had this problem and knows the solution? All files are in the SAME FOLDER on the web server. I've tried every URL and path combination I can think of on the website. I've tried referencing the whole URL.
Yet whatever path combination I try, either nothing happens, or I just get the FLV box but no skin. Which is what's happening now. Publish settings are set to Flash Player 10 for all files. And I've tried the component SWF WITH and WITHOUT the fl.video package (import fl.video.*. No difference. Why does the skin load and play locally but not live? It's all AS3. No AS2. And it does not seem to be a "publish settings" issue as far as I can see. The relevant code in my API is:
var AnimalFLVLoader:Loader = new Loader();
AnimalFLVLoader.contentLoaderInfo.addEventListener (MouseEvent.MOUSE_DOWN,fAnimaliaVOn);
Animalia2.addEventListener(MouseEvent.MOUSE_DOWN, fAnimaliaVOn);
[code].....
View 9 Replies
Aug 10, 2010
I have CS3 movie that opens links to other sites.It works fine when publshed to the web server but when I test it locally (opening it from my own files) the links don't work - is this a security settings issue? I tried opening settings manager and "allowing" files for that file location but it didn't fix it.
View 2 Replies
Sep 16, 2011
When I click on any of the chairs, the appropriate text loads in the textfields. But when I try a different items like tables. It shows up undefined.
ActionScript Code:
if (images == "chairs" && loadStat == "finished")
{
picLoading("MI_Products/Chairs/chair" + chairInt + ".jpg");
[code]....
I have all the info in 1 txt file seperated appropriately with the &. As I said, all the chairs load up each part of the text file as it should but every other item comes up as undefined in the textbox. I tried giving each loaderTxt a number to differenciate as seperate variables, yet no avail.
View 4 Replies
Feb 20, 2004
I looked at the tutorial section to see how to get loadVars to load in data from PHP.
PHP code:
//do league queries
$query_mteam = "SELECT name FROM test ORDER BY name ASC";[code]......
Now I added the extra line in bold as I need to be able to use the variable I have grabbed from my PHP file using the above code (the var is called rows) and I need to be able to use this figuree to do some simple math.. but I can't seem to get it to do anything apart from appear in text fields....I want to be able to do:
row=row+5;
for example. In fact, I want to use the value of row to generate a certain number of buttons dynamically. This eventually will be a menu based on values from a database (mySQL and PHP) but I am stumbling at the first hurdle.
View 2 Replies
Nov 18, 2002
I'm using the LoadVars object to read data from a textfile. Everything works fine when I play my movie locally or on another computer in the network, but when I play it on the server, it does not load any data at all
[Code]...
View 11 Replies
Jun 18, 2009
So I have an incredibly simple tool that shows some updates from an XML file...In the swf, there is a button that triggers a refresh for the XML file... it works fine locally, but not online...
Code:
stop();
btnRefresh.label = "Refresh";
[code].....
View 6 Replies
Dec 25, 2009
I've got an RSS feed coming into my flash site. When I test this locally its all good, everything works fine, I can see the RSS feed and everything. But now when I test online, I can't see any RSS, nothing. Its just blank. Any idea why this might happen?
View 12 Replies
Aug 27, 2009
I have Domain1 that is hosting my flash .swf file, and Domain2 that is linking to that .swf file. In the flash file I have a;loadVars.send "POST");command. When the flash file is placed anywhere on a page on Domain1, this works perfectly fine. But when placed on Domain2 (and other domains), this loadVars statement does not work and does not forward to But when I change "_self" to "_blank" - the statement works fine on Domain2.
View 4 Replies
Aug 27, 2009
I have Domain1 that is hosting my flash .swf file, and Domain2 that is linking to that .swf file. In the flash file I have a; loadVars.send("another-[URL]", "_self", "POST"); command. When the flash file is placed anywhere on a page on Domain1, this works perfectly fine. But when placed on Domain2 (and other domains), this loadVars statement does not work and does not forward to another- [URL]. But when I change "_self" to "_blank" - the statement works fine on Domain2. Why doesn't "_self" work on external domains?
View 3 Replies
Feb 1, 2006
Working with loadvars can be frustrating if your calling vars from [URL]and testing them by navigating to "website.com/getVars.php". Flash will not load vars accross a domain (cause your missing the www) without adding a policy file. There are a couple ways around this:
1) Don't use absolute paths when working with loadvars.The issue here is testing locally and on the web, you can't load vars from getVars.php locally if you're web server is generating the file with a database...
2) Force your users to include www. before the domain name.I work for a tv network and I'm finishing up 4 flash sites that all use loadvars and I felt like writing a script that would work for all of them, instead of one for each site. The following is the result, and I thought I would share it with the faithful kirupa nerds.
<script language="javascript">
var thisURL = "" + window.location;
var WWW = (thisURL.indexOf("www"));
var dissect = thisURL.split("/");
[code]....
I compressed (and actually made the code more scalable) from 23 lines to 6
View 3 Replies
Jan 15, 2009
I'm writing a very simple flash app (AS 2) to sign users up to an email newsletter; the way it works is that it uses LoadVars to hit a (same-domain) PHP script via POST with the user's email address. The PHP script then passes the info through to another domain via curl to sign up the user.
So far, so good, and it works on roughly 70% of the computers on which it's been tested (it's being tested live from the website, not locally). However, on some computers, it doesn't appear that the LoadVars.sendAndLoad call is being made, as the email addresses sent from those computers aren't showing up on the subscriber list. I know that the PHP script still works on those computers as I've made a barebones HTML form that acts in exactly the way the Flash app does (POSTs to same PHP script with same variables, etc) and it works on all computers.
Here's the relevant AS:
submit_btn.onRelease = function(){
submitOutAnimation();
this.enabled = false;
[Code]....
View 2 Replies
Feb 17, 2011
I'm having an issue with some AS3 Loadvars. This works fine when running as preview (^+Ent), however after publishing this doesn't work. I'm very new (this is my first 'dip' into the flash world!).
Code:
myData = new LoadVars();
myData.load("[URL]");
myData.onLoad = function(success) {
if(success){
L_Var1.text = this.RetVar1;
L_Var2.text = this.RetVar2;
_level0.gotoAndStop(2);
} else {
_level0.gotoAndStop(80);
}};
Whenever this runs in preview, frame 2 is shown without issue. If run after publishing, frame 80 is shown, but without the trace I cannot see why.
View 1 Replies
Jan 15, 2011
In my Flex app, I need a Javascript control to call one of my Actionscript methods. Simple enough, according to the Flex/Actionscript documentation, I wrote this in my Actionscript code:
if (ExternalInterface.available)
ExternalInterface.addCallback("setName", setNameInActiveWindow);
In the Javascript control I wrote:
document.getElementById('FlexAppId').setName(name);
Works great. Exactly as expected, so I went to production. But it doesn't work in production :(. Same exact code... I can't figure it out. The above Javascript code is run, but the callback is not executed in the Actionscript code.
[Code]...
View 1 Replies
Oct 26, 2011
I recreated this example of using Base64Image but it does not work when ran locally, only when I load it from a web server. Is this expected and can it be done so that it works locally?
View 1 Replies
Sep 23, 2010
I'm having problems with Shared Objects. They seem to work on my machine but when I put them on a server they're not working anymore.Basically I have a page with a video player and I only want the video to play when the user visits the page for the first time.This is the code:
PHP Code:
var beenVisited:Boolean=false;var shared:SharedObject=SharedObject.getLocal("visited");if (shared.data.visits==undefined) shared.data.visits = 1; beenVisited=fa
[code]......
View 2 Replies
Mar 2, 2009
I'm working on an email form contained in a separate .as file coded in AS3 with a php file. Everything is working just fine when I test it through Flash, having my swf + my .as file locally and my php file online. As soon as I move all my files online, I submit the form, press my send button, see in the bottom screen of my browser than it seems to be a transfer, but nothing happen, no error message as written in my code...i'm just stuck. Here is parts of my codes.
[Code]...
View 3 Replies
May 17, 2010
I have one .swf that loads a second one on level 2.level 2 then in turn loads variables from a text file .The problem is that it works locally, but refuses to work on the server. The urls are all local. This is such a simple procedure, I can't figure out what is wrong..... are there limitations doing this via server vs. locally? I never get any "file open" errors locally. I've spent 2 hours on this.... I'm just using a simple LoadVars similar to this example:
Code:
loadText = new LoadVars();
loadText.load("text3.txt");
[code].....
View 5 Replies
Jun 10, 2009
I want a user running a Flash game on his machine (not from a server) to be able to save some game data locally.From what I've read, there still isn't any way to do this, but I thought I'd throw it out there in case anyone knows a sneaky xml or php work around.
View 2 Replies
Apr 13, 2004
One of the moderators, could you've a look at this tutorial: [URL] it doesn't works with me, maybe because I've 2004 so if you change loadVars() into LoadVars() it should work
View 2 Replies
Feb 25, 2011
in an attempt to narrow down a very frustrating problem with my project, I've implemented an UncaughtErrorEvent listener which will trace uncaught errors to a textfield that I can view.To test this out, I've forced the application to encounter errors at very specific points, to ensure that the errors are being handled properly.
In the flash sandbox environment, the errors displayed properly in the textfield, however, running the application in browser does NOT show any kind of error! It moves right past the errors as though they never happened!
View 4 Replies
Sep 1, 2003
Whenever i try to display anything returned by LoadVars.getBytesLoaded or Load....Total, it gives me NaN.
View 14 Replies
Dec 4, 2008
I have a HD Camera streaming a live feed through FME 2.5 to FMS 3.0 using the VP6 codec and it works fine. I have now been trying to get the same stream running via H.264 and althogh FME 2.5 connects to the FMS 3.0 server and the stream starts with FMS 3.0 reporting the stream no problem. The Client application crerated with Captivate 3 using Flash Player 9 for publishing no longer dispays the video. Switching back to VP6 works again.
View 4 Replies