Tracking Forums, Newsgroups, Maling Lists
Home Scripts Tutorials Tracker Forums
  Advanced Search
  HOME    TRACKER    Flash




Data Sending



Hi,

Can we store text data in side the flash file, ie., linking to a movieclip which is located in the library or any other ways.


Cheers!!!

Manoj



ActionScript.org Forums > ActionScript Forums Group > ActionScript 2.0
Posted on: 07-22-2007, 10:46 AM


View Complete Forum Thread with Replies

See Related Forum Messages: Follow the Links Below to View Complete Thread

Sending Data Via Php
i ave a button that sends the variables to php but i want to load to data from a loaded move.


this works
------------------------------------
submit.onPress = function(){
______if(Title.text!="" && Comments.text !="" && Image.text!=""){
________myData.Title = Title.text
________myData.Comments = Comments.text
________myData.Image = Image.text
________myData.sendAndLoad("save.php", myData, "POST")
______}
____}
____stop()
---------------------------------
when i have the button on the loaded movie it doesn't

loadedmovie.submit.onPress = function(){
______if(Title.text!="" && Comments.text !="" && Image.text!=""){
________myData.Title = Title.text
________myData.Comments = Comments.text
________myData.Image = Image.text
________myData.sendAndLoad("save.php", myData, "POST")
______}
____}
____stop()
------------------------------------
please help

Sending Data To .txt
How would i go about sending data to a .txt file via a .swf?

For example i have 2 inputs, name and surname. When people input their name and surname into these and then click an Ok button or something, it sends the data to the .txt file on the server.

I know i need to use php but im not sure how to use php and flash to do this...

Help please!

Thanks in advance.

Sending Data To Php
i use this way to send data to php


Code:
var str = TEXTAREA.htmlText
var loader = new URLLoader();
loader.dataFormat = URLLoaderDataFormat.TEXT
loader.load(new URLRequest("addData.php?data="+str));
loader.addEventListener(Event.COMPLETE,dataLoaded);
function dataLoaded(e:Event)
{
trace("complete");
}
it works ok but when the data is little long like 17 lines
it gives "Error opening URL"

is there a way for sending long string ?

Sending Data
I am trying to send 2 strings to a .aspx webpage. What is the easiest way to do that using post?

Sending Data To Php
I´m trying to understand how to send a value from an radiobutton to an php file.
I have an example and description of what I'm trying to do Here

My knowledge in AS in not very good, so I don't really know where to start, but I've heard that I need to use the LoadVars class or something like that.
Anyone know how to handle this problem or have any suggestion how to startout the AS code?

Sending Data To Php
Well people , here goes the problem , I know really not much about php , except for a few commands that allow database control and a few commands for reading this data and forming it as xml.
My greatest problem is how do you send data from a swf to a php script so that it can save it in a database.
PLEASE I BEG YOU DO NOT TELL ME "USE POST METHOD".I know it is what i have to use the question is HOW ? please post some action script code which for example which makesa simple textfield and when user inputs some text and clicks a btn the sfw sends that data to a php script ... then just a little example of how the php should look ... i mean it to be made to recieve the passed data from the swf and save it to a variable.
Any help will be grately appreciated , i am trying to do that for quite a long time and i always screw it .Thanks for your attention.
With respect and warm regards , fassa.

Sending Some Data To PHP...
I need some tips on how to send out some data to a PHP file. I have a project set up already where you vote for some options and that sends, but now I need to add some input text fields for people to enter some personal information. What I have right now are two fields with the vars of "name" & "email"

And here's the code that is sending out the information to the PHP file:


Code:
submit.onRelease = function():Void

{
sendVars();
_root.gotoAndStop(2);
}

myLv.onLoad = function():Void
{
trace("data sent");
}
function sendVars():Void
{
var len:Number = resultArray.length;
for (i=1;i<len;i++)
{
myLv["var"+i]=resultArray[i];
}
myLv.sendAndLoad("myphp.php",myLv,"POST");
}
I've tried a couple of different ways but so far all of them failed, they included creating another function like the "sendVars" function to send with the submit button and I also tried placing some code into the "sendVars" function relating to the "name" & "email" vars.

If anyone could provide some help on how to do this I would greatly appreciate it. Thank you so much!

Sending Data To A Var
Hi i have a question.
I made a flash file were people can fill in there name and then press enter and lateron there name will be visable in a other textfield with in the clip.
Now i made the following script in frame 1:


Code:
enter_btn.onPress = function() {
if (input != undefined && input != "" && input != "fill in please"){
email = input;
gotoAndPlay(2);
} else {
input = "fill in please";
}
}
this works great, 'input' will bring the filled in name too the textfield with the var called 'email'.

Now i moved the 'email' var within a different movieclip with a instance name of form.
When i fill in the name in the beginning the 'input' var and 'email' var are not communication nomore. How can i make sure 'input' will give the data to the 'email' within the other movieclip ?

Can someone help me please ?

Sending Data
Hi is there any way to send a variable(data) form Flash(AS3), to a VC++ program?

Sending Data
Hi
I have created a questionnaire regarding my website and have used the following code to send the information:

myForm = this;
submitButtonListener = new Object();
submitButtonListener.click = function() {
    var email = "GISFeedback@hotmail.com";
    var subject = escape("Questionnaire Feedback");

// The following code is an example of how the radio buttons are set up
var selectedRadioButton = Quality.selection;
    var radioLabel = selectedRadioButton.label;

//The user can also add comments at the end of the questionnaire  
var comments = Input.text
    Input.text = ""  

var body = ("Q1:"+radioLabel+Comments"+comments);
    getURL("mailto:"+email+"?subject="+subject+"&body="+body);
};
submitButton.addEventListener("click", submitButtonListener);

The problem occurs when the user selects the submit button.  On some computers the user is taken to their default email programme, such as Hotmail.  In other cases Outlook automatically loads up.  In both cases an email is created and the information from the questionnaire is displayed.  The user then has to press send to submit the data.  However, on some computers Outlook does not load up and the user is not taken to their default email programme.  Therefore not being able to send the information.  Preferably, I would like the user just to select the button and the data is sent without them having to go into any email programme…is this possible? I have read a few of the responses from previous inquires of sending data in flash and have seen information on Cold Fusion forms and asp forms but not understanding if I need them for this task?

Thank you for your time and help
Rich

  


SENDING DATA
Hello all,


I have been wrecking my brain trying to send form data or variables from Flash using 3.0 as.

AS3 in my opinion seems a little confusing.

Can someone PLEASE help me. I cannot not write to the database or send emails

Please see my code below.

import flash.net.*;
import fl.controls.*;
import flash.display.*;


submit_btn.addEventListener(MouseEvent.CLICK, clickHandler);
function clickHandler(event:MouseEvent):void {
checkForm();
}

fname_ti.addEventListener(KeyboardEvent.KEY_DOWN, formListener);
email_ti.addEventListener(KeyboardEvent.KEY_DOWN, formListener);
mess_ti.addEventListener(KeyboardEvent.KEY_DOWN, formListener);

function formListener(event:KeyboardEvent):void {
if (event.keyCode == Keyboard.ENTER) {
checkForm();
}
}

fname_ti.setFocus();


function checkForm():Boolean {
// ensure that the username_ti field isn't blank.
if (fname_ti.text.length == 0) {
// if the username_ti field is empty, display an error message in the status_lbl Label instance.
status_lbl.htmlText = "<font color="#EFDFDC">Please enter your name.</font>";
// set the form focus to the username_ti TextInput instance.
fname_ti.setFocus();
// exit the checkForm function.
return false;
}
// if the password_ti TextInput instance is blank,
// display an error message in the status_lbl Label instance and exit the checkForm function.
if (email_ti.text.length == 0) {
status_lbl.htmlText = "<font color="#EFDFDC">Please enter your email address.</font>";
email_ti.setFocus();
return false;
}

if (mess_ti.text.length == 0) {
status_lbl.htmlText = "<font color="#EFDFDC">Please enter password.</font>";
mess_ti.setFocus();
return false;
}
// clear the status_lbl Label instance
status_lbl.text = "";

//-----------------------------END OF FORM CHECKING------------------------//




var post_vars:URLVariables = new URLVariables();
post_vars.fulname = fname_ti.text;
post_vars.emailaddress = email_ti.text;
post_vars.yourmessage = mess_ti.text;


var postURLRequest:URLRequest = new URLRequest();
postURLRequest.method = URLRequestMethod.POST;
postURLRequest.data = post_vars;
postURLRequest.url = "http://www.anutujewelry.com/contact.asp";


sendToURL(postURLRequest);


return true;
}

Sending Data To PHP.
Yes, I know this was posted about before, but I could not get things to work. I thought I had the code right, but I guess not. I know my PHP file works because I did it else where. So it appears that the vars are not sending.

Could someone take a look and tell me if they see anything wrong? I got the base code from a tutorial which I got to work just peachy, but when I tried to add extra vars it choked.

The FLA is attached(AS3). It would not let me upload the PHP as a PHP file or as plain text. If you want to see that let me know and I can post it here.

Thanks a bunch.

Sending Data In Querystring
Hi all,

I'm making a calendar with php/mysql backend - it loads data re events using the xml object and I've been trying to stick to one function that loads the xml and sends requests to insert/update/delete in the querystring too - this works for delete and null (just do a select query) but not insert or update:


Code:
function doXML(arg,queryString) {
if (!myXML) {
usersXML = new XML();
usersXML.onLoad = usersHandleLoad;
usersXML.load("security.php?action=users");
myXML = new XML();
myXML.onLoad = handleLoad;
SearchResults = new XML();
searchResults.onLoad = searchResultsHandleLoad;
}
if (objectHolder) _root.objectHolder.removeMovieClip();//remove clip containing data objects if there is one
_root.attachMovie("holder","objectHolder",topDepth);
topDepth++;
if (resultsHolder) resultsHolder.removeMovieClip();
_root.attachMovie("holder","resultsHolder",topDepth);
topDepth++;
setDateVars();
var theURL = "action.php?action="+arg+"&startMonth="+phpStartMonth+"&endMonth="+phpEndMonth+queryString;
var altURL = "loader.php?action="+arg+"&startMonth="+phpStartMonth+"&endMonth="+phpEndMonth+queryString;
arg == "search" ? searchResults.load(theURL) : myXML.load(theURL);
}
Seeing as this doesn't work I've tried other ways, like using loadVariables with the POST action to send the inser request and used xml only to receive events, but I can't make that work either. I know my php works though because if I send it in a getURL it works fine. (This needs to be in the background though).

Thx for reading this - any ideas??

Sending Data From Flash
Hi

Here are my problems.

1. how can I set a Variable to a button

2. When that button is pressed how can I send that variable to an ASP page

Please help. I am new to Action Scripting and if you could give me as much detail as possible I would be very greatfull.

Thanks

Derek

Sending Data To A Pop-up Window
i'm opening a pop-up with getURL and i'd like to pass some variables to the flash movie in the new window. how can i do this? is it possible to do with getURL? thanks a lot.

Sending Data Forms
I'm not sure what i'm missing here, it's obviously Active Script, but i am trying to create a mailer form, however I don't know how to compile all the data and send it to my inbox. I've looked at pre-fabs on the site, and unfortunately they don't make sense.

Thanks for your help!

Adam

* * Sending Form Data * *
i have a form in flash. Right now I want it so that on Submit, i link it to an asp page which processes it. How do i pass the form's data to the asp page? Or, can flash process the info by itself?
I'm using Flash MX

Sending Data Back To ASP?
Hi,
I want to send my input text value back to ASP so that i can update teh database with that.
Now I have an ASP page which has some recordset operations and then i do Response.Write(variables=value&...). these variables, i am able to get in my movie that contains input text and few dyn. text fields. Once teh user has changed teh value in input text field, how do i get that in teh same ASP.do i need to define variables in my ASP page or i need to have separate ASP page that will take in theses vars and update teh database???

Pls help ,
Thanks,
shilps

Sending Data Back To ASP
Hi,
I want to send my input text value back to ASP so that i can update teh database with that.
Now I have an ASP page which has some recordset operations and then i do Response.Write(variables=value&...). these variables, i am able to get in my movie that contains input text and few dyn. text fields. Once teh user has changed teh value in input text field, how do i get that in teh same ASP.do i need to define variables in my ASP page or i need to have separate ASP page that will take in theses vars and update teh database???

Pls help ,
Thanks,
shilps

Flash And XML And Sending Data To DB
Can I send xml data from flash directly to the db or do I need some other language(php, pearl....) to send it to the db.

Sending Data To My CF Database...
I want to use flash as an interface and send data entered in text boxes to my access database via flash. How?

Sending Data From One Clip To Another
How do I add a number to a textbox in the main movie from a movie clip inside the main movie with a button inside it. The buton is to be clicked.
Or How do I add a number to a textbox from clicking on a movieclip.

SENDING DATA TO A .txt Or .csv File
Hi, I have been looking for a tutorial to enable me to set up a flash movie with say 10 buttons. Each one has a name and when you click it sends the name to a .txt file and builds up a list of the choosen buttons. Does anyone one of a php script that I can learn from?
Cheers
J

JavaScript Sending Data To Swf?
hello all-
in developing a standard HTML page that contains a small flash banner type thing, the swf would load and begin playing before all the page graphics... therefore prompting my client to ask...
"Can that movie begin playing after the page is all loaded?"
so after trying a few things, here is the scenario that I was able to work out...
writing a javaScript function:
function passToFlash() {
window.document.startFlash.SetVariable("go", "1");
}

placing this in my HTML object tag:
ID="startFlash"

placing this in the EMBED tag:
name="go" swLiveonnect=true

then in my flash movie, frame 1 action is:
if(go==1){
gotoAndPlay(5);// start of movie
}

frame 2 ActionScript:
gotoAndPlay(1);

to initiate the javaScript function I have this in the HTML BODY tag:
onLoad()="passToFlash()"

this works perfectly on Windows IE, but nothing else.... anyone ever have any luck with this sort of thing... or have any other suggestions on how to go about achieving this.

any comment, thought or suggestions would be greatly appreciated.
thanks in advance for the help.

Sending Position Data To ASP
Hi all, I have a movie with drag and drop icons, which can be placed anywhere, rotated etc.

My problem lies in that I can't find a way to track all the movieclips down which have ben dragged out, in order to send the position data out to an ASP script, which will add the data to a database.

I was using a loop to try and target all the movieclips (they are all named object10, object11, object12, etc)

I tried using the code below:

Code:
on (release) {
for (i = 10; i < objCount; i++) {
trace(object[i]._name);
}
}
but it returns "undefined" as the result. I also tried different combos but all I get is strings, numbers, and objects as a return. How in the world can I get Flash to target my movieclips? I'm so stumped.

If anyone can help, great!

I've attached my .swf file (Flash 8) so you can get a visual on my project.

Thanks.

Sending Data From A Combobox
Does anyone know how to send data from a Combobox using the general form layout? i.e. I have a working form set up that uses a .php script to transfer the data to my email account, I need the info from my Combobox component to transfer as well.. any help would be awesome! Thanks!

Sending Data Remotely
Hi,

Without worrying about specifics (unless you want to give me specifics ), is it possible to have flash/ASP residing on a remote server (which I have no control over, other than uploading the site, and has not database functionality) to send variable data to another, separate server (PHP perhaps, perhaps not) for inclusion in a database? (sendAndLoad??, .send??)

Thanks!

[F8] Sending Data & Servers
2 Questions:

1. Is there a way for flash to send data to a server, like an MC position when an action is done?

2. is there a way for the server to send data back. Or at least like a getData option then you enter the server name or something?

I would really like to know. I think #1 is possible but im not sure about #2...

thanks

Sending POST Data
I've been picking up AS3 but one of the things that I just can't seem to figure out is how to SEND and LOAD data from a .php file. So far I've been able to load data but I can't give it any parameters. I have written an example of AS2 code, can someone please convert it to AS3 so I can finally see exactly how to do this?
Example:

Code:
var server:LoadVars = new LoadVars();
server.passcode = "ABCDEFG";
server.user = "Person";
server.onLoad = function(){
if (this.loaded == true){
trace(this.returnedData1 + " " + this.returnedData2);
}
}
server.sendAndLoad("http://www.mysite.com/coolpage.php", server, "POST");
Thank you!

Sending Data From Flash
I have an swf which pulls in a URL string of information gets 2 numbers (a current amount and the previous amount) and counts from the lowest to the highest. When it reaches the higher amount it swiches to 2 different numbers and repeats the process. The swf is also clickable and the link it sends you to changes with each set of numbers it is cycling between. Still with me?

Ok what i need to do now is for flash to make a note of when the swf is clicked and which url it is linking to. i am a total novice when it comes to flash and server side scripting so can anyone help me or give a link to somewhere that can?

Sending Data Out Of Flash
Hello

The situation is thus:

I have built an online activity, at the end of the activity e.g. when the user reaches the finish frame, I want an email with the users score to be sent to a specified email account, this should happen automatically without any input from the user. Does anyone know how I can achieve this?

Thanks

Sending Data To PHP File
I have tried so many ways to send data to my php file. I need help creating an actionscript to send the username and password from my flash page to the authentication page (php).

Script (I placed it on "frame action" timeline). Is this the right place to add the action script below...

submit_btn.onRelease = function() {
//call php to verify the correct username and password
uname = uname.text;
pass = pass.text;
getURL("test.php", 'POST');
};

XML Socket Not Sending Data
I am using flash 8 pro.

I have a little app that sends xml via an xml socket. It works fine on my desktop where I am running a small webserver and a socket server. However, when I change the socket address to the WAN ip and run the swf from outside it will not send data to the socket. It says it connects to the socket, yet there is no data seen on the socket, so the swf is not sending the data to the socket. From the outside I can telnet into the socket so I know its open and working from the outside.

In the fla file I have the socket open using the ip address like this:

Code:
mySocket.connect("xx.xx.xx.xx", 9999);
Should I use the www.myUrl.com instead of the ip?

The swf is being served from the same address... Now, the port is forwarded to one machine while the webserver is forwarded to another machine..

What do I need to do for the swf to transfer data through the xml socket?

Having Some Issues With Sending Data
**Error** Scene=Scene 1, layer=actions, frame=142:Line 7: Syntax error.
message_send = (substring(message_send, 1, msg_count-2)) add "
" add (substring(message_send, msg_count+2, (length(message_send))-msg_count+2));

Total ActionScript Errors: 1 Reported Errors: 1

any ideas whats wrong there?

Sending Data To .swf File
I need to use ActionScript to send data to a .swf file (such as text to be displayed, colours to use, and so on).

How can data be sent from the script to the .swf file?

Thank you.

Sending Data To Flash
I have a list of time like this.

10am, 11am, 12pm

And I need to send that to a flash file how can I do that?

Also inside the flash I need some how loop the list and set the image to be displayed or not.

For example in the 10am spot I have a picture of a check box and if the user is available at 10am I will display a check in the 10am, if not hide the check box.

So I just need some help to send that list inside flash, and how can I make a loop in the list.

Sending Form Data
Hello. I'm hoping someone can assist. I think this is probably pretty simple, but I only know basic Actionscripting -- learning more as I go along. I have one input text field and a submit button. This is a small Flash form that I'm creating for a client to put on their website. I have this info from their developer to use for this form...

// Form action url
&form_action=http://webpage&
//
// Info Box Field Names////////////////
&request_text_field_name=request_text&
&p_user_id=2345&

I just need to know how to use this in the Flash file to get the info to send. If this is fairly simple, I would appreciate it if someone could tell me how to do this, or point me towards a tutorial or something. Or just let me know that it's a bit complicated and I'll get someone else to do it for me! Thanks in advance!

Sending Data From ComboBox
i realize i'll need php to be the middle man, but this is my first time trying to collect data from a component. i need an example of the script i'll need. the ComboBox is full of 'labels' for the user to pick from, labels being States (Arizona, Alabama,.....) how do i set this up so flash will send the data the user selects to a php file?

Sending Data To A PHP File
Hi, I would like to set up a form that users can fill out on my web site, and then submit it to a php file on my server. How can this be done? I am still new to all this so I'd greatly appreciate an explanation with easy to understand steps.

I would like to have several fields:

title, link, description, subject, creater... and then to log the date. Is this possible? Thanks so much!

New To Sending Data In Flash
Hello!

I will be creating a program to use for data entry. I'll be studying zebras in kenya and I won't have the internet there as I'm recording the data. I'd like to be able to send the data I generate in flash to an external text file.

I understand I need some sort of script to do that, but is this something I can run just on my machine? And what kind of script would I need? (I'll probably make the data into xml format)

Thank you for any help!
Heather

Sending Data Form, Php And As3
Hi all,

Being looking into as3 and php, found the following code snippets:

AS3
var request:URLRequest = new URLRequest( "

Sending Data To Server
this is the first time i've used flash to send data to a server. what i'm doing is sending input form data to a coldfusion mail page. check out the syntax that is causing the problem.

stop();
emailAddress_txt.text = "join the mailing list?";
var emailAddressData:LoadVars = new LoadVars();
var rollOverSound:Sound = new Sound(home_mc, experiments_mc, resources_mc, contact_mc);
function submitEmailAddress() {
if (emailAddress_txt.text = "") {
emailAddress_txt.text = "please enter email address";
} else if (emailAddress_txt.text = "join the mailing list?") {
emailAddress_txt.text = "please enter email address";
} else if (emailAddress_txt.text = "please enter email address") {
emailAddress_txt.text = "please enter email address";
} else if (emailAddress_txt.text.indexOf("@") < 2) {
emailAddress_txt.text = "enter a valid email address";
} else if (emailAddress_txt.text = "enter a valid email address") {
emailAddress_txt.text = "please enter email address";
} else {
emailAddressData.sendAndLoad("http://localhost:8500/pulsated_experiments/flashEmail_processor.cfm", emailAddressData, "POST");
emailAddress_txt.text = "thank you";
}
}
rollOverSound.attachSound("rollover");
home_mc.home_btn.onRollOver = function() {//home_btn actions--------------------------------------
_root.home_mc.gotoAndPlay("rollover");
rollOverSound.start(0,1);
}
home_mc.home_btn.onRollOut = function() {
_root.home_mc.gotoAndPlay("rollout");
}
home_mc.home_btn.onRelease = function() {
getURL("index.cfm", "_self");
}
experiments_mc.experiments_btn.onRollOver = function() {//experiments_btn actions-----------------
_root.experiments_mc.gotoAndPlay("rollover");
rollOverSound.start(0,1);
}
experiments_mc.experiments_btn.onRollOut = function() {
_root.experiments_mc.gotoAndPlay("rollout");
}
experiments_mc.experiments_btn.onRelease = function() {
getURL("experiments.cfm", "_self");
}
resources_mc.resources_btn.onRollOver = function() {//resources_btn actions-----------------------
_root.resources_mc.gotoAndPlay("rollover");
rollOverSound.start(0,1);
}
resources_mc.resources_btn.onRollOut = function() {
_root.resources_mc.gotoAndPlay("rollout");
}
resources_mc.resources_btn.onRelease = function() {
getURL("resources.cfm", "_self");
}
contact_mc.contact_btn.onRollOver = function() {//contact_btn actions-----------------------------
_root.contact_mc.gotoAndPlay("rollover");
rollOverSound.start(0,1);
}
contact_mc.contact_btn.onRollOut = function() {
_root.contact_mc.gotoAndPlay("rollout");
}
contact_mc.contact_btn.onRelease = function() {
getURL("contact.cfm", "_self");
}
logo_mc.logo_btn.onRollOver = function() {//logo_btn actions---------------------------------------
_root.logo_mc.gotoAndPlay("rollover");
}
logo_mc.logo_btn.onRollOut = function() {
_root.logo_mc.gotoAndPlay("rollout");
}
logo_mc.logo_btn.onRelease = function() {
getURL("http://www.pulsated.com", "_self");
}
form_mc.form_btn.onRollOver = function() {//form_btn actions----------------------------------------
_root.form_mc.gotoAndPlay("rollover");
}
form_mc.form_btn.onRollOut = function() {
_root.form_mc.gotoAndPlay("rollout");
}
form_mc.form_btn.onRelease = _root.submitEmailAddress;

i'm stumped any help would be most appreciated.

thank you for your time.

Q: Go To Page After Sending Data
I'm sending data via LoadVars to a page. I am not sure how to visit that page after sending the data and having the data show up. The only thing I want to stay away from is adding my vars to the end of the URL and then accessing them via GET. Are there any other ways you guys can think of?

My code:

PHP Code:



sendData = new LoadVars();
sendData.myVar="Test";
sendData.send("test.php",  sendData, "POST"); 




Thanks!

Sending Flash Data To Php
Hi,
im trying get flash data into php. I have tried some turtorials on this site, and doesnt get them to work. This simple one for example flash here

I have flash mx2004 pro (trial), wamp -who consist of Apache, mysql and php5.

I'm currently working on this code(taken from another turtorial): Flash -
submit_btn.onPress = function () {
var sendlv:LoadVars = new LoadVars ();

sendlv.navn = navn_txt.text;
sendlv.alder = alder_txt.text;
sendlv.send("skrivtilfil.php", _blank, "POST");
navn_txt.text = "";
alder_txt.text = "";

}

With 2 input text fields and 1 button.

php -
<?
$navn = $_REQUEST['navn'];
$alder = $_REQUEST['alder'];
$file = "yes.txt";
$fp = fopen($file, "a+");
$data = fread($fp, 80000);
ftruncate($fp, 0);
$new = $navn . ".:-:." . $alder . ".:-:." . $data;
fwrite($fp, $new);
fclose($fp);
print "&navn=" . $new;
?>
This wont work either. I have tried with $_POST and $HTTP_POST_VARS too.

There might be some wrong with how I try test it? I publish and run the swf file, then open the skrivtilfil.php through wamp, on adr http://localhost/skole/skrivtilfil.php iow on my local apache server.

Any help would be appreciated.

Arodin

Sending Data Via ASP And Then Viewing
I have just downloaded the tutorial on Flash Forms and Database Integration and I want to display the enterend first and last name from the just entered entry in ASP in a SWF and then view all entries in database on the SWF.

I actually know ASP but all my attempts in doing this have failed.

Sending Data From Flash To ASP
Just before I start I want to sya that I have seen the tutorial on how to do this on kriupa but IT DOESNT WORK FOR ME!

I am making a flash sign up form that sends the input data to ASP then to the database. In flash I have put input text boxes with variables like email and username etc. Now on my ASP page I have:


Code:
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<%
Path=Server.MapPath("DATABASEname.mdb")
Set signup = Server.CreateObject("ADODB.Connection")
signup.Open "Driver={Microsoft Access Driver (*.mdb)};" & _
"DBQ=" & Path
SQL = "INSERT INTO members (memUser, memPass, memEmail, memRname, memDOB, memIP, memCountry, memNickname, memOccupation) VALUES ('"&Request.Form("username")&"','"&Request.Form("randpass")&"','"&Request.Form("email")&"','"&Request.Form("rname")&"','"&Request.Form("dob")&"','"&Request.ServerVariables("REMOTE_USER")&"','"&Request.Form("country")&"','"&Request.Form("nickname")&"','"&Request.Form("occupation")&"')"
signup.Execute(SQL)
%>

But its just not getting from ASP to the database. It might be that the ASP is not reading the flash input areas right. Heres the code for sending the data to ASP

Code:
loadVariables("signup.asp", [post]);


It just doesnt work I have tried for hours but nothing happens

NEED SOLUTION ASAP

Sending Data Via PHP To XML Woes
hey,

bascially all I am making is a console where someone can edit XML data. I've been working off the great tutorial for a flash XML news service but i've got a bit lost with it and I can't get my program to save the data. It reads it from the XML fine but there's some link lost between the Flash and it saving the data. Here's my code and i've attached my working files.

If anyone can help me i'd be most grateful, I am new to xml and php you see - I am no rambo.

all my main code:

Code:
function loadXML(loaded) {
if (loaded) {
descriptiontxt.text = this.firstChild.childNodes[0].childNodes[0].firstChild.nodeValue;
} else {
trace("file not loaded!");
}
}
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("secure/data.xml");
var save_script = "news_save.php";

EditNewsEntry = function(xmlData){
var entry = descriptiontxt.text
var TextNode = entry.firstChild.firstChild;
TextNode.nodeValue = entry;
}


SaveNews = function(xmlData){
descriptiontxt.Text = "<i>Saving and Loading...</i>";
xmlData.xmlDecl = ""; // fixes duplication bug
xmlData.sendAndLoad(save_script, xmlData);
}
'save' button code:

Code:
on (release) {
EditNewsEntry(xmlData);
}
the rest is attached, I just know my AS is missing something very vital.

Sending Data From ASP To Flash 8
I have come across a strange situation while trying to call data from asp pages.

In my flash file, I have 2 dynamic text fields, each one is pointing to a different asp page on a server. The strange thing is that when testing locally it works but when testing the swf online, the word 'undefined' shows up. I'm lost and am not sure what else to try.

Here is the AS I've placed in the first frame of my movie:

Code:
var msg
var jackpot
loadVariablesNum("http://www.mysite.com/hotpot_jackpot.asp", 0);
loadVariablesNum("http://www.mysite.com/hotpot_msg.asp", 0);
Any help to put me in the right direction would be greatly appreciated.

Thanks

Sending XML Data With Flash (help Me On This One )
Hello and thanks for looking at this thread.

im Currently in a situation where i do not know what i can do.

im building this Quiz game for a client, and that in it self is simple as simple can be.
BUT. requested have it been to have a Admin function. and that is also rather simple (if u already know the basics of FLash and XML together, and some ASP. hehe).

so my setup is like this.

its a multiple choice Quiz game.

i have some dynamic textfields in the flash document(these beeing the question and the answers). that gets its data from an XML. this XML is called in flash by pointing to a ASP page, and that page determins wich xml to load (i.e the admin can have more xmls/ quizeses at a time) then i have custom made check boxes, which, when clicked, calls for some other data in the xml, and that is the string of the anwser the user chose. that data then gets parsed to a variable. so i can only have one anwser at a time. then i have a ASP page which can check if the string that is chosen is the correct answer. BUT how do i parse the variable data (the one that contains the chosen answer string) out of flash and on to a third ASP page wich stores this data in a second XML document?

the .sendAndLoad and .send functions apperantly only works for XML data already in flash.. so do i create a XML varialbe INSIDE flash (not having a .xml file seperately outside the .swf) and tell that XML variable to equal the string in the chosen answer variable? and then send THAT xml somehow? or... is it possible at all..

the good news is that my function to call different xmls using the same function WORKS! gratz to me! (using xmldata.load("linkhere.asp" + xmldataType); where xmldataType is the variable on my ASP page! it actually works so for an example u can have ONE .swf file that has this code in it (and all the dynamic texts ofcourse) and then call the flash with different content by using: webpagesomethingsomename.com/quizflash.swf?xml=quiz
and to change the contents in the quiz u just change the link extension (ex. ?xml=quiz2, ?xml=quiz3 ect)

great huh? if i could just get the last little thing to work it would be the BANGER app. also note that u can have many data in that way! (imagine creating games in swf getting ?UserNamer= userSomethi&?UserLevel=3) it really works!


Rune.

Copyright © 2005-08 www.BigResource.com, All rights reserved