PDA

View Full Version : HTML->Flash swf


toshesh
09-02-2003, 06:48 AM
I think this is suppose to be a really simple issue if one knows what's going on! Well I created a html page with a form tag that sends a variable across to flash but the data doesnt get passed.The variable and its value is shown with the URL so it is sending. Please could someone send me to the right direction?

<form action="test.swf" method=get>
<input type=text name=kid size=30>
<input type=submit name=sub value=search>
</form>

var myData = new LoadVars();
myData.loadVariables("kotai.php", "GET");
trace(myData.kid);

Billy T
09-02-2003, 07:19 AM
well I haven't done what are you are trying but loadVariables is not a method of the loadVars object

try .load

cheers

toshesh
09-02-2003, 07:23 AM
load didnt work. swf needs to wait for the value to be typed in the HTML page and sent so would that make a difference in how the swf receives data?

Billy T
09-02-2003, 07:27 AM
oh so the form and the swf are in the same page?

I'm confused...you might want to post a more detailed explanation or post a link

cheers

toshesh
09-02-2003, 07:37 AM
sorry,

The first page is an HTML page which has one form to enter the value for "kid". when the submit button is pressed value is passed to the swf file which should receive this.


http://www.ddd.com?kid=test&submit=search

something like this gets sent to test.swf.(sorry no link exists)

var myData = new LoadVars();
myData.load("kotai.html", "GET");
trace(myData.kid);

The value "kid" should be displayed by the trace function. Its just not recognizing myData.kid.

Billy T
09-02-2003, 07:45 AM
ok

I think you need to put the swf into an html file and send the form data to that html file

inside the html file you will have the code to embed the swf. Inside this code you can enter some FlashVars data (do a quick search) which will contain the form data and will be available to the flash movie as soon as it loads

cheers