Passing variables between flash movies (again)

This has been asked a few times on here, but there doesn’t seem to be an decent answers to the question.

Basically I have a button which can be clicked to load an external movie, the external movie loads an ASP script.

Dependent upon the button clicked I want to be able to execute different SQL statements.

Can anyone advise me how to go about this or, point me to a tutorial

post to the asp page…
just put this in the keyframe where the button is
sql = “select * from mytable”

and then in your asp page… use
Dim sqlstatment
sqlstatment = request(“sql”)

then when ur doing the execute or whatever put .Execute(sqlstatment)

u know what i mean

Yep I understand that - no problems on that front.

What I am struggling with is, I am clicking a button to load an external movie and the external movie loads the ASP script.

So from clicking the button, how do I pass a variable from the button to the external movie?

This is the code I am using:


on (release) {
	loadMovie "http://www.furious5.co.uk/ext/portfolio.swf?ID=1", "_root.container");
}

How would the external movie know the ID is 1? Is there a request.querystring type function in AS?

Once the variable is in the external movie I have no probs with the ASP side of things.

I think a good way of doing this would be to use a function… I cant think yet its onlu 8:30 here… ill get back on that later hehe

You could set a variable in an external file (ID = 1), and load the SWF, then the loaded SWF checks that external file for the variable ID and does what you want it to do accordingly. As far as I know, Flash movies cannot “receive” arguments or variables when loading. The variables have to be loaded by the SWF once it starts loading.

-Al