Env: win10,vs2015,adobe flash 26,.net framework 4.
I try to load video-js-swf in MFC application in 'ActiveX' way.I alread load the .swf file with code in MFC.
CString str = _T("path.swf");
m_flash.LoadMovie(0, str);
But I can't use m_flash.CallFunction() to call the function inside .swf file,here is my code:
CString temp = _T("<invoke name=\"vjs_getProperty\" returntype=\"xml\"><arguments><string>defaultPlaybackRate</string></arguments></invoke>");
CString test = m_flash.CallFunction(temp);
the .swf project main code as: VideoJS.as
Do anyone know how to solve this problem?How can I call function inside .swf?
I think I figure it out.It's all about the xml string. In my case, I use:
It's report an error.But when I use:
or:
It's OK. I think the problem is the flash xml parser.The parser analyzes the string in strange way.By the way, seems
<arguments></arguments>must in same line.However, There is a new bug, memory leak. In visual studio debug mode,the application can't exit normally. Fix memory leak bug: change the code
https://github.com/videojs/video-js-swf/blob/master/src/com/videojs/providers/RTMPVideoProvider.as (line:349)
REPLACE by
THEN
complie to .SWF file