Len. I would have a review of the communication example page. http://www.bobbyvandersluis.com/swfobject/testsuite_2_2/test_dynamic_com.html
It has some good code to: 1) ensure you have a proper DOM ID to talk to 2) getting the DOM reference to the SWF 3) check if the method is actually available on the SWF before calling *You should make sure you set the id and name attributes when calling Here is an extended example showing how to the use callback function to gain the dom reference to the swf: http://www.bobbyvandersluis.com/swfobject/testsuite_2_2/test_dynamic_com2.html Here is a good tut explaining a bit more: http://learnswfobject.com/advanced-topics/external-interface/ If it works after reading / implementing this, then the beer will have to be virtual as I am in Australia :) Cheers, Aran On Wed, Mar 10, 2010 at 8:24 AM, Len <[email protected]> wrote: > I'm neither a flash or java script expert, but I've been playing with > a project that is just making me nuts. > > Simple enough in concept, I have input fields on a HTML form, that > when changed need to pass the new value into my flash file. > > I am using this to imbed the flash inside the <head> tags of my html > page: > > swfobject.embedSWF("Designer2.swf", "NewFlashpreviewer", "850", "350", > "9.0.0" , "/swfobject/expressInstall.swf", flashvars, params, > attributes); > > Inside the flash I use: > > import flash.external.ExternalInterface; > var eiEnabled:Boolean = ExternalInterface.addCallback(sendTextToFlash, > getTextFromJavaScript); > > Back on my html page I have the functions: > > function getFlashMovie(movieName) { > var isIE = navigator.appName.indexOf("Microsoft") != -1; return > (isIE) ? window[movieName] : document[movieName]; > } > function sendToFlash(txt) { > getFlashMovie("NewFlashpreviewer").sendTextToFlash(txt); > } > > Then it is just a simple onChange event that calls > sendToFlash(this.value); > > Here's the issue, this all works fine with IE 8 (in compatability mode > or not)... but it don't work at all with FireFox version 3.5.8 > > Free beer for anyone has a clue what the issue is or (more likely) > what it is I'm doing wrong. > > Thanks for any help. > > -- > You received this message because you are subscribed to the Google Groups > "SWFObject" group. > To post to this group, send email to [email protected]. > To unsubscribe from this group, send email to > [email protected]<swfobject%[email protected]> > . > For more options, visit this group at > http://groups.google.com/group/swfobject?hl=en. > > -- You received this message because you are subscribed to the Google Groups "SWFObject" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/swfobject?hl=en.
