FlashComponent in window

Page 1 of 2 12 LastLast
  1. #1

    FlashComponent in window

    Hi,

    I have FashComponent containing JWPlayer in a window. Everything is OK video loads, plays, stops, resumed etc. But i noticed a strange behavior. When i close the window while video is playing, FlashComponent becomes invisible but it keeps playing in background. This also happens with the ext.net official FlashComponent sample.


    Thanks in advance,
    Boris
  2. #2
    Hi,

    Please set up CloseAction="Close" for the Window. Defaults to "Hide".
  3. #3
    Yes this stop .swf animation, but how do i reload the window after closing it?

    Thanks,
  4. #4
    Hmm, you can create a Window in code behind, then render it during DirectEvent after closing.

    Maybe, there is a way to stop swf playing without destroying a Window, I'm not sure.
  5. #5
    Yes, actually I was looking for stopping .swf without destoring the window.
    Thanks,
  6. #6
    I would look it up on the internet how to stop a flash component.

    Seems there is the StopPlay method in its DOM.

    To get a DOM object please use:
    VideoPlayer.el.dom
  7. #7
    Hi,

    I tried this but with no result.


    <ext:Window ID="winPreview" runat="server" Hidden="true" Modal="true" Width="800" Height="800"> 
        <Listeners>
            <Hide Handler="var obj = #{video}.el.dom; obj.stopPlay();" />
        </Listeners>   
        <Items>
           <ext:FlashComponent ID="video" runat="server" Width="480" Height="270" Url="player.swf" Stateful="true" Flex="1">
                        <FlashParams>
                            <ext:Parameter Name="allowfullscreen" Value="true"></ext:Parameter>
                            <ext:Parameter Name="allowscriptaccess" Value="always"></ext:Parameter>
                        </FlashParams>
                        <FlashVars>
                            <ext:Parameter Name="file" Value="/Handlers/Video.ashx?VideoId=1" Encode="false"></ext:Parameter>
                            <ext:Parameter Name="type" Value="video"></ext:Parameter>
                        </FlashVars>                    
                    </ext:FlashComponent>
         </Items>    
    </ext:Window>
    Thank you
  8. #8
    Please try:
    VideoPlayer.el.dom.api_unload()
  9. #9
    Quote Originally Posted by Daniil View Post
    Please try:
    VideoPlayer.el.dom.api_unload()
    the window listeners section look like this

    <Listeners>
            <Hide Handler="var obj = #{video}.el.dom; obj.api_unload();" />
    </Listeners>
    and i get this error:

    TypeError: Object #<HTMLObjectElement> has no method 'api_unload'
  10. #10
    The following works on my side.

    Example
    <%@ Page Language="C#" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" 
        "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head runat="server">
        <title>Ext.NET Example</title>    
    </head>
    <body>    
        <form runat="server">    
            <ext:ResourceManager runat="server" />
    
            <ext:Window 
                runat="server" 
                Title="Flash Movie" 
                Layout="FitLayout" 
                Height="320" 
                Width="400">
                <Items>
                    <ext:FlashComponent 
                        runat="server" 
                        Url="http://vimeo.com/moogaloop.swf?clip_id=3911557&amp;server=vimeo.com&amp;show_title=1&amp;show_byline=1&amp;show_portrait=0&amp;color=&amp;fullscreen=1&js_api=1">
                        <FlashParams>
                            <ext:Parameter Name="allowfullscreen" Value="true" Mode="Raw" />                
                        </FlashParams>
                    </ext:FlashComponent>
                </Items>
                <Listeners>
                    <Hide Handler="this.items.get(0).el.dom.api_unload();" />
                </Listeners>
            </ext:Window>
        </form>
    </body>
    </html>
    Generally, it is the question related to the SWF JavaScript API.
Page 1 of 2 12 LastLast

Similar Threads

  1. Image and FlashComponent
    By LLdeOJ in forum 1.x Help
    Replies: 0
    Last Post: Nov 24, 2010, 1:24 PM
  2. FlashComponent Example is not working
    By Hiverli in forum Examples and Extras
    Replies: 3
    Last Post: Sep 30, 2010, 7:52 AM
  3. [CLOSED] How to show a .swf animation with FlashComponent using Javascript?
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 12
    Last Post: Mar 29, 2010, 4:55 AM
  4. [CLOSED] How to change color of FlashComponent background
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 6
    Last Post: Mar 01, 2010, 11:50 AM
  5. [CLOSED] .SWF aninimation is not showed using FlashComponent
    By flormariafr in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Feb 25, 2010, 2:38 PM

Tags for this Thread

Posting Permissions