PDA

View Full Version : Transfer data


Kahlil
08-01-2002, 02:46 AM
ok this is a simple stuff that I seem I am missing.

I got two pair of text fields. One pair is input data and the other is dinamic data.

First I tried to type on one input text fields and be displayed on the dinamic fields. So far so good.

I put did code on the symbol containign the input text pair.

onClipEvent (enterFrame){
var a= _root.input.title.text;
var b= _root.input.body.text;
_root.output.writetitle.text = a;
_root.output.writebody.text = b;
}

Now the next step is that instead of being passed the data on real time. I want the data to be displayed with the click of a button.

so I took out the actual output of the variables and put it into a button like this.

on (release){
_root.output.writetitle.text = a;
_root.output.writebody.text = b;
}

This however didnt work... so I want to know why it didnt and how can I make it work.

did I miss something??

Kahlil
08-01-2002, 03:09 AM
ok I found this alternative way to get the info passed. However, its not fully doing what I want.

I put this code on the button

on (release){
_root.output.writetitle.text = _root.input.title.text;
_root.output.writebody.text = _root.input.body.text;
}

as you can see instead of puting the data I put the whole path toward the content. However, I want to print the variable value into the dynamic text.

red penguin
08-02-2002, 12:38 PM
From the code, it seems that on the click, whatever the variables are for the "input" fields will be displayed in the "dynamic" fields. It doesn't?

Kahlil
08-02-2002, 01:12 PM
Yeah thats what I try to achieve and it have. However I wanted the Variables to do that, not the path.

I want to load the info from 'input' into variables a and b and when the button was click those a/b variables will be displayed on the output.

Simple variables management, however it doesnt work.

red penguin
08-02-2002, 01:27 PM
on (release){
a=_root.input.title.text;
b=_root.input.body.text;
_root.output.writetitle.text = a;
_root.output.writebody.text = b;
}

??

Abelius
08-02-2002, 02:07 PM
Okeydokey:

133 people have signed the flash-linux petition -so far, red penguin...! :)

Kahlil
08-03-2002, 01:47 AM
You are one day late man.. I signed 2 days ago.

Kahlil
08-03-2002, 01:55 AM
Thanks man thats great, now the evolution of this is how to load the Flash variables into PHP variables....

Have u ever done that? Can actionscript input data in PHP, I know somehow XML you can.

red penguin
08-03-2002, 12:48 PM
If you want to pass vars to a PHP script, of course it's doable...

this.loadVariables("myScript.php", "POST");

...will pass that clip's vars to the script.

Oh, and thanks for signing the Linux thingy. Spread the word! And Kahlil, I'd rather people sign than sing!