none
webpart containing flash not working

    Pertanyaan

  • Hi ,

    I have been creating one webpart that contains a flash file.The flash file has some file reference to a supporting xml file, which is done from flash file itself . 

    I have used the same flash file in a normal aspx page,there I had to keep the aspx page and this supporting xml file in same folder of solution. Only then it will work.

    When I am creating the webpart how can I keep the calling page and supporting file in same folder.Since the supporting file and flash file has been kept in layouts folder.

    I have registered the flash to webpart code as follows.

    StringBuilder sbFlashComponent=new StringBuilder();
    sbFlashComponent.Append("<OBJECT classid=\"clsid:D27CDB6E-AE6D-11cf-96B8-444553540000\" ");
                 sbFlashComponent.Append("codebase=\"http://download.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=7,0,19,0\""); 
                 sbFlashComponent.Append("id =\"ThoughtLeadershipCarousel\"");
                sbFlashComponent.Append("width=\"450px\" height=\"350px\"");
                sbFlashComponent.Append(">");
                sbFlashComponent.Append("<param name=\"movie\" value=\"");
                sbFlashComponent.Append(flashUrl.ToString());
                sbFlashComponent.Append("\">");
                sbFlashComponent.Append("<param name=\"quality\" value=\"high\" />");
                sbFlashComponent.Append("<param name=\"play\" value=\"true\" />");
                sbFlashComponent.Append("<param name=\"loop\" value=\"false\" />");
                sbFlashComponent.Append("<param name=\"wmode\" value=\"opaque\" />");
                sbFlashComponent.Append("<param name=\"bgcolor\" value=\"#FFFFFF\" />");
                sbFlashComponent.Append("<param name=\"menu\" value=\"false\" />");
                sbFlashComponent.Append("<param name=\"allowScriptAccess\" value=\"sameDomain\" />");
                sbFlashComponent.Append("<param name=\"allowFullScreen\" value=\"false\" />");
                sbFlashComponent.Append("<param name=\"FlashVars\" value=\"xmlDataLinks=/_layouts/testcarousel/carousel.aspx\" />");
                sbFlashComponent.Append("<EMBED src=\"" + flashUrl.ToString() + "\"  quality=high wmode=\"transparent\" WIDTH=\"450\" HEIGHT=\"350\" TYPE=\"application/x-shockwave-flash\" PLUGINSPAGE=\"http://www.macromedia.com/shockwave/download/index.cgi?P1_Prod_Version=ShockwaveFlash\"></EMBED> ");
                sbFlashComponent.Append("</OBJECT>");

    NB: The supporting xml file is not given through "FLASHVARS"



    03 Juli 2012 16:07

Jawaban

Semua Balasan

  • Hi,

    Can you give some more details how you are creating this.

    I think the URL's in your code is not correct, your object embedding should not depend on which aspx page you are adding. But may b you can try using user control(.ascx) and then consume this in your web part.

    -Pawan

    03 Juli 2012 18:27
  • The URL is correct. The flash is adding to the page.But the problem is thisit is not dynamically  accepting the XML file.THe same swf file accepts xml when it is added in aspx page
    10 Juli 2012 8:13
  • Naveen,

    Could you explain a bit more on your scenario?


    Prateesh Nair (MCTS) | Orion India Systems

    10 Juli 2012 17:05
  • Thanks to all guys.The problem was because of flash file .Thanks for your support.
    11 Juli 2012 7:10