1-888-365-2779
+1-888-365-2779
Try Now
More in this section

Forums / Developing with Sitefinity / Flash object fix (the gray border). Click here to activate and use this control

Flash object fix (the gray border). Click here to activate and use this control

5 posts, 0 answered
  1. Dan
    Dan avatar
    14 posts
    Registered:
    24 Feb 2008
    03 Apr 2008
    Link to this post

    My flash content cannot be displayed correctly and appears with a gray border and a text “click here to activate and use this control“ in IE7. Is tihere anyway of getting rid of this? i have tried applying the script to the object in the flash manager but it seems to not accept this?

    thanks

  2. jbull
    jbull avatar
    17 posts
    Registered:
    26 Jun 2012
    03 Apr 2008
    Link to this post
    Yes.  Google "swfObject" it's a javascript that you can use that works fantastic for that problem.  You'll also need to enable javascript for for editor window as well otherwise the radeditor strips it out.  Enabling scripts is as simple as finding the editor under the controltemplates dircetory for generic content and adding the flag AllowScripts="true" to the radeditor declaration. Hollar if you need any more help with this as i have it working in my site just fine.
  3. Dan
    Dan avatar
    14 posts
    Registered:
    24 Feb 2008
    06 Apr 2008
    Link to this post
    hey. thanks for the help was really useful. for some reason tho the radeditor is still stripping the script that i add to the object. maybe i have put the allowscripts="true" in the wrong place as it seems to still not allow scripts. is there anyway you could give me a quick run through on how you got it to work for you, including applying the script to your flash content?
  4. jbull
    jbull avatar
    17 posts
    Registered:
    26 Jun 2012
    07 Apr 2008
    Link to this post
    go to your project folder and find \Sitefinity\Admin\ControlTemplates\Generic_Content  directory and open the EditorTemplate.ascx file and then add AllowScripts="true" to the radeditor declaration.

    as far as the scripting goes, here's what i use. the frontrotator and monoslideshow are what i use for weekly events on our church website.

    <div id="front-rotator">
    <br />
    <strong>What no Flash player?</strong> <br />
    <br />
    We're sorry to tell you that the weekly events cannot be displayed because you don't have the Flash player. <br />
    <a title="Get the Flash player to see the weekly events information" href="http://www.adobe.com/products/flashplayer/">
    get the Flash player
    </a> to view the weekly events.
    <script type="text/javascript" src="/Files/Scripts/swfobject.js"></script>
    <script type="text/javascript">
    // <![CDATA[
    var flashvars = {
    showLogo: "false",
    showVersionInfo: "false",
    dataFile: "/Files/FrontRotator/FrontRotator.xml"
    };
    var params = {bgcolor:"#E0DDDE"};
    var attributes = {};
    swfobject.embedSWF("/Files/FrontRotator/monoslideshow.swf", "front-rotator", "700", "390", "9.0.0","/Files/Flash/expressInstall.swf", flashvars, params, attributes);
    // ]]>
    </script>
    </div>
    </div>
  5. Michael
    Michael avatar
    1 posts
    Registered:
    05 Feb 2008
    16 Apr 2008
    Link to this post
    I had the same problem but I handled it a bit differently.

    Like you said, I have a .js file that gets rid of the need to click the flash object, and its method call is ActiveXFix().

    I opened up the ~/RadControls/Editor/Dialogs/FlashManager.ascx file and scrolled down to the OkClicked() method.  Near the end is where the control actually outputs the code.  

    I replaced this:
      var flashObject = previewer.GetHtml();

    With this:
      var script = "\<script\>ActiveXFix();\</script\>";
      var flashObject = previewer.GetHtml();
      CloseDlg(flashObject + script);

    This way when I add a Flash object from the editor it automatically appends that method call and I don't have to do it manually.
Register for webinar
5 posts, 0 answered