Reputation: 41138
I want to display a simple .SWF file on my WPF Form. It's a simple animation on loop.
Is there a control "box" type element I can place on my form and just load the .swf file to it so it can play?
Thank you for the help. :D
Upvotes: 0
Views: 7352
Reputation: 1916
You might use a script, as in this page, to load an animation
<html>
<head>
<script type="text/javascript">
window.location.href = 'my_animation.swf';
</script>
</head>
<body>
</body>
you have the choice to create the page dinamically, create the script dynamically or host the page in a control and use its automation.
Upvotes: 1
Reputation: 150
A solution for a similar question can be found here: how to play flash in WPF application
In summary, you can use AXShockwaveFlash. Instructions found: http://www.pooredesign.com/blog/?p=d9165e80-d075-4faf-8a10-bfaf17769198
Also: although the description uses YouTube as an example this should work with local files as well.
Upvotes: 1
Reputation: 12259
Well - can you convert this animation into XAML? That would be the best.
WPF and Flash are not really compatible to each other :-)
It could work using the WebBrowser class - there's no elegant way I know, however.
Upvotes: 0