ActionScript 2.0 :: LoadVars Only Loads First Var?
Jan 16, 2008
i'm currently trying to make a "create you're own guy" type thing, i dont have any clothes right now i just have skin colour and eyes, but it works on frames, like if you have frame 1 of eyes you'll have asian looking eyes. etc.
my problem is that, it only loads the first variable from my php doccument, ive tested everything, and all, switching up my 2 variables, and when EYES comes first in the doccument only eyes load, and when SKIN comes first in the php doc only skin loads...
but anyways heres my code.
Code:
Var = new LoadVars();
Var.load("http://THISISMYSITE.com/site/phptest.php");
eyes.onEnterFrame = function() {
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]......
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
Everything is embedded in an HTML site. The HTML loads a preloader that then loads the actual flash movie. Inside this movie I created a few buttons, inside a scroll bar movie clip. I want the buttons to load a whole new movie inside the same html. The code I'm using in the button is simply:
on(release) { loadMovie("new_movie.swf", 0); }
The problem is that it works beautifully in the Flash movie tester but doesn't do anything when tested inside the browser, embedded in the HTML. I think the problem is that the HTML embeds as an object the first movie, the preloader for the menu movie, not the menu movie itself.
and I have this swf file with cms that I'd like for this menu to load. Currently the swf file load external text using this code:
Code: if (contenturl1 ne "") { loadVariablesNum(contenturl1 + "/" + userid + "/content.txt", 0);[code].....
but when the xml menu loads this swf file its structure loads but not its data.I tried using :
Code: this._lockroot = true;
in the loading swf main time line but it did not work.I should also mention that the dynamic data that loads onto the swf that is to be loaded by the menu, resides not in it main time line but 4 movie clips deep .I don't know if that makes a difference or not.
I have an animated logo swf file that loads and runs once on the home page every time the page loads. The logo has been updated to appear in three different colour schemes. I want one scheme to load and when the page is refreshed or revisited, one of the other colour schemes to load in its place. They can appear in any random order, just a different one to the one that played before reloading.Can someone point me to an answer or tell me how to do it? I have found a way in JavaScript but this only works on plain images, not swf files.
the best way to do it but i have a preloader the loads an external swf that loads 2 external swf files. one on layer o and the other 1.it seems to load the swf on layer 1 twice.url...if i run the swf that loads the 2 external swf files by it's self and the same problem happens.mouse over the navagation button and then mouse over the close button and follow the animation down to were it turns back into the navagation button. sometimes the close stays up.if i run the swf file that just contains the navagation it dosen't happen.
OK, I am trying to do my first simple user authentication for a test built in Flash. I'm just checking to see if someone with the same name and email exists in the mySQL database and then echoing out entryAllowed=false if they exist.
Code: PHP Code: //query is successful and these vars trace out in flash
I have created a site that calls in text from an external .txt file. The text file is a flat file that is updateable using PHP. What I need is for the Flash site to reflect the current contents of the text file each time it's updated through the PHP interface. I'm using the standard:
I did get it to 'kind of work' at one point, but the output text would flash 'undefined', then show the contents of my text file, then go blank then start that loop over again. Not acceptable.
I am converting a class into AS3 (was AS2). What would be the best way to replace the loadVars ? This is how the code looked like in AS2
ActionScript Code: public function load(csvPath:String): void { // Use the LoadVars class to load in the CSV file as a String var csvLoad:LoadVars = new LoadVars();
I have managed to develop code that will run a php script by passing a variable (obtained from a combobox control) to the MySQL database. Initially this works fine but if I try to repeat the excercise using a different value nothing happens.[code]...
I have read a little bit about loadVars and loadVariables, so I am trying to read and write to a .txt on my server. This is my functions: (only Read works, but Send doesn't)
ActionScript Code: function Load(F, VAR) { var DATA:LoadVars = new LoadVars();[code]...........
There are no errors or something; but the file is the same after Send();
I try to get a variable from php : I have a button with : on (release) { $myLoadVars = new LoadVars(); $myLoadVars_received = new LoadVars(); $myLoadVars.var_to_php = myComboBox.getSelectedItem().label; $myLoadVars.sendAndLoad ( "script.php",$myLoadVars_received); $affich_var = $envelope_received.var_from_php; }
PHP // script.php : <? $result = mysql_query( "select counter from data_base where data1='".$_POST['var_to_php']."'"); $counter = mysql_fetch_row($result); echo ("&var_from_php=$counter[0]"); ?>
My result of all this : nothing happens. no variable is received from php. (The is no request ( from the firewall ) from flash to access the internet). So I think the error is around the sendandload. By the way, the php script works perfectly with loadVariablesNum.
Okay, so ive loaded some data from PHP into a textbox in Flash with loadVariables, but then found out, that loadVariables, havent got a way of checking if everythings loaded. So im gonna use LoadVars instead,This is the old loadVariables code:
Just wondering if you can use the sendAndLoad method of the Loadvars object to send "POST" data to a server then recieve the response in an XML object.
I am using the loadVars class (Flash 8) to load key/value pairs from a mySQL database through php (example &pic1=pic1.jpg&pic2=pic2.jpg&...).
The ultimate goal is to create a dynamic slideshow with a variable length, depending on how many pics were submitted by the user. Since the associative array object returned by loadVars does not share the "length" property of indexed arrays, my guess is that the values need to be converted into a new indexed array before being able to use them in the slideshow.
I have a project that needs to store user input on the server, then be able to reload it later.I am interested in opinions as to which separator would be best to use, ie comma, semicolon, tilde, etc. Of course whichever character it is, it will be restricted from usage by the user, so it must be uncommon.I'm leaning towards using the tilde, since I already use input textfield restrictions to prevent backticks for server security (same key on the keyboard). Seems to me as if the tilde is a very rarely used character, and so should be fine to exclude it from user inputs as well.
I need to load an image and 2 dynamic text fields tied to the TWEEN CLASSand controlling the SWF file via HTML ONLY - no PHP or external .TXT fileI want to change info in HTML code to change content of the SWF filecan this be done?
I am attempting to post 3 variables to an e-commerce page that was written in ASP.NET 2.0, but it is not working. I have deployed a simple .aspx page that echos the Request.Form object to the page so that I can see what it is receiving.When flash calls the loadvars.send() in Firefox I see what I would expect which is a list of keys value pairs.
so ive just been fiddling with a loadVars to load in some html text, into my dynamic text box, with render as html button tagged. it only loads in a certain amount of my text file (which is a .txt -- and my fonts have been embedded)./.
Code: var textData:LoadVars = new LoadVars(); textData.onLoad = function() {
[Code].....
And yeah, it just doesnt load in all the wonderful text I have written.
I'm using loadVars to load a PHP URL with lots of sensitive information required for the Flash application.Only problem is that URL can be accessed via a web browser which raises security issues if someone gets a hold of this URL. Is it possible to have the PHP page only accessible via my Flash application?
I have a flash front end that displays information and is capable of building MySQL queries and handing them off to PHP via loadVars. PHP handles the dirty work of connecting to the database, executing the queries, and returning any results. So my problem is with single quotes. In flash I can build the query string with single quotes easy enough, but for some reason php keeps doubling them up and messing up the query.
Here is an example of the flash code: ActionScript Code: var send_lv:LoadVars = new LoadVars(); var load_lv:LoadVars = new LoadVars(); load_lv.onLoad = function(bSuccess){ if(bSuccess){ trace(this.output); [Code] .....
The problem is that the sql statement that php is trying to execute looks like this: insert into mytable (field1, field2) values (''value1'', ''value2'') Where each single quote has been turned into two single quotes for some reason.
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.