jameschaucer
07-29-2009, 11:44 AM
I'm asking this question 'in the dark', so to speak. I have had a nice FLASH menu system built for me that I now want to tie to my standard HTML. My FLASH developer doesn't appear to know how this is done so, since I've written zillions of lines of HTML and JAVASCRIPT, I thought I'd try to lend a hand on the fact finding. I don't know the FLAH/actionscript terminology so forgive me.
Given an .swf that has some clickable objects/regions. One of these controls is labeled with the word 'pants'. When I click on 'pants' I want an HTML FORM named 'pantsForm' to be submitted. By doing it this way I can send all my hidden variables and HTML objects on to the next page in the POST array.
My thought is that I should be able to write a piece of javascript like this:
function pageAction (inVar) {
switch(inVar) {
case 'pants':
document.pantsForm.submit();
break;
}
}
And then from within the actionscript the following call:
ExternalInterface.call("pageAction", "pants"));
could _somehow_ be linked to the onClick action for the 'pants' object in the FLASH movie.
Is this true? If so, is there a trick to hooking the call to the FLASH object? Can you provide an example of what the code would look like?
Thanks for any tips/suggestions.
Given an .swf that has some clickable objects/regions. One of these controls is labeled with the word 'pants'. When I click on 'pants' I want an HTML FORM named 'pantsForm' to be submitted. By doing it this way I can send all my hidden variables and HTML objects on to the next page in the POST array.
My thought is that I should be able to write a piece of javascript like this:
function pageAction (inVar) {
switch(inVar) {
case 'pants':
document.pantsForm.submit();
break;
}
}
And then from within the actionscript the following call:
ExternalInterface.call("pageAction", "pants"));
could _somehow_ be linked to the onClick action for the 'pants' object in the FLASH movie.
Is this true? If so, is there a trick to hooking the call to the FLASH object? Can you provide an example of what the code would look like?
Thanks for any tips/suggestions.