Fixed it. I changed the getMovie function slightly (it was the same
problem moyosaned had, but the fix didn't seem to work):
function getApp(appName) {
if (navigator.appName.indexOf ("Microsoft") != -1) {
return window[appName];
} else {
return document[appName][1]; // Temp dirty fix
}
}
I also found an awful bug in Firefox as I was doing it (open attached as
html in Firefox and compare to IE)!
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of Daniel Tuppeny
Sent: 23 June 2006 09:22
To: [email protected]
Subject: RE: [flexcoders] SOLUTION IS A BUG ? Re: ExternalInterface Flex
2 FireFox issue.....
I can't get this to work in FireFox, even with the change to the
javascript file noted below (has anyone confirmed that as a bug, amd
will it be fixed in the release?).
In FireFox, I get:
Error: getMovie("FlexTests").setData is not a function
FlexTests is the ID, and setData is a method I added in initApp() with:
ExternalInterface.addCallback("setData", setData);
Any ideas?
-----Original Message-----
From: [email protected] [mailto:[EMAIL PROTECTED] On
Behalf Of moyosaned
Sent: 16 June 2006 12:57
To: [email protected]
Subject: [flexcoders] SOLUTION IS A BUG ? Re: ExternalInterface Flex 2
FireFox issue.....
In de javascript I found the following:
case "width":
case "height":
case "align":
case "vspace":
case "hspace":
case "class":
case "title":
case "accesskey":
case "name":
case "id":
case "tabindex":
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
break;
default:
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
What is does is setting the name for Object AND Embed-code... So in
firefox this will result in a conflict...
I (quick) fixed it with this:
case "width":
case "height":
case "align":
case "vspace":
case "hspace":
case "class":
case "title":
case "accesskey":
case "id":
case "tabindex":
ret.embedAttrs[args[i]] = ret.objAttrs[args[i]] = args[i+1];
break;
case "name":
ret.embedAttrs[args[i]] = args[i+1];
break;
default:
ret.embedAttrs[args[i]] = ret.params[args[i]] = args[i+1];
}
Now It is working...
Mail me for feedback: [EMAIL PROTECTED]
--- In [email protected], "moyosaned" <[EMAIL PROTECTED]>
wrote:
>
> I traced/alerted the embed-code... It contains a name and id.. soo
> what I'm I doing wrong
>
> --- In [email protected], "moyosaned" <maikelsibbald@> wrote:
> >
> > It's working perfectly in IE! but Firefox is giving a
javascript-error.
> >
> > in my html-template:
> >
> >
> > function setDirectory(dir) {
> > var flash = getMovie("${application}");
> > flash.setDirectory(dir);
> > }
> >
> > function getMovie(movieName) {
> > if ( navigator.appName.indexOf ("Microsoft") != -1 ) {
> > return window[movieName];
> > }
> > else {
> > return document[movieName];
> > }
> > }
> >
> >
> >
> > /////////////////////// AND MY SWF ////////////////
> > AC_FL_RunContent(
> > "src", "${swf}",
> > "width", "${width}",
> > "height", "${height}",
> > "align", "middle",
> > "id", "${application}",
> > "quality", "high",
> > "bgcolor", "${bgcolor}",
> > "name", "${application}",
> > "flashvars",'historyUrl=history.htm?&lconid=' + lc_id +',
> > "allowScriptAccess","always",
> > "type", "application/x-shockwave-flash",
> > "pluginspage", "http://www.macromedia.com/go/getflashplayer");
> >
>
------------------------ Yahoo! Groups Sponsor --------------------~-->
Yahoo! Groups gets a make over. See the new email design.
http://us.click.yahoo.com/XISQkA/lOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
[Inbound Mail Scanned by MessageLabs]
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives:
http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
[Inbound Mail Scanned by MessageLabs]
______________________________________________________________________
This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________
------------------------ Yahoo! Groups Sponsor --------------------~-->
Great things are happening at Yahoo! Groups. See the new email design.
http://us.click.yahoo.com/TISQkA/hOaOAA/yQLSAA/nhFolB/TM
--------------------------------------------------------------------~->
--
Flexcoders Mailing List
FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt
Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/flexcoders/
<*> To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
<html>
<body onload="alert(document.getElementById('danny').innerHTML);">
<xml id="danny">
<people>
<person name="danny" />
<person name="danny" />
<person name="danny" />
<person name="danny" />
<person name="danny" />
</people>
</xml>
<p>this is some text</p>
</body>
</html>