Hosting Flash won't load swf ressources (xml, image, etc.)

前端 未结 1 2008
别那么骄傲
别那么骄傲 2021-01-03 05:14

I tried to achieve at first a swf reader with gtk2 on my unix machine. Worked, I could render simple swf files. Now, I\'m trying to add a configuration to my flash file with

相关标签:
1条回答
  • 2021-01-03 05:56

    I forgot to add the notify to my stream...

    NPError NPN_GetURLNotifyProc(NPP instance, const char* url, const char* target, void* notifyData) {
        fprintf(stderr,"[D] NPN_GetURLNotifyProc:%p, url: %s, window: %s, data: %p\n", instance, url, target, notifyData);
        NPStream s;
        uint16 stype;
    
        memset(&s,0,sizeof(NPStream));
        s.url = strdup(url);
        s.notifyData = notifyData;
    
        fprintf(stderr, "NPP: %p URL: %s\n", instance, url);
    
        checkError("NPN_NewStream", pluginFuncs.newstream(instance,"text/html",&s,0,&stype));    
        writeStream(instance, &pluginFuncs, &s);
    
        checkError("NPN_DestroyStream", pluginFuncs.destroystream(instance,&s,NPRES_DONE));
        free((void*)s.url);
        pluginFuncs.urlnotify(instance, url, NPRES_DONE, notifyData);
        return 0;
    }
    

    I have now a standalone gtk application who can run compiled flash (swf). Hope it helps someone in the future. I recommend doing a plugin to read another plugin (aka Sniffer) to actually know which function is called ("and how things works") to have a decent log file to work with.

    0 讨论(0)
提交回复
热议问题