Hi!
I a similar way that JExplorer uses DOM to parse XML/HMTL I wonder if Flash-components can be "parsed" as well?
As an example say that a webpage has a Flash stock-ticker. I then want to retrieve the stock prices shown, when the ticker is updated.
If this is not possible I would like to know:
- are there any plans to integrate Flash into JExplorer like DOM? (is it possible??)
- are there any workarounds like replacing the Flash player with a Java emulator thereby providing a kind of "backdoor".
Regards,
Jesper
Hi again,
Guess the answer is using ComfyJ to integrate Flash.
Are there any simple examples combining JExplorer and ComfyJ, i.e. an example with a simple webpage containing a simple Flash-application showing how Flash-variables can be accessed in a similar way that JExplorer accesses DOM-elements?
Regards,
Jesper
Hi Jesper,
Please find the attached examples that demonstrates how you can get Flash-variables values using JExplorer.
Vladimir
Hi Vladimir,
I think you got me wrong or I am not expressing myself clear enough. I am not looking for parameters held in the HTML-part. That part is easy to retrieve using DOM as you suggest. What I am looking for is the integration with the .swf-file itself using ComfyJ.
If e.g. the Flash-application is a stock-ticker I want to be able to capture the stock-prices and read them into Java combining JExplorer and ComfyJ.
To do this I need to know the ActionScript-code in the .swf-file, and of course decompiling the .swf-file is an exercise in itself. However tools are available for this part, so it is assumed, that the ActionScript-code is well-known. In the stock-ticker example the stock prices could be some dynamic text in the Flash-application.
Are there any examples combining JExplorer and Flash/ComfyJ in situations similar to the stock ticker-example?
Regards,
Jesper
Hi Jesper,
You can try to get IDispatch instance of the Flash element in the HTML Document and create IShockwaveFlash object using this instance whereupon you can to use the IShockwaveFlash object as in the FlashIntegrationSample example. For example:
IHTMLDocument3 documentPeer = new IHTMLDocument3Impl((IHTMLDocument2) document.getDocumentPeer());
IHTMLElementCollection elements = documentPeer.getElementsByTagName(new BStr("OBJECT"));
for (int i = 0; i < elements.invokeGetLength().getValue(); i++)
{
IDispatch flash = elements.item(new Variant(i), new Variant(i));
IShockwaveFlash shockwaveFlash = new IShockwaveFlashImpl(flash);
}
Vladimir
Hi Vladimir,
Thanks, I will try this out.
A suggestion: In your JExplorer-tutorial most examples are focused on using DOM with JExplorer. However many webpages contain not only plain HTML but also Flash-components, Java-applets and other components. Therefore you could consider making some thorough examples combining JExplorer and ComfyJ.
Regards,
Jesper
Hi Jesper,
Thank you for your suggestion. We will create the examples combining JExplorer and ComfyJ.
Vladimir