A common issue that occurs when you have not set the wmode attribute in the HTML page is the following message “This application is not correctly embedded (wrong wmode value)”.

The solution is very simple. Set the wmode attribute in the HTML to “direct”. I have included my HTML code below as an example. I have embedded the swf using the swfobject. In the Starling framework in order for Stage 3D and GPU acceleration to work the wmode must to be set to direct. If it is not set to direct you may get a runtime exception when you compile the swf. You will most likely get the Error 3707: Context3D not available.

<!DOCTYPE HTML>
<head>

 <title>Wrong wmode value in Starling</title>

 <script src="swfobject.js"></script> 

 <script>

  var flashvars ={};
  var params = {};
  var attributes = { wmode:"direct" };

  swfobject.embedSWF("main.swf", "flashContent", "550", "400", "11", false, flashvars, params, attributes);

 </script> 

</head> 

<body> 
 <div id="flashContent"></div>
</body> 

</html>
By |2013-08-01T00:00:44+00:00August 1st, 2013|