ActionScript 2.0 :: LoadVars() Only Working On One Set Of Objects?

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


Similar Posts:


ActionScript 2.0 :: [mx] Working With LoadVars From PHP, In Flash?

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

ActionScript 2.0 :: LoadVars On The Server Is Not Working?

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

ActionScript 2.0 :: Loadvars Not Working On External Domain?

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

ActionScript 1/2 :: Loadvars Not Working On External Domain

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

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

ActionScript 2.0 :: Don't Use Absolute Paths When Working With Loadvars

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

ActionScript 2.0 :: [CS3] LoadVars.sendAndLoad Only Working On Some Computers

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

ActionScript 3.0 :: Flash AS3 Loadvars Not Working After Publish

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

ActionScript 2.0 :: TUTORIAL Error - Change LoadVars() Into LoadVars()?

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

ActionScript 2.0 :: Using LoadVars.getBytesLoaded And LoadVars.getBytesTotal?

Sep 1, 2003

Whenever i try to display anything returned by LoadVars.getBytesLoaded or Load....Total, it gives me NaN.

View 14 Replies

Professional :: Working With Large Objects?

Oct 12, 2010

I am preparing a navigation (using panning) movie in Flash. There is very big (6000x4000) image (area photo from top) on the stage and it's position moves once user moves his mouse. Thus, user can navigate on the area.But flash really drives me insane while working on this movie. It usually suddenly stops and quits with error.I'd like to ask what can i do? should i use a different method???It seems, Adobe becomes stupid on large files and there are bugs in somewhere Flash. For example; how can i use a method like Google Maps (it loads an another image when you move another position. Not loads all images together and doesnt consumpt large amount of resources.)?

View 1 Replies

ActionScript 2.0 :: Working With Sound Objects?

Apr 7, 2003

I came accross this very comprehensive webpage about sound objects in flash mx about a month ago. Since there has been 2 or 3 threads started about working with sound just today, thought i'd share it [URL]..

View 5 Replies

Flex :: Inserting Objects Into Database From App Not Working?

Mar 1, 2012

I am trying to make a mobile app that inserts information into a database and while I have it pulling information and I have created my services, when I use the standard create service that Flash Builder 4.6 automatically makes, it just does not insert anything at all into the database.

Now, as far as I am concerned, this should then be writing to the database the items of SesID, Lat and Long using the created service token, but when I do this, nothing has entered into the database at all.

View 1 Replies

ActionScript 2.0 :: Why Are Counter Created New XML Objects Not Working

Nov 24, 2006

Why does this work...

textForContent = ["1.xml","2.xml","3.xml","4.xml","5.xml","6.xml","7 .xml"]
counter = textForContent.length-1;
while (counter>=0){

[code]....

And this does not work? All I've done is try to create 7 new XML objects using the counter...

textForContent = ["1.xml","2.xml","3.xml","4.xml","5.xml","6.xml","7 .xml"]
counter = textForContent.length-1;
while (counter>=0){

[code]....

View 3 Replies

ActionScript 3.0 :: Flash - Share Objects Only Working Locally?

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

Actionscript 3 :: Shared Objects Not Working Correctly In Flex - Mobile

Apr 11, 2012

I have a very simple test going with shared objects in flex with mobile I have a person class.

package
{
import flash.display.MovieClip;

[Code]....

If I clear out the so it show the [object Person] again, but comment out get the ,,,

Can shared objects even store an array of objects properly. It is the same with the persistanceManager I believe.

View 1 Replies

ActionScript 2.0 :: LoadVars From PHP?

Mar 30, 2006

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

[code].....

View 1 Replies

ActionScript 2.0 :: LoadVars() To Bring In .txt?

Jan 20, 2009

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:

myData = new LoadVars();
myData.onLoad = function() {
text_txt.text = this.blog;

[Code].....

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.

View 1 Replies

ActionScript 2.0 :: LoadVars Will Not Resolve

Jan 26, 2009

I keep getting this error when I try and load a text file in a dynamic text field.

'The identifier 'loadVars' will not resolve to built-in object 'LoadVars' at runtime.'

This is my code:

Code:
on (release) {
loadText = new loadVars();
loadText.load("text1.txt");

[Code].....

I want the file 'text1.txt' when I load frame 1, then when I move to frame 2 it will load 'text2.txt' etc etc right upto 20.

View 2 Replies

ActionScript 1/2 :: LoadVars With Many Elements?

Feb 4, 2010

I want to load data from a text file with four elements (account, first name, last name, club status).  There are 88,000 accounts.
 
[Code]...

View 10 Replies

ActionScript 3.0 :: How To Replace The LoadVars

Sep 2, 2009

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();

[code]...

View 1 Replies

ActionScript 2.0 :: Possible To Repeat LoadVars?

Dec 29, 2009

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]...

View 4 Replies

ActionScript 2.0 :: Php And .txt Using LoadVars And LoadVariables?

Feb 15, 2010

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();

View 5 Replies

ActionScript 2.0 :: LoadVariablesNum To LoadVars?

Feb 8, 2003

When I was working with a txt file locally I used this command

file = new LoadVars();
fileURL = "PhoneBook.txt";
file.load(fileURL);

[code].....

View 7 Replies

ActionScript 2.0 :: LoadVars - Getting Variable From PHP?

Sep 27, 2004

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.

View 4 Replies

ActionScript 2.0 :: LoadVariables To LoadVars?

Apr 19, 2005

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:

Code:
on(rollOver){
loadVariables("document.php", _parent, "POST");

[code].....

View 1 Replies

ActionScript 2.0 :: Loadvars():sendAndLoad()?

Aug 1, 2005

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.

[Code]...

View 11 Replies

IDE :: Extracting Data From LoadVars?

Jul 11, 2010

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.

View 2 Replies

ActionScript 2.0 :: LoadVars + Php = Undefined?

Sep 12, 2007

This should be a rather simple thing to do. Server is running, files are in my htdocs folder. but it just reports undefined.

Code:
var cat = new LoadVars
function printOut(success){
frankencat.text = cat.id;
}
cat.load("test.php");
cat.onLoad = printOut();

PHP Code:

<?php     print "id=lalalalalalalalalalallalalalalalalalalalalalalalalalalala";?>

View 3 Replies







Copyrights 2005-15 www.BigResource.com, All rights reserved