Grofit
11-21-2006, 11:41 AM
Ive been looking on the net for the past few days looking at the best way to get a simple variable to flash... ideally it would be great to have a way to run actionscript functions from javascript. I have looked into the javascript integration kit, but i didnt really like having to include files everywhere just to do something which i think is simple.
Before you all start shouting FLASH VARS at me, i need it to be dynamic, so i can have a textbox on a page and when they click a button it grabs that data from the textbox and spams it over to flash. This needs to be done via javascript without refreshing the page. This makes things a tad more complicated as you cant just do OnClick="location.href=index.php?var=blah;" then set var to the flashvar embed, as this will refresh the page.
I hope im explaining this ok so far :).
So im basically wondering if there is a simple way to send a variable to a static embedded flash file via javascript. Im able to currently do document.flashobj.gotoFrame(x) quite happily and i thought that i could do document.flashobj.SetVariable("name", value), however that doesnt seem to work...
Im trying to make it cross platform as well... any help would be great.
Before you all start shouting FLASH VARS at me, i need it to be dynamic, so i can have a textbox on a page and when they click a button it grabs that data from the textbox and spams it over to flash. This needs to be done via javascript without refreshing the page. This makes things a tad more complicated as you cant just do OnClick="location.href=index.php?var=blah;" then set var to the flashvar embed, as this will refresh the page.
I hope im explaining this ok so far :).
So im basically wondering if there is a simple way to send a variable to a static embedded flash file via javascript. Im able to currently do document.flashobj.gotoFrame(x) quite happily and i thought that i could do document.flashobj.SetVariable("name", value), however that doesnt seem to work...
Im trying to make it cross platform as well... any help would be great.