Search code examples
delphiflashhtml5-canvasvcldelphi-10.1-berlin

HTML5 canvas animation with Delphi


I need to replace a Flash animation in a Delphi application. So far I have used a TShockwaveFlash component to load an SWF file. Used Adobe Animate to convert this SWF file into an HTML 5 canvas and changed some syntax for the action script.

The output from Adobe Animate is the following:

.html
.js
images/.png

How do I integrate these into my Delphi application to replace the old Flash animation? Not very experienced in web development.


Solution

  • We installed WebView2 and used the TEdgeBrowser component.

    You can access the script part in delphi in this way:

    var Script: string := componentname+'.Enable.gotoAndStop(0);'; EdgeBrowser1.ExecuteScript(Script);