Hi all.
I need to display Flash animation in my Qt application, and ability to control it programmaticaly. The only decision I found is - use QWebKit and control Flash through Java. I have sample html file that is parialy works on IE, Opera and Google Chroome(which is built on top of WebKit as I know). But when I'm loading this webpage in my Qt application - I see working flash animation. But non of scripts are working well.

Here is script example:

Qt Code:
  1. function getFlashMovieObject(movieName)
  2. {
  3. return document.getElementById(movieName);
  4. }
  5.  
  6. function PlayFlashMovie()
  7. {
  8. var flashMovie=getFlashMovieObject("myFlashMovie");
  9. if (flashMovie == null) alert("bad");
  10. else alert("good");
  11. //everything is ok until here
  12. flashMovie.Play();
  13. //never see this message
  14. alert("I'm here");
  15. }
To copy to clipboard, switch view to plain text mode 

The same situation with another scripts. In places where I try to access Flash object - java script is silently terminates.

I posted this thread on this forum - because in browsers something seems to work (at least Platy/Pause ZoomIn/ZoomOut), but from Qt application nothing is working.

Here is code from app:
Qt Code:
  1. SlideViewWidget::SlideViewWidget(QWidget * parent) : QWebView(parent)
  2. {
  3.  
  4. page()->settings()->setAttribute(QWebSettings::JavascriptEnabled,true);
  5. page()->settings()->setAttribute(QWebSettings::PluginsEnabled,true);
  6. page()->settings()->setAttribute(QWebSettings::JavascriptCanOpenWindows,true);
  7.  
  8. loadFilm(QString("file://localhost/") + Resources::resourcePrefix + "test.swf");
  9.  
  10. }
  11. SlideViewWidget::~SlideViewWidget()
  12. {
  13. }
  14. void SlideViewWidget::loadFilm(const QString & fname)
  15. {
  16. QString html = Resources::flashPlayerBaseHtml;
  17. setHtml(html);
  18.  
  19. }
To copy to clipboard, switch view to plain text mode 

Realy need help. Thanks.