ActionScript 2.0 :: FMX - Can't Get LoadVars For Saving Data

Feb 10, 2005

I'm using Flash MX (2002) and I need to get my variable values saved to a server each time my test subjects run and finish my swf/fla (PHP scripts and a .txt file on the server are being worked on, but that's a different nightmare!). I'm pretty sure I should use LoadVars, NOT SharedObject for this data capture right?. The data must not be overwritten each time over the course of a few months of data collection. The 3 variables are: username (name of the user), counter (this keeps track of which version the user chooses from the start menu), numcorrect (keeps track of the number of times the <right> arrow key is pressed).

2 main problems: I don't know where to put in the LoadVars obj (in the AS code of "finaldisplay" frame?) AND I don't know how to build/format the LoadVars object to capture the data in the 3 variables I listed above. I've got several Flash books and have done online tutorials, so for something so simple (3 lousy variables!)...why is my life so miserable? Here's my zipped .fla.

View 2 Replies


Similar Posts:


ActionScript 2.0 :: Can't Get Head Around LoadVars For Saving Data

Feb 10, 2005

I'm using Flash MX (2002) and I need to get my variable values saved to a server each time my test subjects run and finish my swf/fla (PHP scripts and a .txt file on the server are being worked on, but that's a different nightmare!). I'm pretty sure I should use LoadVars, NOT SharedObject for this data capture right?. The data must not be overwritten each time over the course of a few months of data collection.

The 3 variables are: username (name of the user), counter (this keeps track of which version the user chooses from the start menu), numcorrect (keeps track of the number of times the <right> arrow key is pressed).

I don't know where to put in the LoadVars obj (in the AS code of "finaldisplay" frame?) AND I don't know how to build/format the LoadVars object to capture the data in the 3 variables I listed above.

View 2 Replies

Data Integration :: Saving Data To A Local XML File?

Aug 22, 2006

I am seeing repeated comments on this discussion forum that it's not possible to save data from Flash into a locally stored XML file . . . but there must be a way to do this. Why is you can read data from a locally stored XML file but not update or add data to it. how absurd a design would that be, it simply wouldn't be logical!

View 8 Replies

ActionScript 2.0 :: Saving Data And Loading Data From A .txt File?

Sep 24, 2006

I have read through Shared Objects but i couldn't get it work...

I just have to save my data, maybe array into .txt file and later on
retrieve from the same .txt file...

Anyone here have an example or some source code so i can have reference on it?

View 6 Replies

Data Integration :: Using LoadVars With XML Data

Aug 17, 2006

All the examples in the text books, etc. show the LoadVars object being used with a .txt file. Can I use it with a .xml file or not? I have tried but the output panel just shows rubbish data!

View 1 Replies

Data Integration :: Creating And Saving Data

Aug 20, 2011

I'd like to know if there's a way to take data entered into a field in flash, save it, and call it later via an object.I don't want anyone to walk me through it if there is, that's not what I'm asking. I'm just asking what I need to know in order to do this. I'd like to build a certain flash app that takes information (such as a name, paragraph, and/or sentence) saves it, and can then be recalled when a user clicks a button... even if the user has closed out the application.I'm still relatively new to flash, I know enough to get by on basic projects, but I want to expand my knowledge so I don't end up stuck in a beginners rut.Would this require using PHP and Flash? Or can it be done entirely in flash via exporting data to a designated external file?

View 2 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 :: External Data From TXT With LoadVars()

Jul 16, 2011

I'm messing around with trying to load variables from a text file and it's just not working as I'd expect. First, my text file is formatted like this

[Code]...

For example, if I do something like create a simple Dynamic Text Box on the same frame as the above code, to show the value from _level0.Test.variable1, it displays "undefined" even though the debugger indicates this variable has the value "value1" as I wish it to. (using "trace(_level0.Test.variable1)" yields no better results)

I have attemped using onLoad and onData alongside the above code, and neither one has made the situation better. I have also attempted trying to reference the variable in a few different ways, and it's just returning the same thing every time. When I was experimenting last night, I managed to get the variables to show up properly on a "trace()" but not when referenced by other things in the flash file. Regrettably, I cannot remember how I did this. Either way it didn't quite work still. Do I need to do something else to be able to reference loaded data in my project, or is there some fundamental mistake I am making? I'm usng Flash CS3 Pro, if that makes any difference. Flash Player is up to date, etc.

View 0 Replies

ActionScript 2.0 :: LoadVars - Get The Data With The While Loop?

Sep 13, 2006

I'm loading data from sql, by using asp.net. I've made the script in vb, but now i have problems with flash. I can load data, by using Code: trace(this.body); But i dont't know how to get the data with the while loop

[Code]...

View 4 Replies

ActionScript 2.0 :: Getting Data With Loadvars And Put It In Array

Feb 20, 2004

I want to write out some names from a DB and then get it with loadvars and then put it in an array for easy using later, how do I do this the best way? First thing first I have made an ASP file like this:
Code:
<%
Dim objConnect, objRS, SQL, strConn, i
Set objConnect= Server.CreateObject("ADODB.Connection")
Set objRS= Server.CreateObject("ADODB.Recordset")
[Code] ....
How do I loop out this thing and put it all in an array =?

View 8 Replies

Data Integration :: LoadVars - SendAndLoad() Over Https?

Feb 20, 2007

I am having problems with loadVars over https. What I am trying to do is sending credit card information from a flash store to a PHP-script on a server over https, and the PHP-script should return a reply. (So I am using the LoadVars sendAndLoad command). The problem is that the reply I get from the script is empty. If I try the same over http, it works fine.

View 4 Replies

ActionScript 2.0 :: Loadvars Asp - Read Data - Write Value?

Oct 7, 2011

I want to make, read data from asp. How can I write this value?.

[Code]...

View 0 Replies

ActionScript 2.0 :: Limits On Sending Data With LoadVars?

Feb 21, 2008

I was wondering if anyone had found out that there is a limit to how much information can be sent with LoadVars. I guess that limit could be the number of properties of the loadVars object, or size of the properties being sent.

View 2 Replies

ActionScript 2.0 :: Sending Large Data With Loadvars?

Mar 20, 2009

I've got a small problem with loadvars. I want to send data from Flash to PHP, which usually works well. But right now I need to send "larger" amounts of data around 10-20kb and loadvars doesn't work anymore.

Using loadvars to open browser-windows seems to work fine, but I want everything to happen inside of flash.

The code is:

Code:
datastring = "1, 2, 3 (...) 4998, 4999, 5000"; // long text
loadstring = 'save.php?data='+datastring;
db = new LoadVars();

[Code].....

Works fine with small text, with big text nothing happens. How to do this the right way?

Edit: Loadvars seems to work up until 4050 characters, 4051 and it doesn't send anymore. But I can't really split the query..

View 1 Replies

Data Integration :: Adding Variables To LoadVars Object?

Apr 27, 2007

I have an application that reads a PHP script and populates the Flash applets using the following on frame 1:

[Code]...

A combobox (created with the returned data) is created on frame 61. When a selection is chosen in the combobox I need to add the value returned from the combobox to the variable catvar, add this variable to the LoadVars object and run the script again. It seems to set c.catvar initially but when I use the 'sendAndLoad command the second time c.catvar isn't included. Is it possible to add variables to a LoadVars object created
on frame 1 from frame 61?

View 1 Replies

Data Integration :: Loadvars Blocked When Run From Powerpoint 2003?

Sep 8, 2006

I have done many assignments where I have developed Flash movies that access external databases over a web pages and present the results in custom made graphs. Perfect for scorecard applications etc. The main benefit of using Flash has been that the whole thing can be embedded and run from PowerPoint,

[Code]...

View 1 Replies

Flash - LoadVars Doesn't Wait Until Data Is Loaded

Jun 8, 2009

variable = 0;
function change() {
variable = 1;
}

[code]....

The problem is that it executes #Second before #First, which means that the object is not fullly loaded but the code continues nonetheless. Is there a way handle this? I have tried using a while loop, but this is ugly and makes flash crash. Is there any decent way to handle this, does it have to do with better code structure/program flow or is there a technical way to make it wait? Also note: This code is executed on the server side, which means there are no frames involved.

UPDATE:When projects get bigger, this gets very ugly, especially when you are retrieving mulitple things from a server, you have to use very deep nesting, you have to keep repeating the same code, example for buying a serial:

a.onload() {
if(moneyAmount > 10){
b.onload(pay) {

[code]....

View 1 Replies

Data Integration :: LoadVars-using Send To Pass A Variable From Flash To Php

Mar 24, 2008

For the life of me, I've tried everything: I've researched LoadVars on Adobe forum, used David Powers' books, googled 'flash to php', LoadVars, etc. and tried sendAndLoad, send, and using $_POST, $_GET, $_REQUEST. $HTTP_POSTVARS but I keep getting this same error.

I have a Unix server running Apache/PHP 4 - LoadVars worked to load name-value pairs into an array -see thread)

My goal with this simple app is to prototype being able to pass a variable from flash to a variable in php.

Parse error: syntax error, unexpected T_VARIABLE in flash_to_SQL.php on line 5

Actionscript 2.0 code:

var c :LoadVars = new LoadVars();
c.testing = "123FOUR";
c.send ("

[Code]....

View 3 Replies

Media Server :: Using LoadVars In SSAS To Send Data To A Php File?

Mar 21, 2012

I am using FMS 4.5 and have a simple application which I want to use to send two strings to a php file. But I get a compilation error whenever I try to assign any value to these objects:
 
Here is main.asc:
 
<code>
var variables = new LoadVars();
variables.username = "uname";
variables.send(http://url.abc.com/test.php,POST)
</code>
  
I can't compile with the second line. FMS just says: Sending error message: Compilation error
 
How do I send variables to a HTTP URL?

View 2 Replies

IE Not Recognizing Post Data Using LoadVars From Flash Inside A Frameset?

Sep 16, 2010

This code is being run from a frameset in IE8. When the new window is opened, the form data is not being recognized. It appears that the http header, "content-type: application/x-www-form-urlencoded", is not being passed into IE and this is causing the post data not to be processed. The data is there, IE is just doing nothing with it.

This code works fine in FF and Chrome, and in fact the correct headers are passed in FF and Chrome.

NOTE: The new page is on a different site, but i don't know why that would cause a problem with a POST and not a GET.

Flash code:

varSender = new LoadVars();
varSender.title = _parent.tCourseTitle;
varSender.notes = input_txt.text;
varSender.send("http://example.com/notes/print.cfm", "_blank", "POST");

I have tried adding the header to the send request, but that has no effect at all. The contenttype header is still missing and it still works everywhere but IE.

My current work around is to use a GET instead of a post, but that's ugly and it limits us in the size of data we can pass but for now at least it works.

View 1 Replies

IDE :: LoadVars - Send Data From PHP To Flash - Does Not Display The Contents In The Variable

Jun 23, 2009

I would like to send data from PHP to Flash however, it sends just fine but when displaying on Flash, it does not display the contents in the variable. Instead, it displays the name of the variable. This may be a simple answer but I'm quite new to this. Here is the code in Flash.

[Code]...

View 7 Replies

Xml :: SAVING Flash Data To XML?

Jun 25, 2011

I've been all over the interwebs, including Stack Overflow, for hours, trying to identify a solid, workable example of saving information in Flash into an XML file.

I want to take the positions of two different types of objects and export the lists of each to XML. We'll call the objects ball and bat.

[Code]...

View 2 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

Data Integration :: Firefox 2.x Sending Variables To PHP Scripts With The LoadVars.send / POST Method

Dec 29, 2006

There seems to be a problem with Firefox 2.x sending variables to PHP scripts with the LoadVars.send/POST method.

<br>

The same problem doesn't occur in IE or Opera. <br>See this url for example to try in both FF and IE/Opera: here. <br>The source files are here g.zelenka@iinet.net.au

View 4 Replies

ActionScript 2.0 :: CS3 Saving Data To Array?

Mar 18, 2009

I made this simple drawing game. I would like to make it so the user can save their drawings. What would be the best approach to doing this? I know it will require arrays.

View 4 Replies

ActionScript 3.0 :: SharedObject Not Saving Data?

Aug 29, 2009

I'm working with AS3 with timeline code. I would like to save date and time a user took a quiz. This information will help check when a user took a quiz. I can see the date and time as I want, but it isn't saved. SharedObject is not saving date and time. Here is my code. How can I do this?

var mySharedObject:SharedObject = SharedObject.getLocal("sampleCode", "/");
var today_date:Date = new Date();var thismonth:uint = today_date.getMonth();var thishour:uint = today_date.getHours();var thisminute:uint =

[Code].....

View 1 Replies

Professional :: Saving And Loading Data To/from SWF?

Jul 23, 2010

I have created a simple flash animation for my employer. I basically have a square that changes color depending on which of three buttons are clicked. This is replicated about 30 times on the page. There is also about 15 circles that have a toggle button created so that when you click on the circle, they change between two colors. As I said, a very simple application.

Now, I need to save the data so that whenever someone new opens the swf, the current color combination is displayed. My way of thinking, with my limited AS3 experience, is that each button click, in addition to changing the color of a movie clip, should also send the data to a server. Then when someone opens the application fresh, I can use the URLLoader to load the most current data.

Am I on the right track, or am I missing it completely? I think I can figure out the URLLoader, but what code would I use to create the text file or xml file?Here is a snippet of my code:

var rtmColor:ColorTransform = f13335.transform.colorTransform;
var okColor:ColorTransform = f13335.transform.colorTransform;
var usColor:ColorTransform = f13335.transform.colorTransform;

[code].....

By clicking on either the rtm_13335, ok_13335, or us_13335 buttons, they will change the f13335 movie clip to the appropriate color (blue, green, or red). The default color is green.

What I would like to do is make the movie clip red, for example, then another person opens the swf, and the movie clip is red as opposed to the default green because I saved the current state to a text or xml file.

View 3 Replies

Professional :: Saving Data To Server Via SWF?

Jul 26, 2010

I have in mind a very basic swf file that allows someone to enter data (via dynamic text box), submit this data (via php), which in turns saves it as a file on the Server. This file (.txt) would be used to populate text on the main site. Most of this seems quite straight forward, and standard practice, apart from actually saving the data as a particular file and on the server (or overriding an existing file), which I'm sure comes up against problems such as FTP access and everything else, but I was wondering if someone might have an insight on how this could be done?

View 3 Replies

Actionscript 3 :: Saving Data To XML File?

Apr 12, 2012

I have a serious of games swf's loading externally from a main menu swf.What I'm trying to do is take name of the player which they input into textfield and sent it to the XML file. After this at the end of each game I want to send the time it took to complete also to the XML file.The problem I have is I don't know to to create a new user inside the XML file and then replace the default time of 00:00:00 with the time that the player has set.NameTextField is the name of the textfield.Hourtext, Minutetext and Secondtext are the names of the timer. (They are ordered like Hourtext ':' Minutetext ':' Secondtext.

AS3 code inside Flash MainMenu.swf
var XMLLoader:URLLoader = new URLLoader();
var Bytes:ByteArray = new ByteArray();

[code].....

View 1 Replies

ActionScript 3.0 :: SharedObject Not Saving Data

Aug 30, 2009

I'm working with AS3 with timeline code. I would like to save date and time a user took a quiz. This information will help check when a user took a quiz. I can see the date and time as I want, but it isn't saved.[code]...

View 1 Replies







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