Bueno en teoria esta es la solucion,tendre que probarla a ver si funciona.
---------------------------------------
Here you go! I'm using Flashdevelop, so create a as3 project with preloader, then put the .swf file in the directory where the Main class file is. Then copy this to the Main class, and rename the unity-game.swf to your games filename in the embed tag:
Then go to Project->Properties and set the flashplayer version to 11.0, and set the dimension to your game's dimension. UPDATE: The pregame ad can be added through Live updates.
--------------------------
---------------------------------------
Here you go! I'm using Flashdevelop, so create a as3 project with preloader, then put the .swf file in the directory where the Main class file is. Then copy this to the Main class, and rename the unity-game.swf to your games filename in the embed tag:
Código [Seleccionar]
package
{
import flash.display.DisplayObject;
import flash.display.Loader;
import flash.display.Sprite;
import flash.events.Event;
[Frame(factoryClass="Preloader")]
public class Main extends Sprite
{
[Embed(source='unity-game.swf', mimeType='application/octet-stream')]
private var Game:Class;
private var loader:Loader;
public function Main():void
{
if (stage) init();
else addEventListener(Event.ADDED_TO_STAGE, init);
}
private function init(e:Event = null):void
{
removeEventListener(Event.ADDED_TO_STAGE, init);
loader = new Loader();
loader.loadBytes(new Game());
loader.contentLoaderInfo.addEventListener(Event.COMPLETE, onLoadingCompleted);
// entry point
}
private function onLoadingCompleted(e:Event):void
{
e.currentTarget.removeEventListener(Event.COMPLETE, onLoadingCompleted);
addChild(loader);
}
}
}
Then go to Project->Properties and set the flashplayer version to 11.0, and set the dimension to your game's dimension. UPDATE: The pregame ad can be added through Live updates.
--------------------------