Vivek's profileVivek LakhanpalPhotosBlogListsMore Tools Help

Blog


    July 25

    Flash player with ExternalInterface call and it’s use inside form tag

    This article is an update to the previous one i have written i.e. picking up domain name….
    It’s a new problem i noticed while using ExternalInterface in flash file and embedding that swf file in asp.net web pages and within form tags

    The problem starts when we have our flash player (with External Interface call) embedded inside a form tag that is mostly in ASP.net web pages which use runat server controls. Most of IE version 6 and IE 7 starts giving error:’try { flashplayer.SetReturnValue(__flash__toXML(window.location.hostname.toString()) ); } catch (e) { flashplayer.SetReturnValue(”"); }’ or ‘flash player id undefined’
    Looking at various websites and finally on livedocs I was able to find the solution/workaround to the problem: Just add following line after your flash file embed code in which you are using any ExternalInterface call.

    window.[flashplayer id used in embed code] = document.getElementById(['flash player id used in embed code']).

    This will add a window level pointer to the movie so that it can be referenced directly using id/name. As this is only required in case of IE you can put condition for it’s execution only in case of IE.

    Comments

    Please wait...
    Sorry, the comment you entered is too long. Please shorten it.
    You didn't enter anything. Please try again.
    Sorry, we can't add your comment right now. Please try again later.
    To add a comment, you need permission from your parent. Ask for permission
    Your parent has turned off comments.
    Sorry, we can't delete your comment right now. Please try again later.
    You've exceeded the maximum number of comments that can be left in one day. Please try again in 24 hours.
    Your account has had the ability to leave comments disabled because our systems indicate that you may be spamming other users. If you believe that your account has been disabled in error please contact Windows Live support.
    Complete the security check below to finish leaving your comment.
    The characters you type in the security check must match the characters in the picture or audio.

    To add a comment, sign in with your Windows Live ID (if you use Hotmail, Messenger, or Xbox LIVE, you have a Windows Live ID). Sign in


    Don't have a Windows Live ID? Sign up

    Trackbacks

    The trackback URL for this entry is:
    http://viveklakhanpal.spaces.live.com/blog/cns!CF8FDB7D3F08A367!501.trak
    Weblogs that reference this entry
    • None