Another piece of code for the same thing which does not seem to be working:

                        function getFlashMovieSecond(movieName)
                        {
                                if (window.document[movieName])
                                {
                                return window.document[movieName];
                                }
                                if (navigator.appName.indexOf("Microsoft 
Internet")==-1)
                                {
                                if (document.embeds && 
document.embeds[movieName])
                                        return document.embeds[movieName];
                                }
                                else // if (navigator.appName.indexOf("Microsoft
Internet")!=-1)
                                {
                                return document.getElementById(movieName);
                                }

                        }
Fahim Akhter
Game Developer | White Rabbit Studios | http://apps.facebook.com/feline-frenzy/



On Thu, Apr 15, 2010 at 6:54 PM, Fahim Akhter <[email protected]> wrote:
> I'm using the following code. It works fine with getElementByID but if
> I use a OS detection function it stops working.
>
>        function getFlashMovie(movieName)
>        {
>                var isIE = navigator.appName.indexOf("Microsoft") != -1;
>                return (isIE) ? window[movieName] : document[movieName];
>        }
>
>        getFlashMovie('myId').sendToActionsript(str);
>
> The above code does not work whereas the line below is working any Ideas?
>
>        document.getElementById('myId').sendToActionscript(str);
>
>
>
>
> Fahim Akhter
> Game Developer | White Rabbit Studios | 
> http://apps.facebook.com/feline-frenzy/
>

_______________________________________________
Flashcoders mailing list
[email protected]
http://chattyfig.figleaf.com/mailman/listinfo/flashcoders

Reply via email to