ActionScript 2.0 :: Loading Variables From One Swf To Another Swf Via Php?
Aug 4, 2011
This question might be a common one ..I too have googled for it a lot but cudnt find the solution for my problem.I have a swf file that loads variable into a php file by :
Code:
my_lv.send("file.php","_blank","POST");
php then uses these variables.
I'm attempting to hit an off-domain url with some variables attached. The domain has a cross domain policy file on it, but flash is looking for the file after the url with the variables attached which then fails.Example:I want to hit: www.sample.com?someArg=1I have even tried loading the cross domain file prior to making the call and it is found ok, but flash then looks again when I attempt to hit the url with variables attached as if it is another domain.
i'm trying to load in a variable value from an xml file.
i want to turn the visibility of a button clip on or off from within my loaded XML code. i know that my xml is loading and working correctly. in my XML file, i have visible="true" set up as an attribute to one of my nodes. what do i need to do to get
_root.myButton._visible=[the variable from my XML];
I am a little rusty with my action script and i am still using 2.0 in my project. I need to load variables in to flash from an xml file and i just can't seem to get it to work.
here is my flash code:
Quote:
on (release) { getxmldata = new XML(); getxmldata.load("xmldata.xml",""); if (getxmldata.loaded) { var p = getxmldata.firstChild;
I have several Movie Clips in the Library which I need to be able to load and bring up on the screen randomly.The code below shows how I can load one of these, but to get a proper control ideally I would like to load them all in to an array or numbered variables so that they can be called from a simple piece of code and actioned one at a time.
My movieclips can all be called something simple like mc1, mc2, mc3, mc4 etc to make things easier.These need to be referenced in to an array mcContainer[.....] or as mcContainer1, mcContainer2........ so that they can be called easily.I just need to know the simplest way to do this and how i reference them, I have tried several ways like ["mc"+i] etc and nothing seems to work.
I am using loadvariablesnum to load some variables from my php doc, is there a way i can test to see if its loaded or not to jump to the next frame..? Right now I am having it load into a string.text to test if there is text in it, but I don't want to use a string.text
I'm trying to load the variables from a database into my flash file but I'm unsure what to use. I know for XML it's
var myXML:XML; myXML= new XML(e.target.data);
but i'm not sure what the type is if it is coming from a database? I sent it the database via php and need to receive it back into flash. Even a reference so I can go look, I'm just not sure what class to begin with.
I have this project where I need to load 3 external variables into my swf-file on a webpage. The wierd thing is that I got this to work before, but now it suddenly wouldn't :
I use swfObject to setup the variables like this:
<script type="text/javascript"> var flashvars = {page:"page1", box:"head2"}; var params = {};
I have created a php scipt (in line with Tony Marstons tutorial) to creating xml document from mysql database.[code]I am wanting to incorporate the results from this into a dynamic text field in my flash file so the content is read from the file.
I am currently helping make a project which needs to load variables from a PHP file into Flash. What I want is the flash movie to go to a frame if the PHP variable in the PHP file equals some text, say "hello".For my PHP file I have this:
I have tried several bits of actionscript, but with no luck. Basically, I want the movie to go to a frame if the variable in PHP equals "hello". Which it currently does, I have tried using the if statement in several ways but with no luck.
I'm using an xml to feed content to a flash website, to load the content I use an array to create a new movie clip per item. What I need to use is for every item to have an action to attach a movieclip in the fashion of a modal window and load the content of this item into the popup movie clip. So far I've managed to get it to get it to attach the mc but the variables with the content do not load.I tried with this but it still didn't work:
I had a question about loading external variables. Is it possible to load external variables from a different server other than the one that the flash site is hosted on?And if so, what would that command look like?For instance, if you load a variable from the site's own server it might look like this;loadText.load("TEXT1.txt");Would loading it from a different server look something like this;
I'm trying to save a change to a text document (In this case a variable "Title" just to test) and then view the changes from another swf movie... In the end I'm hoping to build a client updatable flash site. In particular menu items... feature items & prices.
A Recap: a client types in the items, php/flash saves the changes to the text document, and site visitors can views those changes.
I sorta asked about this in the Server-side section, but I guess the question is really more AS related....How can I send variables from a swf to a cfm page that the swf is embedded in WITHOUT having to reload the page.
I tried the LoadVars() Object, it send() variables fine but the page reloads, and it loops so I get a million windows opening...what do I do? I need to be able to communicate back and forth with the cfm files...
I'm develloping a little image loading application for a client. the same swf has to be reused over and over to load the files. They are passing me the image location in the embed tag but they are not using the usual
I'm working on a project that requires me to load variables into my movie dynamically.I've gotten to the point where I get the variables loaded into flash. But then I cannot use them dynamically once inside flash. I understand code pretty well But I am relatively new to actionscript. The variables have to be used dynamically because I'll never know how many variables there will be. Could be 1 could be zero, could even be 1000.So say my loaded variable var.txt had this line in it.
i want to turn the visibility of a button clip on or off from within my loaded XML code. i know that my xml is loading and working correctly. in my XML file, i have visible="true" set up as an attribute to one of my nodes. what do i need to do to get_root.myButton._visible=[the variable from my XML];
...has got to be the most confusing and difficult thing to do in Flash. I've made this racing game, gone through all hell to get it working, and I'm nearly completely done with it, nearly. Now, heres the deal, I want to send and load best racing times off to .txt file.It sounds simple don't it. When the .fla loads, a function goes and grabs variable from the file, When the race is over, the function sends stuff back to the .txt. I simply can't get it working, I've tried so many versions of the code but it still doesn't work. Heres an example
Code: function loadVariables() { loader = new LoadVars();
The flash php script I am using works fine with variables assigned directly from the script. Once I use php to gather the variables dynamically it does not work.
Here is an example that works:
<?php $tour_city = 'WALNUT CREEK ~ $1,450,000'; $tour_address = '55570 PACIFIC HEIGHTS, WALNUT CREEK, CA'; $tour_unid = 'TOUR #644657';
[Code]....
I have been trying to see what the problem is and can't make it work.
WHy o why in the world doesnt this work? I've done this quite a few times at home on my PC, but now I'm on-site with a client who has nothing but Macs. "Sure, no problem" I told my AD, "I can do that...".I'm trying to load variables from an external .txt file into Flash MX and this is the code I'm using:
links = new LoadVars(); links.load("assignLinks.txt"); links.onLoad = function(success){
I'm trying to load some variables dynamically from a text file, when a button is pressed. They will not load on first press , but on second or subsequent presses they will.
I am developing a flash board game which entails moving a piece around a board as a result of throwing a dice (the person will either move the dice themselves or it will move according to the outcome of the throw). When they land on particular squares I am going to have a random question (this is going to be a loaded SWF) appear that will have a multiple choice questions. My question to you guys is this. Can I save the result of 'multiple choice question' within the main movie / separate movie and then use this variable? I think essentially what I am asking is how do I load a variable from an external SWF.
How to load variables from an external source? For example, Lets say I have a movieclip that contains 6 keyframes, and I want flash to load the proper keyframe when the main swf is opened. Flash knows what the proper keyframe is, because that variable is stored in a MySQL database, or txt file, or xml file, or whatever. Also, how could i have flash write to an external file, so that i can save the changes.