By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,504 Members | 1,194 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,504 IT Pros & Developers. It's quick & easy.

HTML button/link to POST vars to Flash?

P: 25
Hello!

Here is something I assume is relatively simple but have never bothered to find out -
I'm not finding the answer anywhere!

All I am trying to do is this:

Have a thumbnail image acting as a button - sitting on my HTML page.

When the user clicks it, the button uses the POST method to send a specified variable.

I think I can handle the variable from there using javascript - which will talk to my embedded swf.

Can anyone point me in the right direction? :)
Jun 17 '07 #1
Share this Question
Share on Google+
2 Replies


P: 25
OK - could somebody simply tell me if this is even possible -


My main.swf is embedded in my index.html page.

It loads external swfs in ONLY WHEN a HTML button, sitting outside my main.swf but ON index.html is clicked - posting it's variable/value to my swf?

So what I am saying is - Flash will not be functioned to do it's loadVars magic, I want Flash to be ready & waiting for a new variable to arrive at any given time - THEN action a function depending on the value of the variable.

Does this make sense to anyone? ;)

I'm just not sure on the limitations of Flash - the program where I thought absolutely ANYTHING is possible.

If it's not possible then I will go around this problem another way.
Jun 17 '07 #2

acoder
Expert Mod 15k+
P: 16,027
You can use the submit() method to submit the form.

The variable can be a hidden element.
Jun 18 '07 #3

Post your reply

Sign in to post your reply or Sign up for a free account.