Results 1 to 3 of 3

Thread: QAxWidget fails to call a function registered by Swf ExternalInterface

  1. #1
    Join Date
    Apr 2011
    Posts
    61
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default QAxWidget fails to call a function registered by Swf ExternalInterface

    Hi, as I've said in the title, I'm using QAxWidget to load my flash file and communicate between then by the ExternalInterface.
    Sorry if it isn't the right place to ask. Don't know if this is an "Active x" question, but...

    My problem is:
    When I use QAxWidget::dynamicCall("playSong(const QString&)", "url");

    Nothing happens and I have this output:
    QAxBase::dynamicCallHelper: playSong(QString): No such property in {d27cdb6e-ae6d-11cf-96b8-444553540000} [Shockwave Flash Object]

    But when using QWebView and calling the same function with evaluateJavascript it works.
    (i. e. document['myFlashFile'].playSong("url");)

    In my swf file I'm using ExternalInterface.addCallback("playSong", this.playSong);

    I've did some searchs but find nothing about it, what I've found was some problems using other objects.
    Sorry again, if this is a wrong place and thanks for reading (and for helping).

  2. #2
    Join Date
    Jul 2011
    Posts
    1
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QAxWidget fails to call a function registered by Swf ExternalInterface

    With QAxBase::generateDocumentation(), you can get a list of properties of a Shockwave Flash Object.

    Here is a list of properties:

    http://webcache.googleusercontent.co...ient=firefox-a

    There is no "playSong(QString)" slot. I think you must use "LoadMovie(int layer, QString url)" and "Play()"

  3. #3
    Join Date
    Apr 2011
    Posts
    61
    Thanks
    1
    Thanked 2 Times in 2 Posts
    Qt products
    Qt4
    Platforms
    Windows

    Default Re: QAxWidget fails to call a function registered by Swf ExternalInterface

    Yes, i know the object have it's "default" properties, but with flash.external.ExternalInterface package, you can "expose" functions of your flash app.
    Calling "Play()", "LoadMovie()", "SetVariable()", works, but not my function "exposed" by ExternalInterface.addCallback.

    But, thanks for the reply, in the link I've found this: "QString CallFunction(QString request);"
    Maybe it works but, I don't know how to use it, I'm searching right now lol, maybe something like this dynamicCall("CallFunction(QString)", "playSong(\"url\")")

    And maybe I use this too: void DisableLocalSecurity(). The client with QWebKit needs to have swf path (qrc:/swf/bridge.swf) as trusted.
    It would be nice to don't need to set it in the settings.

    Thank you again

Similar Threads

  1. about no matching function for call to
    By Alain Delon in forum General Programming
    Replies: 1
    Last Post: 5th March 2011, 21:30
  2. Using array with QAxWidget::dynamicCall() function
    By tom0485 in forum Qt Programming
    Replies: 1
    Last Post: 17th May 2010, 10:31
  3. Qt function call in vb.net
    By abghosh in forum Qt Programming
    Replies: 7
    Last Post: 6th March 2010, 17:00
  4. No Matching function to call...
    By weepdoo in forum Qt Programming
    Replies: 2
    Last Post: 7th November 2008, 17:30
  5. function call
    By Walsi in forum Qt Programming
    Replies: 3
    Last Post: 12th June 2007, 09:13

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Digia, Qt and their respective logos are trademarks of Digia Plc in Finland and/or other countries worldwide.