0

I want to use HTML5 instead of SWF in my NET Project. So, I install Google Swiffy Extension and after I converted Action-Script project to HTML5. But I don't know how to use to bind HTML5 with C#. Before I used Shockwave Flash Component in NET , for example

axShockwaveFlash1.SetVariable("_level1.shellContainer.ENGINE.my_room_movieclips.block_mc._x", "-5000");
askeet
  • 689
  • 1
  • 11
  • 24

2 Answers2

1

Function stage.setFlashVars requires a String,like

stage.setFlashvars("callback=console.log&version=1&locale=en");

And the SWF file can get the parameters by

var flashVars = root.loaderInfo.parameters;

you will get a "flashvars" Object (JSON Format)

{"callback":"console.log","version":1,"locale":"en"}
0

I wrote just analog SetVariable() for swiffy in JS

var SetVariable = function(Variable ){
   stage.setFlashVars(Variable);    
}

Analog GetVarriable() I didn't find.

C# project calls SetVariable in component WebBrowser

Uri uri = new Uri(PathToSwiffy);
webBrowser1.Navigate(uri);
webBrowser1.Document.InvokeScript("SetVariable", new Object[]{"SetEx=100"});
askeet
  • 689
  • 1
  • 11
  • 24