avo has asked for the wisdom of the Perl Monks concerning the following question:

Hi everyone, I've been doing some Perl/Tk programming last 2 years (screenshot) Lately I wanted to insert Flash into my Tk application in Windows. I saw it is quite easy with Wx::ActiveX... but I couldn't find anything for Tk. Can you please give me any idea how to do this, by either embedding ActiveX into Tk or using WxPerl inside Tk... Thanks for your expertise.

Replies are listed 'Best First'.
Re: Perl Tk and Flash
by zentara (Cardinal) on Aug 17, 2005 at 17:00 UTC
    WoW, thats a beautiful canvas. If you find an answer with embedding flash, let us know. :-) I know you can embed into Tk on linux with the -container option , in conjunction with the XWindow id, but I've yet to find a standalone Flash player. On Windows, I don't know.

    Maybe you could use Tk::Animation instead?


    I'm not really a human, but I play one on earth. flash japh
Re: Perl Tk and Flash
by Courage (Parson) on Aug 18, 2005 at 11:36 UTC
    Some more flexible and very similar to perl/Tk approach is using Tcl::Tk, it has ActiveX support, but it is somehow limited and I did not tried it seriously.

    A proof-of-concept could be seen at the very bottom of a http://vkonovalov.ru/perl-tcltk.htm page

Re: Perl Tk and Flash
by chanio (Priest) on Aug 18, 2005 at 03:43 UTC
    this one is even better ...

    I guess that you should see a way of inserting HTML code with the SWF file included.

    Besides, Flash 7 compiles an .EXE file as an option. But I am not sure that it could be embedable.

    After learning all about AS and its limitations, you might end up forgetting about Tk and using Flash as the visual part of it all, to overcome the embeding thing.

    I like the visual possibilities of Flash MX, but I think that you are limited to just supplying nearly all the required data by generating plain text files with value pairs or XML. Don't expect much more of an exe flash file combined with Tk! I would choose one or the other.

    { \ ( ' v ' ) / }
    ( \ _ / ) _ _ _ _ ` ( ) ' _ _ _ _
    ( = ( ^ Y ^ ) = ( _ _ ^ ^ ^ ^
    _ _ _ _ \ _ ( m _ _ _ m ) _ _ _ _ _ _ _ _ _ ) c h i a n o , a l b e r t o
    Wherever I lay my KNOPPIX disk, a new FREE LINUX nation could be established
Re: Perl Tk and Flash
by mattr (Curate) on Aug 18, 2005 at 14:59 UTC
    It looks like QuicktimeTcl might be a solution. Says it can do all quicktime in fact, including flash and video. Tell us if it works!
      I will definetely try to use Tcl::Tk. It looks Tcl/Tk is the way to go. I didn't know about the ActiveX support. Thanks for the suggestions everyone! Quicktime is also not too bad. My idea was to use Flash video, and also some fullscreen flash animations... but Quicktime will be as good as Flash in this case. Cheers!!