Len

I think it is you who deserves the beer :)

I didn't realize that your swf was hidden otherwise I could have told you that EI does not work...

Other than throwing it off stage you could also try setting display to block and making the width/height 0,0. That being said, I cannot remember if this breaks it also.


Aran

Sent from my iPhone

On 11/03/2010, at 4:10 AM, Len <[email protected]> wrote:

RESOLVED -

The issue was that my container div was styled to be hidden when the
html page loads.  That disabled the FF JavaScript ability to see the
flash function.

Was using attributes.styleclass = "hiddenSWF"; but that also rendered
the ability for FF to see the flash function.

Had to use absolute top = -999 left = -999 so the flash object would
be loaded - just out of sight... then when the flash is needed on the
page, change the positioning and all is well.

Thanks for the help, but not sure about who deserves the beer????

I think I overlooked (omitted) this "hidden" deal - so how would you
have known.

Bigger question is what is the best practice to hide a SWF - without
having to compromise ability to have external communications?  This
assumes that FF behaviour is correct.

Len



On Mar 10, 10:07 am, Len <[email protected]> wrote:
Well, I've trimmed down the javascript code to:

function sendToFlash(txt) {
  var swf = document.getElementById("NewFlashpreviewer");
  swf.sendTextToFlash(txt);

}

My embed code looks like this:

var attributes = { id:"NewFlashpreviewer", name:"NewFlashpreviewer" }; swfobject.embedSWF("Designer2.swf", "NewFlashpreviewer", "850", "350",
"9.0.0" , "/swfobject/expressInstall.swf", flashvars, params,
attributes);

My HTML code looks like this:

<div id="NewFlashpreviewer">stuff here</div>

Still Fire Fox does not work, but IE works (all versions I can find to
test).

Although I'm not a JS or Flash expert, I have spent hours on end
trying to understand why I'm having issues - only with FF.  Seems to
me all my bases are covered.

Beer offer still stands.

Thanks for any help.

On Mar 9, 8:15 pm, Aran Rhee <[email protected]> wrote:



Len.

I would have a review of the communication example page.http:// www.bobbyvandersluis.com/swfobject/testsuite_2_2/test_dynamic_...

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_...

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 %2bunsubscr...@googlegroups .com>
.
For more options, visit this group at
http://groups.google.com/group/swfobject?hl=en.-Hide quoted text -

- Show quoted text -- Hide quoted text -

- Show quoted text -

--
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 .


--
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.

Reply via email to