About Ajax Accordion and swf files
-
Hi dear friends! I am using accordion and of course accordion panes from Ajax control toolkit. in the content tag of AccordionPanes I have a swf file to show, every thing is ok! and the files are shown as I collapse each AccordionPane but when I collapse an accordion and the swf file starts, if I collapse another one the last swf does not stop( of course it is not visible but it's going on). do you have any suggestion? this is the related part of my code: <cc1:Accordion ID="Accordion1" runat="Server" style="direction:rtl" SelectedIndex="-1" AutoSize="None" FadeTransitions="false" TransitionDuration="250" FramesPerSecond="40" RequireOpenedPane="false" SuppressHeaderPostbacks="true" Width="630px" > <Panes> <cc1:AccordionPane ID="AccordionPane1" runat="server" ContentCssClass="ContentStyle" HeaderCssClass=""> <Header> <asp:Image ID="Image1" runat="server" style="vertical-align:middle" ImageUrl="filmicon.jpg" Width="40px" Height="40px" /> <asp:Label ID="Label1" runat="server" Font-Names="Tahoma" Font-Size="Small" Text="how to share"></asp:Label> </Header> <Content> <embed width="620" height="495" type="text/html" src="sharing2_demo_skin.swf"></embed> </Content> </cc1:AccordionPane> . . . </Panes> </cc1:Accordion>
-
Hi dear friends! I am using accordion and of course accordion panes from Ajax control toolkit. in the content tag of AccordionPanes I have a swf file to show, every thing is ok! and the files are shown as I collapse each AccordionPane but when I collapse an accordion and the swf file starts, if I collapse another one the last swf does not stop( of course it is not visible but it's going on). do you have any suggestion? this is the related part of my code: <cc1:Accordion ID="Accordion1" runat="Server" style="direction:rtl" SelectedIndex="-1" AutoSize="None" FadeTransitions="false" TransitionDuration="250" FramesPerSecond="40" RequireOpenedPane="false" SuppressHeaderPostbacks="true" Width="630px" > <Panes> <cc1:AccordionPane ID="AccordionPane1" runat="server" ContentCssClass="ContentStyle" HeaderCssClass=""> <Header> <asp:Image ID="Image1" runat="server" style="vertical-align:middle" ImageUrl="filmicon.jpg" Width="40px" Height="40px" /> <asp:Label ID="Label1" runat="server" Font-Names="Tahoma" Font-Size="Small" Text="how to share"></asp:Label> </Header> <Content> <embed width="620" height="495" type="text/html" src="sharing2_demo_skin.swf"></embed> </Content> </cc1:AccordionPane> . . . </Panes> </cc1:Accordion>
If you want to stop the flash file (interact with the flash movie(s)) you would need to modfiy the flash object to listen for events or poll possibly a hidden field. When you collapse a panel, set the hidden field to a value (0/1) or something which could pause or stop the flash movie from playing. It's not a trivial process, but I am sure there are examples on the web. Try searching for "controling flash from javascript" or something similar.