topical media & game development
#ximpel-debug.mx
#ximpel-debug.mx
(swf
)
[ flash
]
flex
<?xml version="1.0" encoding="utf-8"?>
<mx:Application
xmlns:mx="http://www.adobe.com/2006/mxml"
xmlns:ximpel="net.ximpel.custom.*" xmlns:ae="*"
layout="absolute" initialize="send()" creationComplete="finalize()" width="870" height="710"
paddingLeft="0" paddingTop="0" paddingBottom="0" paddingRight="0" backgroundColor="#000000">
<mx:Style source="explore-ximpel-style-obsidian.css"/>
<mx:Script>
<![CDATA[
import mx.events;
import mx.managers.SystemManager;
import net.ximpel.events.*;
// import net.ximpel.custom.*;
import flash.events.FullScreenEvent;
import mx.controls.Alert;
import mx.rpc.events.ResultEvent;
public var count:Number = 0;
public function trace(m:String) : void {
count++;
status.text += "[" + count + "] " + m + " ";
if (count % 5 == 0) status.text += "\n";
}
public function send() : void {
//status.visible = false;
trace("tracing");
//player.trace = trace;
player.config = "ximpel-config.xml";
player.send();
}
public function resize(fx:Number = 1.0, fy:Number = -1.0): Number {
if (fy == -1.0) fy = fx;
var x:Number = this.width / player.width;
var y:Number = this.height / player.height;
var s:Number = 1.0;
if (x > y) s = y; else s = x;
player.scaleX = s * fx; player.scaleY = s * fy;
return s;
}
private function init():void {
trace("app");
}
private function finalize():void {
trace("finished: " + this.width + " " + this.height );
//trace("stage: " + stage.stageWidth + " " + stage.stageHeight );
player.image = "@logo.jpg";
resize(1.0,0.8);
trace("resized: " + this.width + " " + this.height );
// player.ximpel.start();
//player.index=0;
player.go();
}
]]>
</mx:Script>
<mx:VBox>
<ximpel:Display width="100%" height="100%" trace="{trace}" id="player" />
<mx:TextArea width="100%" height="300" id="status" text=" starting ... " />
</mx:VBox>
</mx:Application>
(C) Æliens
20/2/2008
You may not copy or print any of this material without explicit permission of the author or the publisher.
In case of other copyright issues, contact the author.