Symbol 2 MovieClip [__Packages.org.webminster.caco3.Shape] Frame 0
class org.webminster.caco3.Shape
{
var m_closed, showControls, bezierQuality, m_rounding, m_x, m_y, m_xDrawOffset, m_yDrawOffset, m_style, m_points, m_name, m_level, m_mc, m_drawing_mc;
function Shape (mc, level, name) {
m_closed = false;
showControls = false;
bezierQuality = NORMAL;
m_rounding = NO;
m_x = 0;
m_y = 0;
m_xDrawOffset = 0;
m_yDrawOffset = 0;
m_style = new Object();
m_style.fillType = SIMPLE;
m_style.fillColors = [16777215];
m_style.fillAlphas = [100];
m_style.lineWidth = 1;
m_style.lineColor = 0;
m_style.lineAlpha = 100;
m_points = new Array();
if ((name == undefined) && (level != undefined)) {
name = "object" + level;
}
m_name = name;
m_level = level;
m_mc = mc;
}
function getDrawingMovieClip() {
return(m_drawing_mc);
}
function getMovieClip() {
return(m_mc);
}
function getLevel() {
return(m_level);
}
function getName() {
return(m_name);
}
function getNumberOfPoints() {
return(m_points.length);
}
function getPoints() {
return(m_points);
}
function getRenderPoints() {
if ((m_rounding == QUADRATIC) || (m_rounding == CUBIC)) {
return(calcRounding(m_rounding));
}
return(m_points);
}
function getPoint(index) {
return(m_points[index]);
}
function getStyle() {
return(m_style);
}
function isClosed() {
return(m_closed);
}
function setRounding(type) {
m_rounding = type;
}
function setLineStyle(thickness, color, alpha) {
lineStyle(thickness, color, alpha);
}
function lineStyle(thickness, color, alpha) {
if (thickness != null) {
m_style.lineWidth = thickness;
}
if (color != null) {
m_style.lineColor = color;
}
if (alpha != null) {
m_style.lineAlpha = alpha;
}
}
function beginFill(color, alpha) {
setFillStyle(SIMPLE, [color], [alpha]);
m_closed = true;
}
function beginGradientFill(type, colors, alphas, ratios, matrix) {
if (type == "linear") {
setFillStyle(LINEAR, colors, alphas, ratios, matrix);
} else if (type == "radial") {
setFillStyle(RADIAL, colors, alphas, ratios, matrix);
}
m_closed = true;
}
function setFillStyle(type, colors, alphas, ratios, matrix) {
if (type != null) {
m_style.fillType = type;
}
if (colors != null) {
m_style.fillColors = colors;
}
if (alphas != null) {
m_style.fillAlphas = alphas;
}
m_style.fillRatios = ratios;
m_style.fillMatrix = matrix;
m_closed = true;
}
function copyStyle(shape) {
m_style = copyObject(shape.getStyle());
}
function moveTo(x, y) {
if ((m_points.length > 0) && (m_points[m_points.length - 1].getAnchorPoint().startingPoint)) {
m_points[m_points.length - 1].m_x = x;
m_points[m_points.length - 1].m_y = y;
} else {
m_points.push(new org.webminster.caco3.Point(true, x, y));
}
}
function lineTo(x, y) {
if (m_points.length > 0) {
m_points.push(new org.webminster.caco3.Point(false, x, y));
} else {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "Call moveTo() first!", "org.webminster.caco3.Shape::lineTo", "org/webminster/caco3/Shape.as", 259);
}
}
function curveTo(p1x, p1y, p2x, p2y, p3x, p3y) {
if (m_points.length > 0) {
if (arguments.length == 4) {
m_points[m_points.length - 1].setControlPoint1Abs(p1x, p1y);
m_points.push(new org.webminster.caco3.Point(false, p2x, p2y));
} else if (arguments.length == 6) {
m_points[m_points.length - 1].setControlPoint1Abs(p1x, p1y);
m_points.push(new org.webminster.caco3.Point(false, p3x, p3y));
m_points[m_points.length - 1].setControlPoint2Abs(p2x, p2y);
} else {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "'curveTo' needs 4 or 6 arguments!", "org.webminster.caco3.Shape::curveTo", "org/webminster/caco3/Shape.as", 281);
}
} else {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "Call moveTo() first!", "org.webminster.caco3.Shape::curveTo", "org/webminster/caco3/Shape.as", 286);
}
}
function addPoint(sp, px, py, cp1x, cp1y, cp2x, cp2y) {
m_points.push(new org.webminster.caco3.Point(sp, px, py, cp1x, cp1y, cp2x, cp2y));
}
function addPoints(shape, xAdd, yAdd) {
if (xAdd == undefined) {
xAdd = 0;
}
if (yAdd == undefined) {
yAdd = 0;
}
var _local6 = 0;
for ( ; _local6 < shape.getNumberOfPoints() ; _local6++) {
var _local5 = shape.getRenderPoints()[_local6].copy();
if ((xAdd != 0) || (yAdd != 0)) {
_local5.setAnchorPoint(null, _local5.getAnchorPoint().x + xAdd, _local5.getAnchorPoint().y + yAdd);
}
m_points.push(_local5);
}
}
function copyPoint(point) {
m_points.push(point.copy());
}
function copyPoints(shape) {
deletePoints();
addPoints(shape);
m_closed = shape.isClosed();
m_xDrawOffset = shape.getDrawOffset().x;
m_yDrawOffset = shape.getDrawOffset().y;
}
function closePath(bool) {
if (arguments.length == 0) {
m_closed = true;
} else {
m_closed = bool;
}
}
function endFill() {
draw();
}
function clear() {
if (m_drawing_mc != null) {
m_drawing_mc.clear();
}
}
function draw(mc, level, name) {
if (m_points.length > 0) {
m_points[0].setAnchorPoint(true);
}
if (mc == undefined) {
m_drawing_mc = org.webminster.caco3.Drawer.getInstance().draw(this);
} else {
if ((name == undefined) && (level != undefined)) {
name = "object" + level;
}
m_drawing_mc = org.webminster.caco3.Drawer.getInstance().draw(this, mc, level, name);
}
m_drawing_mc._x = m_x;
m_drawing_mc._y = m_y;
return(m_drawing_mc);
}
function deletePoints(s, c) {
if (arguments.length == 0) {
m_points.splice(0);
} else if (arguments.length == 1) {
m_points.splice(m_points.length - c, c);
} else {
m_points.splice(s, c);
}
}
function sharePoint(point) {
m_points.push(point);
}
function sharePoints(shape) {
m_points = shape.getPoints();
m_closed = shape.isClosed();
m_xDrawOffset = shape.getDrawOffset().x;
m_yDrawOffset = shape.getDrawOffset().y;
}
function shareStyle(shape) {
m_style = shape.getStyle();
}
function getHandleLength(radius) {
return(((4 / 3) * (Math.sqrt(2) - 1)) * radius);
}
function setDrawOffset(x, y) {
m_xDrawOffset = x;
m_yDrawOffset = y;
}
function getDrawOffset() {
return({x:m_xDrawOffset, y:m_yDrawOffset});
}
function setPosition(x, y) {
m_x = x;
m_y = y;
}
function getPosition() {
return({x:m_x, y:m_y});
}
function calcRounding(type) {
var _local6 = new Array();
var _local8 = 0;
for ( ; _local8 < getNumberOfPoints() ; _local8++) {
var _local3 = m_points[_local8];
if ((_local8 + 1) == getNumberOfPoints()) {
var _local4 = m_points[0];
} else {
var _local4 = m_points[_local8 + 1];
}
var _local5 = org.webminster.caco3.Drawer.getPointOnSegment(_local3.getAnchorPoint(), _local4.getAnchorPoint(), 0.5);
if (_local8 == 0) {
var _local7 = new org.webminster.caco3.Point(true, _local5.x, _local5.y);
} else {
var _local7 = new org.webminster.caco3.Point(false, _local5.x, _local5.y);
}
_local7.setControlPoint1Abs(_local4.getAnchorPoint().x, _local4.getAnchorPoint().y);
if (type == CUBIC) {
_local7.setControlPoint2Abs(_local3.getAnchorPoint().x, _local3.getAnchorPoint().y);
}
_local6[_local8] = _local7;
}
return(_local6);
}
function copyObject(obj) {
var _local3 = new obj.__proto__.constructor();
for (var i in obj) {
if (typeof(obj[i]) == "object") {
_local3[i] = copyObject(obj[i]);
} else {
_local3[i] = obj[i];
}
}
return(_local3);
}
static var LOW = 1;
static var MEDIUM = 2;
static var HIGH = 3;
static var BEST = 4;
static var NORMAL = 5;
static var SIMPLE = 1;
static var LINEAR = 2;
static var RADIAL = 3;
static var NO = 1;
static var QUADRATIC = 2;
static var CUBIC = 3;
}
Symbol 3 MovieClip [__Packages.org.webminster.caco3.Ellipse] Frame 0
#initclip
if (!org.webminster.caco3.Ellipse) {
if (!org) {
_global.org = new Object();
}
if (!org.webminster) {
_global.org.webminster = new Object();
}
if (!org.webminster.caco3) {
_global.org.webminster.caco3 = new Object();
}
((_global.org.webminster.caco3.Ellipse = function (mc, level, name) {
if ((name == undefined) && (level != undefined)) {
name = "ellipse" + level;
}
super(mc, level, name);
this.m_iWidth = 120;
this.m_iHeight = 80;
this.m_iInnerWidth = 0;
this.m_iInnerHeight = 0;
this.m_iBeginningAngle = 0;
this.m_iEndAngle = 0;
this.closePath();
this.fillArray();
})).prototype.__proto__ = org.webminster.caco3.Shape.prototype;
(_global.org.webminster.caco3.Ellipse /* register */).prototype.__constructor__ = org.webminster.caco3.Shape;
var _local1 = (_global.org.webminster.caco3.Ellipse /* register */).prototype;
_local1.setSize = function (w, h) {
this.m_iWidth = w;
this.m_iHeight = h;
this.fillArray();
};
_local1.setInnerSize = function (w, h) {
if (w < this.m_iWidth) {
this.m_iInnerWidth = w;
}
if (h < this.m_iHeight) {
this.m_iInnerHeight = h;
}
this.fillArray();
};
_local1.setAngles = function (b, e) {
this.m_iBeginningAngle = b % 360;
this.m_iEndAngle = e % 360;
this.fillArray();
};
_local1.fillArray = function () {
this.deletePoints();
if (this.m_iBeginningAngle == this.m_iEndAngle) {
this.calcPoint(true, this.m_iWidth, this.m_iHeight, 0);
this.calcPoint(false, this.m_iWidth, this.m_iHeight, 90);
this.calcPoint(false, this.m_iWidth, this.m_iHeight, 180);
this.calcPoint(false, this.m_iWidth, this.m_iHeight, 270);
if ((this.m_iInnerWidth > 0) && (this.m_iInnerHeight > 0)) {
this.calcPoint(true, this.m_iInnerWidth, this.m_iInnerHeight, 0);
this.calcPoint(false, this.m_iInnerWidth, this.m_iInnerHeight, 90);
this.calcPoint(false, this.m_iInnerWidth, this.m_iInnerHeight, 180);
this.calcPoint(false, this.m_iInnerWidth, this.m_iInnerHeight, 270);
}
} else {
var _local2 = this.m_iBeginningAngle;
var _local3 = 0;
if (this.m_iEndAngle < this.m_iBeginningAngle) {
this.m_iEndAngle = this.m_iEndAngle + 360;
}
while (1) {
var _local5 = this.calcNextAngle(_local2);
if (_local5 > this.m_iEndAngle) {
_local5 = this.m_iEndAngle;
}
var _local4 = _local5 - _local2;
this.calcPoint(false, this.m_iWidth, this.m_iHeight, _local2, _local4, _local3);
_local3 = _local4;
if (_local2 == _local5) {
break;
}
_local2 = _local5;
}
if ((this.m_iInnerWidth > 0) && (this.m_iInnerHeight > 0)) {
_local2 = this.m_iEndAngle;
_local3 = 0;
while (1) {
var _local5 = this.calcPreviousAngle(_local2);
if (_local5 < this.m_iBeginningAngle) {
_local5 = this.m_iBeginningAngle;
}
var _local4 = _local5 - _local2;
this.calcPoint(false, this.m_iInnerWidth, this.m_iInnerHeight, _local2, _local4, _local3);
_local3 = _local4;
if (_local2 == _local5) {
break;
}
_local2 = _local5;
}
} else {
this.calcPoint(false, 0, 0, 0, 0, 0);
}
this.getPoint(0).setAnchorPoint(true);
}
};
_local1.calcPoint = function (sp, width, height, angle, nangle, pangle) {
if (nangle == undefined) {
nangle = 90;
}
if (pangle == undefined) {
pangle = 90;
}
var _local8 = (Math.cos((angle / 180) * Math.PI) * width) / 2;
var _local9 = (Math.sin((angle / 180) * Math.PI) * height) / 2;
var _local10 = (Math.atan((height / width) * Math.tan((angle / 180) * Math.PI)) * 180) / Math.PI;
if ((angle <= 90) || (angle > 270)) {
var _local11 = (Math.atan(((width * width) / (height * height)) * Math.tan((_local10 / 180) * Math.PI)) * 180) / Math.PI;
} else {
var _local11 = ((Math.atan(((width * width) / (height * height)) * Math.tan((_local10 / 180) * Math.PI)) * 180) / Math.PI) + 180;
}
var _local12 = this.getHandleLength(height / 2) * Math.abs(Math.cos((angle / 180) * Math.PI));
var _local13 = this.getHandleLength(width / 2) * Math.abs(Math.sin((angle / 180) * Math.PI));
var _local14 = Math.sqrt((_local13 * _local13) + (_local12 * _local12)) * (nangle / 90);
var _local15 = Math.sqrt((_local13 * _local13) + (_local12 * _local12)) * (pangle / 90);
this.addPoint(sp, _local8 + (this.m_iWidth / 2), _local9 + (this.m_iHeight / 2));
this.getPoint(this.getNumberOfPoints() - 1).setControlPoints(_local11 + 90, _local14, _local11 - 90, _local15);
};
_local1.calcNextAngle = function (a) {
var _local3 = 90 * (Math.floor(a / 90) + 1);
return(_local3);
};
_local1.calcPreviousAngle = function (a) {
var _local3 = 90 * Math.floor(a / 90);
if (a == _local3) {
_local3 = _local3 - 90;
}
return(_local3);
};
ASSetPropFlags(_local1, null, 1);
}
#endinitclip
Symbol 4 MovieClip [__Packages.org.webminster.caco3.Circle] Frame 0
#initclip
if (!org.webminster.caco3.Circle) {
if (!org) {
_global.org = new Object();
}
if (!org.webminster) {
_global.org.webminster = new Object();
}
if (!org.webminster.caco3) {
_global.org.webminster.caco3 = new Object();
}
((_global.org.webminster.caco3.Circle = function (mc, level, name) {
if ((name == undefined) && (level != undefined)) {
name = "circle" + level;
}
super(mc, level, name);
this.setSize(100, 100);
})).prototype.__proto__ = org.webminster.caco3.Ellipse.prototype;
(_global.org.webminster.caco3.Circle /* register */).prototype.__constructor__ = org.webminster.caco3.Ellipse;
var _local1 = (_global.org.webminster.caco3.Circle /* register */).prototype;
_local1.setRadius = function (r) {
this.setSize(r * 2, r * 2);
};
_local1.setInnerRadius = function (r) {
this.setInnerSize(r * 2, r * 2);
};
ASSetPropFlags(_local1, null, 1);
}
#endinitclip
Symbol 5 MovieClip [__Packages.org.webminster.caco3.Drawer] Frame 0
class org.webminster.caco3.Drawer
{
static var m_theOneDrawer;
function Drawer () {
}
static function getInstance() {
if (m_theOneDrawer == null) {
m_theOneDrawer = new org.webminster.caco3.Drawer();
}
return(m_theOneDrawer);
}
function draw(shape, parent_mc, level, name) {
var _local8 = new Array();
var _local9 = 0;
var _local10 = 0;
var _local11 = shape.getDrawOffset().x;
var _local12 = shape.getDrawOffset().y;
if (arguments.length == 0) {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "Draw needs arguments", "org.webminster.caco3.Drawer::draw", "org/webminster/caco3/Drawer.as", 75);
return(null);
}
if (arguments.length == 1) {
var _local6 = createDrawingMovieClip(shape.getMovieClip(), shape.getLevel(), shape.getName());
} else {
var _local6 = createDrawingMovieClip(parent_mc, level, name);
}
var _local13 = shape.getStyle();
var _local7 = shape.getRenderPoints();
if (shape.getNumberOfPoints() > 1) {
if (shape.isClosed()) {
if (_local13.fillType == org.webminster.caco3.Shape.SIMPLE) {
_local6.beginFill(_local13.fillColors[0], _local13.fillAlphas[0]);
} else {
if (_local13.fillType == org.webminster.caco3.Shape.LINEAR) {
var _local14 = "linear";
} else if (_local13.fillType == org.webminster.caco3.Shape.RADIAL) {
var _local14 = "radial";
}
_local6.beginGradientFill(_local14, _local13.fillColors, _local13.fillAlphas, _local13.fillRatios, _local13.fillMatrix);
}
}
if (_local13.lineWidth > 0) {
_local6.lineStyle(_local13.lineWidth, _local13.lineColor, _local13.lineAlpha);
}
var _local15 = 0;
for ( ; _local15 < shape.getNumberOfPoints() ; _local15++) {
_local8.push(_local7[_local15]);
if (((_local15 + 1) == shape.getNumberOfPoints()) || (shape.getPoint(_local15 + 1).getAnchorPoint().startingPoint)) {
_local6.moveTo(_local8[0].getAnchorPoint().x + _local11, _local8[0].getAnchorPoint().y + _local12);
_local9 = _local9 + drawPath(_local6, _local8, shape.isClosed(), _local11, _local12, shape.bezierQuality);
_local10++;
_local8 = new Array();
}
}
if (shape.isClosed()) {
_local6.endFill();
}
if (shape.showControls) {
drawInfo(_local6, shape);
}
} else {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "Shape must consist at least out of 2 Points!", "org.webminster.caco3.Drawer::draw", "org/webminster/caco3/Drawer.as", 158);
}
return(_local6);
}
function createDrawingMovieClip(mc, level, name) {
if (mc == undefined) {
var _local5 = _root;
} else if (level == undefined) {
var _local5 = mc;
} else {
if (name == undefined) {
name = "object" + level;
}
if (mc[name] == null) {
var _local5 = mc.createEmptyMovieClip(name, level);
} else {
var _local5 = mc[name];
}
}
return(_local5);
}
function drawPath(mc, points, closed, xOffset, yOffset, quality) {
var _local8 = points.length - 1;
if (closed) {
_local8++;
if ((points[0].getAnchorPoint().x == points[points.length - 1].getAnchorPoint().x) && ((points[0].getAnchorPoint().y == points[points.length - 1].getAnchorPoint().y) && ((!points[0].getControlPoint2().distance) && (!points[points.length - 1].getControlPoint1().distance)))) {
_local8--;
}
}
var _local10 = 0;
for ( ; _local10 < _local8 ; _local10++) {
if ((_local10 + 1) < points.length) {
var _local9 = _local10 + 1;
} else {
var _local9 = 0;
}
drawSection(mc, points[_local10], points[_local9], xOffset, yOffset, quality);
}
return(_local8);
}
function drawSection(mc, point1, point2, xOffset, yOffset, quality) {
var _local8 = point1.getControlPoint1().distance;
var _local9 = point2.getControlPoint2().distance;
if (_local8 && (_local9)) {
var _local10 = point1.getAnchorPoint().x + xOffset;
var _local11 = point1.getAnchorPoint().y + yOffset;
var _local12 = point1.getControlPoint1().x + xOffset;
var _local13 = point1.getControlPoint1().y + yOffset;
var _local14 = point2.getControlPoint2().x + xOffset;
var _local15 = point2.getControlPoint2().y + yOffset;
var _local16 = point2.getAnchorPoint().x + xOffset;
var _local17 = point2.getAnchorPoint().y + yOffset;
drawCubicBezier2({x:_local10, y:_local11}, {x:_local12, y:_local13}, {x:_local14, y:_local15}, {x:_local16, y:_local17}, mc);
} else if (_local8 || (_local9)) {
if (_local8) {
var _local18 = point1.getControlPoint1().x;
var _local19 = point1.getControlPoint1().y;
}
if (_local9) {
var _local18 = point2.getControlPoint2().x;
var _local19 = point2.getControlPoint2().y;
}
mc.curveTo(_local18 + xOffset, _local19 + yOffset, point2.getAnchorPoint().x + xOffset, point2.getAnchorPoint().y + yOffset);
} else {
mc.lineTo(point2.getAnchorPoint().x + xOffset, point2.getAnchorPoint().y + yOffset);
}
}
function drawCubicBezier2(P0, P1, P2, P3, mc) {
var _local7 = getPointOnSegment(P0, P1, 3 / 4);
var _local8 = getPointOnSegment(P3, P2, 3 / 4);
var _local9 = (P3.x - P0.x) / 16;
var _local10 = (P3.y - P0.y) / 16;
var _local11 = getPointOnSegment(P0, P1, 3 / 8);
var _local12 = getPointOnSegment(_local7, _local8, 3 / 8);
_local12.x = _local12.x - _local9;
_local12.y = _local12.y - _local10;
var _local13 = getPointOnSegment(_local8, _local7, 3 / 8);
_local13.x = _local13.x + _local9;
_local13.y = _local13.y + _local10;
var _local14 = getPointOnSegment(P3, P2, 3 / 8);
var _local15 = getPointOnSegment(_local11, _local12, 0.5);
var _local16 = getPointOnSegment(_local7, _local8, 0.5);
var _local17 = getPointOnSegment(_local13, _local14, 0.5);
mc.curveTo(_local11.x, _local11.y, _local15.x, _local15.y);
mc.curveTo(_local12.x, _local12.y, _local16.x, _local16.y);
mc.curveTo(_local13.x, _local13.y, _local17.x, _local17.y);
mc.curveTo(_local14.x, _local14.y, P3.x, P3.y);
}
static function getPointOnSegment(P0, P1, ratio) {
return({x:P0.x + ((P1.x - P0.x) * ratio), y:P0.y + ((P1.y - P0.y) * ratio)});
}
function drawInfo(mc, shape) {
if ((mc != null) && (shape != null)) {
var _local4 = shape.getDrawOffset().x;
var _local5 = shape.getDrawOffset().y;
var _local6 = 0;
for ( ; _local6 < shape.getNumberOfPoints() ; _local6++) {
var _local7 = shape.getPoint(_local6);
if (_local7.getControlPoint1().distance) {
drawLine(mc, _local7.getAnchorPoint().x + _local4, _local7.getAnchorPoint().y + _local5, _local7.getControlPoint1().x + _local4, _local7.getControlPoint1().y + _local5);
drawRoundDot(mc, _local7.getControlPoint1().x + _local4, _local7.getControlPoint1().y + _local5);
}
if (_local7.getControlPoint2().distance) {
drawLine(mc, _local7.getAnchorPoint().x + _local4, _local7.getAnchorPoint().y + _local5, _local7.getControlPoint2().x + _local4, _local7.getControlPoint2().y + _local5);
drawRoundDot(mc, _local7.getControlPoint2().x + _local4, _local7.getControlPoint2().y + _local5);
}
if (_local7.getAnchorPoint().startingPoint) {
drawDot(mc, _local7.getAnchorPoint().x + _local4, _local7.getAnchorPoint().y + _local5, 16711808);
} else {
drawDot(mc, _local7.getAnchorPoint().x + _local4, _local7.getAnchorPoint().y + _local5, 16711680);
}
}
drawDot(mc, 0, 0, 65280, 3);
if (mc._parent.m_bLinesVisible == null) {
mc._parent.m_bLinesVisible = true;
drawLine(mc._parent, 0, -4096, 0, 4096, 65280, 50);
drawLine(mc._parent, -4096, 0, 4096, 0, 16711680, 50);
}
} else {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "DrawInfo needs Parameters!!!", "org.webminster.caco3.Drawer::drawInfo", "org/webminster/caco3/Drawer.as", 556);
}
}
function drawDot(mc, x, y, color, size) {
if (color == undefined) {
color = 16711680 /* 0xFF0000 */;
}
if (size == undefined) {
size = 2;
}
mc.beginFill(color, 40);
mc.lineStyle(1, color, 1000);
mc.moveTo(x - size, y - size);
mc.lineTo(x + size, y - size);
mc.lineTo(x + size, y + size);
mc.lineTo(x - size, y + size);
mc.endFill();
}
function drawRoundDot(mc, x, y, color, size) {
if (color == undefined) {
color = 255;
}
if (size == undefined) {
size = 2;
}
mc.beginFill(color, 40);
mc.lineStyle(1, color, 100);
mc.moveTo(x, y - size);
mc.curveTo(x + size, y - size, x + size, y);
mc.curveTo(x + size, y + size, x, y + size);
mc.curveTo(x - size, y + size, x - size, y);
mc.curveTo(x - size, y - size, x, y - size);
mc.endFill();
}
function drawLine(mc, x1, y1, x2, y2, color, alpha, size) {
if (color == undefined) {
color = 255;
}
if (alpha == undefined) {
alpha = 50;
}
if (size == undefined) {
size = 1;
}
mc.beginFill(16777215, 0);
mc.lineStyle(1, color, alpha);
mc.moveTo(x1, y1);
mc.lineTo(x2, y2);
mc.endFill();
}
}
Symbol 6 MovieClip [__Packages.org.webminster.utils.Tracer] Frame 0
class org.webminster.utils.Tracer
{
function Tracer () {
}
static function instance() {
if (m_TheOneTracer == null) {
m_TheOneTracer = new org.webminster.utils.Tracer();
}
return(m_TheOneTracer);
}
function enableTracer() {
m_bTracingEnabled = true;
}
static function trace(sText, sMethodName, sFileName, iLineOfFile) {
var _local6 = "";
var _local7 = "debug";
if (sText.substr(0, 2) == "##") {
var _local8 = sText.indexOf("##", 2);
_local7 = sText.substring(2, _local8);
_local6 = sText.substr(_local8 + 2);
} else {
_local6 = sText;
}
instance().sendTraceToJS(_local6, sMethodName, sFileName, iLineOfFile, _local7);
}
function sendTraceToJS(sText, sMethodName, sFileName, iLineOfFile, sTraceClass) {
if (!m_bTracingEnabled) {
return(undefined);
}
var _local7 = org.webminster.utils.StringParser.StringReplace(sText, "'", "\\'");
getURL (((((((((("javascript:" + sTraceClass) + "('") + _local7) + "', '") + sMethodName) + "', '") + sFileName) + "', '") + iLineOfFile) + "')", "_self");
}
static function traceInit() {
}
static var m_TheOneTracer = null;
static var m_bTracingEnabled = false;
static var DEBUG = "##debug##";
static var INFO = "##info##";
static var WARN = "##warning##";
static var ERROR = "##error##";
static var STEP = "##step##";
}
Symbol 7 MovieClip [__Packages.org.webminster.utils.StringParser] Frame 0
class org.webminster.utils.StringParser
{
var m_aStdTokenDelimiter, m_sSource, m_iCurPos;
function StringParser (sSource) {
ResetString(sSource);
m_aStdTokenDelimiter = new Array();
m_aStdTokenDelimiter.push(" ");
m_aStdTokenDelimiter.push("\t");
m_aStdTokenDelimiter.push("\r");
m_aStdTokenDelimiter.push(newline);
}
function ResetString(sSource) {
m_sSource = sSource;
m_iCurPos = 0;
}
function NextToken(aSpecialTokenDelimiter) {
var _local3 = 0;
var _local4 = 0;
var _local5 = 0;
var _local6 = m_sSource.charAt(m_iCurPos);
var _local7 = new Array();
_local7 = _local7.concat(m_aStdTokenDelimiter);
if ((aSpecialTokenDelimiter != null) && (aSpecialTokenDelimiter != undefined)) {
_local7 = _local7.concat(aSpecialTokenDelimiter);
}
while (IsOneOf(_local6, _local7)) {
m_iCurPos++;
_local6 = m_sSource.charAt(m_iCurPos);
}
if (_local6 == "") {
return("");
}
_local4 = m_iCurPos;
do {
if (!IsNotOneOf(_local6, _local7)) {
break;
}
m_iCurPos++;
_local6 = m_sSource.charAt(m_iCurPos);
} while (_local6 != "");
_local5 = m_iCurPos;
_local3 = _local5 - _local4;
if (_local3 == 0) {
return("");
}
return(m_sSource.substr(_local4, _local3));
}
function IsOneOf(sNeedle, aHaystack) {
var _local4 = 0;
for ( ; _local4 < aHaystack.length ; _local4++) {
if (aHaystack[_local4] == sNeedle) {
return(true);
}
}
return(false);
}
function IsNotOneOf(sNeedle, aHaystack) {
var _local4 = 0;
for ( ; _local4 < aHaystack.length ; _local4++) {
if (aHaystack[_local4] == sNeedle) {
return(false);
}
}
return(true);
}
static function StringReplace(sHaystack, sNeedle, sReplacement) {
var _local5 = sHaystack.split(sNeedle);
return(_local5.join(sReplacement));
}
}
Symbol 8 MovieClip [__Packages.org.webminster.vanadium.preloader.Preloader] Frame 0
class org.webminster.vanadium.preloader.Preloader
{
function Preloader () {
fscommand ("allowscale", false);
fscommand ("showmenu", false);
var _local2 = _root.createEmptyMovieClip("vanadium_logo", 2);
drawLogo(_local2, 56);
var _local3 = _local2._width;
var _local4 = _local2._height;
var _local5 = Stage.width / _local3;
var _local6 = Stage.height / _local4;
if ((_local6 < 1) || (_local5 < 1)) {
var _local7 = Math.min(_local6, _local5);
_local2._width = Math.floor(_local2._width * _local7);
_local2._height = Math.floor(_local2._height * _local7);
}
_local2._x = org.webminster.vanadium.model.Defines.PLAYER_WIDTH / 2;
_local2._y = org.webminster.vanadium.model.Defines.PLAYER_HEIGHT / 2;
_local2.onRelease = com.dynamicflash.utils.Delegate.create(this, InfoButton);
_root.onEnterFrame = com.dynamicflash.utils.Delegate.create(this, CheckLoadStatus);
}
function CheckLoadStatus() {
org.webminster.utils.Tracer.trace((org.webminster.utils.Tracer.INFO + "Preloader.CheckLoadStatus() called. Loaded: ") + _root.getBytesLoaded(), "org.webminster.vanadium.preloader.Preloader::CheckLoadStatus", "/home/johannes/Development/Vanadium/make/../src_as/org/webminster/vanadium/preloader/Preloader.as", 86);
var _local2 = (_root.getBytesLoaded() >= _root.getBytesTotal()) && (getTimer() > org.webminster.vanadium.model.Defines.PRELOADER_TIMEOUT);
if (_local2) {
_root.onEnterFrame = null;
_root.gotoAndStop(2);
}
}
function drawLogo(mc, size) {
var _local4 = new org.webminster.caco3.Circle(mc, 1, "shadow");
_local4.setRadius(47);
_local4.setDrawOffset(-47, -47);
_local4.setLineStyle(0);
_local4.setFillStyle(org.webminster.caco3.Shape.RADIAL, [0, 0], [60, 0], [182, 246], {matrixType:"box", x:-47, y:-47, w:92, h:92, r:0});
_local4.draw();
var _local5 = new org.webminster.caco3.Circle(mc, 2, "border");
_local5.setRadius(41);
_local5.setDrawOffset(-41, -47);
_local5.setLineStyle(0);
_local5.setFillStyle(org.webminster.caco3.Shape.LINEAR, [16763904, 16750848], [100, 100], [0, 255], {matrixType:"box", x:-41, y:-44, w:82, h:82, r:(90 / 180) * Math.PI});
_local5.draw();
var _local6 = new org.webminster.caco3.Circle(mc, 3, "background");
_local6.setRadius(40);
_local6.setDrawOffset(-40, -46);
_local6.setLineStyle(0);
_local6.setFillStyle(org.webminster.caco3.Shape.LINEAR, [16737792, 16776960], [100, 100], [0, 255], {matrixType:"box", x:-40, y:-43, w:80, h:80, r:(90 / 180) * Math.PI});
_local6.draw();
var _local7 = new org.webminster.caco3.Shape(mc, 4, "V");
_local7.setDrawOffset(-19.6, -23.5);
_local7.addPoint(true, 2.1, 0, 2.1, 0, 0.7, 0);
_local7.addPoint(false, 10.9, 0, 12.3, 0, 10.9, 0);
_local7.addPoint(false, 13, 2, 13, 2, 13, 0.7);
_local7.addPoint(false, 13, 28.7, 13, 29.3, 13, 28.7);
_local7.addPoint(false, 13.9, 29.6, 14.6, 29.6, 13.3, 29.6);
_local7.addPoint(false, 15.7, 28.6, 15.7, 28.6, 15.2, 29.3);
_local7.addPoint(false, 33.8, 1.5, 34.4, 0.5, 33.8, 1.5);
_local7.addPoint(false, 36.5, 0, 36.5, 0, 35.4, 0);
_local7.addPoint(false, 45.4, 0, 46.4, 0, 45.4, 0);
_local7.addPoint(false, 46.9, 1.2, 46.9, 1.5, 46.9, 0.4);
_local7.addPoint(false, 46.6, 2.1, 46.6, 2.1, 46.8, 1.8);
_local7.addPoint(false, 26.6, 32.2, 25.9, 33.2, 26.6, 32.2);
_local7.addPoint(false, 23.7, 33.7, 23.7, 33.7, 25, 33.7);
_local7.addPoint(false, 2.1, 33.7, 0.7, 33.7, 2.1, 33.7);
_local7.addPoint(false, 0, 31.6, 0, 31.6, 0, 33);
_local7.addPoint(false, 0, 2, 0, 0.7, 0, 2);
_local7.closePath(true);
_local7.setLineStyle(0);
_local7.setFillStyle(org.webminster.caco3.Shape.SIMPLE, [3355443]);
_local7.draw();
var _local8 = new org.webminster.caco3.Ellipse(mc, 5, "reflection");
_local8.setSize(56, 36);
_local8.setDrawOffset(-28, -44);
_local8.setLineStyle(0);
_local8.setFillStyle(org.webminster.caco3.Shape.LINEAR, [16777215, 16777215], [90, 20], [0, 255], {matrixType:"box", x:-28, y:-41, w:56, h:36, r:(90 / 180) * Math.PI});
_local8.draw();
mc._width = size;
mc._height = size;
}
function InfoButton() {
getURL (org.webminster.vanadium.model.Defines.INFO_URL, "_self");
}
static function main(mc) {
org.webminster.utils.Tracer.traceInit();
_root.stop();
if (org.webminster.vanadium.model.Defines.MayPlayerRun()) {
var _local3 = new org.webminster.vanadium.preloader.Preloader();
}
}
}
Symbol 9 MovieClip [__Packages.org.webminster.caco3.Point] Frame 0
class org.webminster.caco3.Point
{
var m_bStartingPoint, m_px, m_py, m_cp1x, m_cp1y, m_cp2x, m_cp2y;
function Point (sp, px, py, cp1x, cp1y, cp2x, cp2y) {
m_bStartingPoint = sp;
m_px = 0;
m_py = 0;
m_cp1x = 0;
m_cp1y = 0;
m_cp2x = 0;
m_cp2y = 0;
if (px != null) {
m_px = px;
if (cp1x != null) {
m_cp1x = cp1x - m_px;
}
if (cp2x != null) {
m_cp2x = cp2x - m_px;
}
}
if (px != null) {
m_py = py;
if (cp1y != null) {
m_cp1y = cp1y - m_py;
}
if (cp2y != null) {
m_cp2y = cp2y - m_py;
}
}
}
function copy() {
return(new org.webminster.caco3.Point(m_bStartingPoint, m_px, m_py, m_cp1x + m_px, m_cp1y + m_py, m_cp2x + m_px, m_cp2y + m_py));
}
function setAnchorPoint(sp, px, py) {
if (sp != null) {
m_bStartingPoint = sp;
}
if (px != null) {
m_px = px;
}
if (py != null) {
m_py = py;
}
}
function setControlPoint1(angle, distance) {
setControlPoint(1, angle, distance);
}
function setControlPoint2(angle, distance) {
setControlPoint(2, angle, distance);
}
function setControlPoints(angle1, distance1, angle2, distance2) {
setControlPoint(1, angle1, distance1);
setControlPoint(2, angle2, distance2);
}
function setControlPoint1Abs(dx, dy) {
if (dx != null) {
m_cp1x = dx - m_px;
}
if (dy != null) {
m_cp1y = dy - m_py;
}
}
function setControlPoint2Abs(dx, dy) {
if (dx != null) {
m_cp2x = dx - m_px;
}
if (dy != null) {
m_cp2y = dy - m_py;
}
}
function setControlPointsAbs(dx1, dy1, dx2, dy2) {
setControlPoint1Abs(dx1, dy1);
setControlPoint2Abs(dx2, dy2);
}
function getAnchorPoint() {
return({x:m_px, y:m_py, startingPoint:m_bStartingPoint});
}
function getControlPoint1() {
return({x:m_px + m_cp1x, y:m_py + m_cp1y, angle:calcAngle(m_cp1x, m_cp1y), distance:calcDistance(m_cp1x, m_cp1y)});
}
function getControlPoint2() {
return({x:m_px + m_cp2x, y:m_py + m_cp2y, angle:calcAngle(m_cp2x, m_cp2y), distance:calcDistance(m_cp2x, m_cp2y)});
}
function calcAngle(dx, dy) {
var _local4 = (Math.atan2(dy, dx) * 180) / Math.PI;
if (_local4 < 0) {
_local4 = _local4 + 360;
}
return(_local4);
}
function calcDistance(dx, dy) {
return(Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)));
}
function setControlPoint(cp, a, d) {
var _local5 = 0;
var _local6 = 0;
if ((a == null) && (d == null)) {
return(undefined);
}
if (cp == 1) {
var _local7 = m_cp1x;
var _local8 = m_cp1y;
} else if (cp == 2) {
var _local7 = m_cp2x;
var _local8 = m_cp2y;
} else {
return(undefined);
}
if (a == null) {
_local5 = calcAngle(_local7, _local8);
} else {
_local5 = a;
}
if (d == null) {
_local6 = calcDistance(_local7, _local8);
} else {
_local6 = d;
}
var _local8 = Math.sin((_local5 / 180) * Math.PI) * _local6;
var _local7 = Math.cos((_local5 / 180) * Math.PI) * _local6;
if (cp == 1) {
m_cp1x = _local7;
m_cp1y = _local8;
} else {
m_cp2x = _local7;
m_cp2y = _local8;
}
}
}
Symbol 10 MovieClip [__Packages.org.webminster.vanadium.model.Defines] Frame 0
class org.webminster.vanadium.model.Defines
{
function Defines () {
}
static function MayPlayerRun() {
var _local2 = false;
var _local3 = new Date();
var _local4 = _local3.getUTCFullYear();
var _local5 = _local3.getUTCMonth() + 1;
if (runsUnlimited || ((_local4 < runsUntilYear) || ((_local5 <= runsUntilMonth) && (_local4 == runsUntilYear)))) {
if (officialRelease || ((_root._url.substr(0, 6) == "file:/") || (_root._url.substr(0, 36) == "http://test.vanadium.webminster.org/"))) {
_local2 = true;
}
}
return(_local2);
}
static function getPlayerVersion() {
return(VERSION);
}
static function getPlayerLanguage() {
return(LANGUAGE);
}
static function getPlayerDate() {
return(DATE);
}
static function getPlayerDateStr() {
return(DATE_STR);
}
static function getPlayerName() {
return(NAME);
}
static var VERSION = "2.5b3";
static var LANGUAGE = "EN";
static var DATE = "20081230";
static var DATE_STR = "2008/12/30";
static var NAME = "WebMinster WebPlayer";
static var officialRelease = true;
static var runsUnlimited = false;
static var runsUntilMonth = 6;
static var runsUntilYear = 2009;
static var PRELOADER_TIMEOUT = 2000;
static var INFO_URL = ((((((((((((("javascript:VanadiumInfoWindow=window.open(\"http://info.vanadium.webminster.org/v2.0/?version=" + getPlayerVersion()) + "&language=") + getPlayerLanguage()) + "&date=") + getPlayerDate()) + "&os=") + System.capabilities.os) + "&flashversion=") + getVersion()) + "\",\"VanadiumInfoWindow\",\"width=400,height=300,left=") + ((System.capabilities.screenResolutionX / 2) - 204)) + ",top=") + (((System.capabilities.screenResolutionY / 2) - 150) - Math.round((System.capabilities.screenResolutionY - 300) * 0.1))) + ",toolbar=no,status=no,resizable=no,menubar=no,location=no,dependent=yes\"); void(0);";
static var PLAYER_WIDTH = 240;
static var PLAYER_HEIGHT = 64;
}
Symbol 11 MovieClip [__Packages.com.dynamicflash.utils.Delegate] Frame 0
class com.dynamicflash.utils.Delegate
{
function Delegate () {
}
static function create(target, handler) {
var _local4 = arguments.slice(2);
var _local5 = function () {
var _local2 = arguments.callee;
var _local3 = arguments.concat(_local2.extraArgs, [_local2]);
return(_local2.handler.apply(_local2.target, _local3));
};
_local5.extraArgs = _local4;
_local5.handler = handler;
_local5.target = target;
return(_local5);
}
}
Symbol 1 MovieClip [preloader] Frame 1
org.webminster.vanadium.preloader.Preloader.main(this);
Symbol 13 MovieClip [__Packages.org.webminster.vanadium.model.IModel] Frame 0
class org.webminster.vanadium.model.IModel
{
function IModel () {
}
}
Symbol 14 MovieClip [__Packages.org.webminster.vanadium.model.CoreModel] Frame 0
class org.webminster.vanadium.model.CoreModel implements org.webminster.vanadium.model.IModel
{
var m_Playlist;
function CoreModel () {
m_bAutoStart = (org.webminster.utils.Converter.isFalse(_root.autostart) ? false : true);
m_bRandom = org.webminster.utils.Converter.isTrue(_root.random);
m_bLooping = org.webminster.utils.Converter.isTrue(_root.loop);
m_bRemoteActive = org.webminster.utils.Converter.isTrue(_root.remote);
m_sPreviewSource = org.webminster.utils.Converter.varToString(_root.preview);
m_sSource = org.webminster.utils.Converter.varToString(_root.src);
m_bDebug = org.webminster.utils.Converter.isTrue(_root.debug);
if (m_bDebug) {
org.webminster.utils.Tracer.instance().enableTracer();
}
m_Playlist = new org.webminster.vanadium.model.Playlist();
m_iVolume = org.webminster.vanadium.model.PlayerDefines.INITIAL_VOLUME;
_root._soundbuftime = 1;
}
static function instance() {
if (null == m_TheInstance) {
m_TheInstance = new org.webminster.vanadium.model.CoreModel();
}
return(m_TheInstance);
}
function _getPlaylist() {
return(m_Playlist);
}
function stateToString(eState) {
switch (eState) {
case STATE_UNINITIALIZED :
return("Uninitialized");
case STATE_INIT :
return("Init");
case STATE_SHOWINGPREVIEW :
return("ShowingPreview");
case STATE_LOADINGPLAYLIST :
return("LoadingPlaylist");
case STATE_CHECKINGINPUT :
return("CheckingInput");
case STATE_INPUTERROR :
return("InputError");
case STATE_PLAYINIT :
return("PlayInit");
case STATE_WAITFORCLICK :
return("WaitForClick");
case STATE_WAITFORENOUGHLOADED :
return("WaitForEnoughLoaded");
case STATE_PLAY :
return("Play");
case STATE_PAUSE :
return("Pause");
}
return("unknown state");
}
function setCurrentState(eNewState) {
if (eNewState == m_eGlobalState) {
return(undefined);
}
var _local3 = stateToString(m_eGlobalState);
var _local4 = stateToString(eNewState);
m_eGlobalState = eNewState;
org.webminster.utils.Tracer.trace(((((org.webminster.utils.Tracer.INFO + "Global state: <") + _local3) + "> ==> <") + _local4) + ">!", "org.webminster.vanadium.model.CoreModel::setCurrentState", "org/webminster/vanadium/model/CoreModel.as", 191);
}
function currentState() {
return(m_eGlobalState);
}
function currentStateAsString() {
return(("Global state: <" + stateToString(m_eGlobalState)) + ">");
}
function setCurrentLoaderState(eNewState) {
if (eNewState == m_eLoaderState) {
return(undefined);
}
var _local3 = loaderStateToString(m_eLoaderState);
var _local4 = loaderStateToString(eNewState);
m_eLoaderState = eNewState;
org.webminster.utils.Tracer.trace(((((org.webminster.utils.Tracer.INFO + "Loader state: <") + _local3) + "> ==> <") + _local4) + ">!", "org.webminster.vanadium.model.CoreModel::setCurrentLoaderState", "org/webminster/vanadium/model/CoreModel.as", 217);
}
function currentLoaderState() {
return(m_eLoaderState);
}
function currentLoaderStateAsString() {
return(("Loader state: <" + loaderStateToString(m_eLoaderState)) + ">");
}
function loaderStateToString(eState) {
switch (eState) {
case LOADERSTATE_UNINITIALIZED :
return("Uninitialized");
case LOADERSTATE_LOADING :
return("Loading");
case LOADERSTATE_LOADING_INACTIV :
return("Loading inactiv");
}
return("unknown state");
}
function previewIsConfigured() {
return(m_sPreviewSource != "");
}
function source() {
return(m_sSource);
}
function getPreviewUrl() {
return(m_sPreviewSource);
}
function getPlayerInfo() {
var _local2 = org.webminster.vanadium.model.Defines.getPlayerName();
_local2 = _local2 + " - Version ";
_local2 = _local2 + org.webminster.vanadium.model.Defines.getPlayerVersion();
_local2 = _local2 + " // ";
_local2 = _local2 + org.webminster.vanadium.model.Defines.getPlayerLanguage();
_local2 = _local2 + " // [";
_local2 = _local2 + org.webminster.vanadium.model.Defines.getPlayerDate();
_local2 = _local2 + "] - System Audio Support: [";
_local2 = _local2 + System.capabilities.hasAudioEncoder;
_local2 = _local2 + "][";
_local2 = _local2 + System.capabilities.hasAudio;
_local2 = _local2 + "][";
_local2 = _local2 + System.capabilities.hasMP3;
_local2 = _local2 + "] - (";
_local2 = _local2 + System.capabilities.os;
_local2 = _local2 + " - Flash Player ";
_local2 = _local2 + getVersion();
_local2 = _local2 + ")";
return(_local2);
}
function getVolume() {
return(m_iVolume);
}
function setVolume(iVol) {
m_iVolume = iVol;
m_Playlist.currentEntry(0).setVolume(m_iVolume);
}
function incVolume(iAmount) {
setVolume(getVolume() + iAmount);
}
function decVolume(iAmount) {
setVolume(getVolume() - iAmount);
}
function isPlaying() {
switch (m_eGlobalState) {
case STATE_WAITFORENOUGHLOADED :
case STATE_PLAY :
return(true);
}
return(false);
}
function isLooping() {
return(m_bLooping);
}
function isRandom() {
return(m_bRandom);
}
function isAutostart() {
return(m_bAutoStart);
}
function isRemoteActive() {
return(m_bRemoteActive);
}
function getPlaylist() {
return(m_Playlist);
}
static var m_TheInstance = null;
var m_bAutoStart = false;
var m_bRandom = false;
var m_bLooping = false;
var m_bRemoteActive = false;
var m_bDebug = false;
var m_sPreviewSource = "";
var m_sSource = "";
var m_iVolume = 0;
static var STATE_UNINITIALIZED = 0;
static var STATE_INIT = 1;
static var STATE_SHOWINGPREVIEW = 10;
static var STATE_LOADINGPLAYLIST = 11;
static var STATE_CHECKINGINPUT = 12;
static var STATE_INPUTERROR = 13;
static var STATE_PLAYINIT = 20;
static var STATE_WAITFORCLICK = 21;
static var STATE_WAITFORENOUGHLOADED = 22;
static var STATE_PLAY = 23;
static var STATE_PAUSE = 24;
var m_eGlobalState = STATE_UNINITIALIZED;
static var LOADERSTATE_UNINITIALIZED = 0;
static var LOADERSTATE_LOADING = 1;
static var LOADERSTATE_LOADING_INACTIV = 2;
var m_eLoaderState = LOADERSTATE_UNINITIALIZED;
}
Symbol 15 MovieClip [__Packages.org.webminster.caco3.Shape] Frame 0
class org.webminster.caco3.Shape
{
var m_closed, showControls, bezierQuality, m_rounding, m_x, m_y, m_xDrawOffset, m_yDrawOffset, m_style, m_points, m_name, m_level, m_mc, m_drawing_mc;
function Shape (mc, level, name) {
m_closed = false;
showControls = false;
bezierQuality = NORMAL;
m_rounding = NO;
m_x = 0;
m_y = 0;
m_xDrawOffset = 0;
m_yDrawOffset = 0;
m_style = new Object();
m_style.fillType = SIMPLE;
m_style.fillColors = [16777215];
m_style.fillAlphas = [100];
m_style.lineWidth = 1;
m_style.lineColor = 0;
m_style.lineAlpha = 100;
m_points = new Array();
if ((name == undefined) && (level != undefined)) {
name = "object" + level;
}
m_name = name;
m_level = level;
m_mc = mc;
}
function getDrawingMovieClip() {
return(m_drawing_mc);
}
function getMovieClip() {
return(m_mc);
}
function getLevel() {
return(m_level);
}
function getName() {
return(m_name);
}
function getNumberOfPoints() {
return(m_points.length);
}
function getPoints() {
return(m_points);
}
function getRenderPoints() {
if ((m_rounding == QUADRATIC) || (m_rounding == CUBIC)) {
return(calcRounding(m_rounding));
}
return(m_points);
}
function getPoint(index) {
return(m_points[index]);
}
function getStyle() {
return(m_style);
}
function isClosed() {
return(m_closed);
}
function setRounding(type) {
m_rounding = type;
}
function setLineStyle(thickness, color, alpha) {
lineStyle(thickness, color, alpha);
}
function lineStyle(thickness, color, alpha) {
if (thickness != null) {
m_style.lineWidth = thickness;
}
if (color != null) {
m_style.lineColor = color;
}
if (alpha != null) {
m_style.lineAlpha = alpha;
}
}
function beginFill(color, alpha) {
setFillStyle(SIMPLE, [color], [alpha]);
m_closed = true;
}
function beginGradientFill(type, colors, alphas, ratios, matrix) {
if (type == "linear") {
setFillStyle(LINEAR, colors, alphas, ratios, matrix);
} else if (type == "radial") {
setFillStyle(RADIAL, colors, alphas, ratios, matrix);
}
m_closed = true;
}
function setFillStyle(type, colors, alphas, ratios, matrix) {
if (type != null) {
m_style.fillType = type;
}
if (colors != null) {
m_style.fillColors = colors;
}
if (alphas != null) {
m_style.fillAlphas = alphas;
}
m_style.fillRatios = ratios;
m_style.fillMatrix = matrix;
m_closed = true;
}
function copyStyle(shape) {
m_style = copyObject(shape.getStyle());
}
function moveTo(x, y) {
if ((m_points.length > 0) && (m_points[m_points.length - 1].getAnchorPoint().startingPoint)) {
m_points[m_points.length - 1].m_x = x;
m_points[m_points.length - 1].m_y = y;
} else {
m_points.push(new org.webminster.caco3.Point(true, x, y));
}
}
function lineTo(x, y) {
if (m_points.length > 0) {
m_points.push(new org.webminster.caco3.Point(false, x, y));
} else {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "Call moveTo() first!", "org.webminster.caco3.Shape::lineTo", "org/webminster/caco3/Shape.as", 259);
}
}
function curveTo(p1x, p1y, p2x, p2y, p3x, p3y) {
if (m_points.length > 0) {
if (arguments.length == 4) {
m_points[m_points.length - 1].setControlPoint1Abs(p1x, p1y);
m_points.push(new org.webminster.caco3.Point(false, p2x, p2y));
} else if (arguments.length == 6) {
m_points[m_points.length - 1].setControlPoint1Abs(p1x, p1y);
m_points.push(new org.webminster.caco3.Point(false, p3x, p3y));
m_points[m_points.length - 1].setControlPoint2Abs(p2x, p2y);
} else {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "'curveTo' needs 4 or 6 arguments!", "org.webminster.caco3.Shape::curveTo", "org/webminster/caco3/Shape.as", 281);
}
} else {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "Call moveTo() first!", "org.webminster.caco3.Shape::curveTo", "org/webminster/caco3/Shape.as", 286);
}
}
function addPoint(sp, px, py, cp1x, cp1y, cp2x, cp2y) {
m_points.push(new org.webminster.caco3.Point(sp, px, py, cp1x, cp1y, cp2x, cp2y));
}
function addPoints(shape, xAdd, yAdd) {
if (xAdd == undefined) {
xAdd = 0;
}
if (yAdd == undefined) {
yAdd = 0;
}
var _local6 = 0;
for ( ; _local6 < shape.getNumberOfPoints() ; _local6++) {
var _local5 = shape.getRenderPoints()[_local6].copy();
if ((xAdd != 0) || (yAdd != 0)) {
_local5.setAnchorPoint(null, _local5.getAnchorPoint().x + xAdd, _local5.getAnchorPoint().y + yAdd);
}
m_points.push(_local5);
}
}
function copyPoint(point) {
m_points.push(point.copy());
}
function copyPoints(shape) {
deletePoints();
addPoints(shape);
m_closed = shape.isClosed();
m_xDrawOffset = shape.getDrawOffset().x;
m_yDrawOffset = shape.getDrawOffset().y;
}
function closePath(bool) {
if (arguments.length == 0) {
m_closed = true;
} else {
m_closed = bool;
}
}
function endFill() {
draw();
}
function clear() {
if (m_drawing_mc != null) {
m_drawing_mc.clear();
}
}
function draw(mc, level, name) {
if (m_points.length > 0) {
m_points[0].setAnchorPoint(true);
}
if (mc == undefined) {
m_drawing_mc = org.webminster.caco3.Drawer.getInstance().draw(this);
} else {
if ((name == undefined) && (level != undefined)) {
name = "object" + level;
}
m_drawing_mc = org.webminster.caco3.Drawer.getInstance().draw(this, mc, level, name);
}
m_drawing_mc._x = m_x;
m_drawing_mc._y = m_y;
return(m_drawing_mc);
}
function deletePoints(s, c) {
if (arguments.length == 0) {
m_points.splice(0);
} else if (arguments.length == 1) {
m_points.splice(m_points.length - c, c);
} else {
m_points.splice(s, c);
}
}
function sharePoint(point) {
m_points.push(point);
}
function sharePoints(shape) {
m_points = shape.getPoints();
m_closed = shape.isClosed();
m_xDrawOffset = shape.getDrawOffset().x;
m_yDrawOffset = shape.getDrawOffset().y;
}
function shareStyle(shape) {
m_style = shape.getStyle();
}
function getHandleLength(radius) {
return(((4 / 3) * (Math.sqrt(2) - 1)) * radius);
}
function setDrawOffset(x, y) {
m_xDrawOffset = x;
m_yDrawOffset = y;
}
function getDrawOffset() {
return({x:m_xDrawOffset, y:m_yDrawOffset});
}
function setPosition(x, y) {
m_x = x;
m_y = y;
}
function getPosition() {
return({x:m_x, y:m_y});
}
function calcRounding(type) {
var _local6 = new Array();
var _local8 = 0;
for ( ; _local8 < getNumberOfPoints() ; _local8++) {
var _local3 = m_points[_local8];
if ((_local8 + 1) == getNumberOfPoints()) {
var _local4 = m_points[0];
} else {
var _local4 = m_points[_local8 + 1];
}
var _local5 = org.webminster.caco3.Drawer.getPointOnSegment(_local3.getAnchorPoint(), _local4.getAnchorPoint(), 0.5);
if (_local8 == 0) {
var _local7 = new org.webminster.caco3.Point(true, _local5.x, _local5.y);
} else {
var _local7 = new org.webminster.caco3.Point(false, _local5.x, _local5.y);
}
_local7.setControlPoint1Abs(_local4.getAnchorPoint().x, _local4.getAnchorPoint().y);
if (type == CUBIC) {
_local7.setControlPoint2Abs(_local3.getAnchorPoint().x, _local3.getAnchorPoint().y);
}
_local6[_local8] = _local7;
}
return(_local6);
}
function copyObject(obj) {
var _local3 = new obj.__proto__.constructor();
for (var i in obj) {
if (typeof(obj[i]) == "object") {
_local3[i] = copyObject(obj[i]);
} else {
_local3[i] = obj[i];
}
}
return(_local3);
}
static var LOW = 1;
static var MEDIUM = 2;
static var HIGH = 3;
static var BEST = 4;
static var NORMAL = 5;
static var SIMPLE = 1;
static var LINEAR = 2;
static var RADIAL = 3;
static var NO = 1;
static var QUADRATIC = 2;
static var CUBIC = 3;
}
Symbol 16 MovieClip [__Packages.org.webminster.caco3.Ellipse] Frame 0
#initclip
if (!org.webminster.caco3.Ellipse) {
if (!org) {
_global.org = new Object();
}
if (!org.webminster) {
_global.org.webminster = new Object();
}
if (!org.webminster.caco3) {
_global.org.webminster.caco3 = new Object();
}
((_global.org.webminster.caco3.Ellipse = function (mc, level, name) {
if ((name == undefined) && (level != undefined)) {
name = "ellipse" + level;
}
super(mc, level, name);
this.m_iWidth = 120;
this.m_iHeight = 80;
this.m_iInnerWidth = 0;
this.m_iInnerHeight = 0;
this.m_iBeginningAngle = 0;
this.m_iEndAngle = 0;
this.closePath();
this.fillArray();
})).prototype.__proto__ = org.webminster.caco3.Shape.prototype;
(_global.org.webminster.caco3.Ellipse /* register */).prototype.__constructor__ = org.webminster.caco3.Shape;
var _local1 = (_global.org.webminster.caco3.Ellipse /* register */).prototype;
_local1.setSize = function (w, h) {
this.m_iWidth = w;
this.m_iHeight = h;
this.fillArray();
};
_local1.setInnerSize = function (w, h) {
if (w < this.m_iWidth) {
this.m_iInnerWidth = w;
}
if (h < this.m_iHeight) {
this.m_iInnerHeight = h;
}
this.fillArray();
};
_local1.setAngles = function (b, e) {
this.m_iBeginningAngle = b % 360;
this.m_iEndAngle = e % 360;
this.fillArray();
};
_local1.fillArray = function () {
this.deletePoints();
if (this.m_iBeginningAngle == this.m_iEndAngle) {
this.calcPoint(true, this.m_iWidth, this.m_iHeight, 0);
this.calcPoint(false, this.m_iWidth, this.m_iHeight, 90);
this.calcPoint(false, this.m_iWidth, this.m_iHeight, 180);
this.calcPoint(false, this.m_iWidth, this.m_iHeight, 270);
if ((this.m_iInnerWidth > 0) && (this.m_iInnerHeight > 0)) {
this.calcPoint(true, this.m_iInnerWidth, this.m_iInnerHeight, 0);
this.calcPoint(false, this.m_iInnerWidth, this.m_iInnerHeight, 90);
this.calcPoint(false, this.m_iInnerWidth, this.m_iInnerHeight, 180);
this.calcPoint(false, this.m_iInnerWidth, this.m_iInnerHeight, 270);
}
} else {
var _local2 = this.m_iBeginningAngle;
var _local3 = 0;
if (this.m_iEndAngle < this.m_iBeginningAngle) {
this.m_iEndAngle = this.m_iEndAngle + 360;
}
while (1) {
var _local5 = this.calcNextAngle(_local2);
if (_local5 > this.m_iEndAngle) {
_local5 = this.m_iEndAngle;
}
var _local4 = _local5 - _local2;
this.calcPoint(false, this.m_iWidth, this.m_iHeight, _local2, _local4, _local3);
_local3 = _local4;
if (_local2 == _local5) {
break;
}
_local2 = _local5;
}
if ((this.m_iInnerWidth > 0) && (this.m_iInnerHeight > 0)) {
_local2 = this.m_iEndAngle;
_local3 = 0;
while (1) {
var _local5 = this.calcPreviousAngle(_local2);
if (_local5 < this.m_iBeginningAngle) {
_local5 = this.m_iBeginningAngle;
}
var _local4 = _local5 - _local2;
this.calcPoint(false, this.m_iInnerWidth, this.m_iInnerHeight, _local2, _local4, _local3);
_local3 = _local4;
if (_local2 == _local5) {
break;
}
_local2 = _local5;
}
} else {
this.calcPoint(false, 0, 0, 0, 0, 0);
}
this.getPoint(0).setAnchorPoint(true);
}
};
_local1.calcPoint = function (sp, width, height, angle, nangle, pangle) {
if (nangle == undefined) {
nangle = 90;
}
if (pangle == undefined) {
pangle = 90;
}
var _local8 = (Math.cos((angle / 180) * Math.PI) * width) / 2;
var _local9 = (Math.sin((angle / 180) * Math.PI) * height) / 2;
var _local10 = (Math.atan((height / width) * Math.tan((angle / 180) * Math.PI)) * 180) / Math.PI;
if ((angle <= 90) || (angle > 270)) {
var _local11 = (Math.atan(((width * width) / (height * height)) * Math.tan((_local10 / 180) * Math.PI)) * 180) / Math.PI;
} else {
var _local11 = ((Math.atan(((width * width) / (height * height)) * Math.tan((_local10 / 180) * Math.PI)) * 180) / Math.PI) + 180;
}
var _local12 = this.getHandleLength(height / 2) * Math.abs(Math.cos((angle / 180) * Math.PI));
var _local13 = this.getHandleLength(width / 2) * Math.abs(Math.sin((angle / 180) * Math.PI));
var _local14 = Math.sqrt((_local13 * _local13) + (_local12 * _local12)) * (nangle / 90);
var _local15 = Math.sqrt((_local13 * _local13) + (_local12 * _local12)) * (pangle / 90);
this.addPoint(sp, _local8 + (this.m_iWidth / 2), _local9 + (this.m_iHeight / 2));
this.getPoint(this.getNumberOfPoints() - 1).setControlPoints(_local11 + 90, _local14, _local11 - 90, _local15);
};
_local1.calcNextAngle = function (a) {
var _local3 = 90 * (Math.floor(a / 90) + 1);
return(_local3);
};
_local1.calcPreviousAngle = function (a) {
var _local3 = 90 * Math.floor(a / 90);
if (a == _local3) {
_local3 = _local3 - 90;
}
return(_local3);
};
ASSetPropFlags(_local1, null, 1);
}
#endinitclip
Symbol 17 MovieClip [__Packages.org.webminster.caco3.Circle] Frame 0
#initclip
if (!org.webminster.caco3.Circle) {
if (!org) {
_global.org = new Object();
}
if (!org.webminster) {
_global.org.webminster = new Object();
}
if (!org.webminster.caco3) {
_global.org.webminster.caco3 = new Object();
}
((_global.org.webminster.caco3.Circle = function (mc, level, name) {
if ((name == undefined) && (level != undefined)) {
name = "circle" + level;
}
super(mc, level, name);
this.setSize(100, 100);
})).prototype.__proto__ = org.webminster.caco3.Ellipse.prototype;
(_global.org.webminster.caco3.Circle /* register */).prototype.__constructor__ = org.webminster.caco3.Ellipse;
var _local1 = (_global.org.webminster.caco3.Circle /* register */).prototype;
_local1.setRadius = function (r) {
this.setSize(r * 2, r * 2);
};
_local1.setInnerRadius = function (r) {
this.setInnerSize(r * 2, r * 2);
};
ASSetPropFlags(_local1, null, 1);
}
#endinitclip
Symbol 18 MovieClip [__Packages.org.webminster.vanadium.model.IPlaylist] Frame 0
class org.webminster.vanadium.model.IPlaylist
{
function IPlaylist () {
}
}
Symbol 19 MovieClip [__Packages.org.webminster.vanadium.model.Playlist] Frame 0
class org.webminster.vanadium.model.Playlist implements org.webminster.vanadium.model.IPlaylist
{
var m_sSource, m_eSourceFileType, m_Loader, m_bPlaylistLoaded, m_bGaveUpToLoadPlaylist, m_sPlaylistError, m_Entries, m_iNum2Pos, m_iCurEntryNum, m_iCurLoadedPos, m_bCurLoadedEntryChanged, m_iLastLoadedBytes, m_sPlaylistName, m_sBasedir, m_fOnPopulated;
function Playlist () {
m_sSource = "";
m_eSourceFileType = org.webminster.utils.Converter.eFiletype_Unknown;
m_Loader = new org.webminster.utils.ObjectLoader(true);
m_bPlaylistLoaded = false;
m_bGaveUpToLoadPlaylist = false;
m_sPlaylistError = "";
m_Entries = new Array();
m_iNum2Pos = new Array();
m_iCurEntryNum = 1;
m_iCurLoadedPos = ENTRY_NUM_UNDEFINED;
m_bCurLoadedEntryChanged = false;
m_iLastLoadedBytes = 0;
m_sPlaylistName = "";
m_sBasedir = "";
m_fOnPopulated = null;
}
function populatePlaylist(sSource, fOnPopulated) {
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.INFO + "populatePlaylist() using source '") + sSource) + "'.", "org.webminster.vanadium.model.Playlist::populatePlaylist", "org/webminster/vanadium/model/Playlist.as", 108);
m_sSource = sSource;
m_fOnPopulated = fOnPopulated;
m_eSourceFileType = org.webminster.utils.Converter.filetype(m_sSource);
if (m_eSourceFileType & org.webminster.utils.Converter.eFiletype_COMB_PLAYLIST) {
loadPlaylist();
} else if ((m_eSourceFileType & org.webminster.utils.Converter.eFiletype_COMB_SOUND) || (m_eSourceFileType & org.webminster.utils.Converter.eFiletype_COMB_MOVIE)) {
addPlaylistEntry(m_sSource, 1);
setPlaylistLoaded(true);
m_fOnPopulated();
} else {
m_sPlaylistError = ("Can't load configured source. '" + m_sSource) + "' is neither video, sound nor playlist.";
setPlaylistLoaded(false);
m_fOnPopulated();
}
}
function loadPlaylist() {
m_bPlaylistLoaded = false;
m_bGaveUpToLoadPlaylist = false;
m_Loader.loadFromUrl(m_sSource, com.dynamicflash.utils.Delegate.create(this, playlistLoadFinished), org.webminster.utils.ObjectLoader.eLoadXML);
}
function playlistLoadFinished() {
if (m_Loader.loadWasSuccessful()) {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.INFO + "Playlist loaded successfully.", "org.webminster.vanadium.model.Playlist::playlistLoadFinished", "org/webminster/vanadium/model/Playlist.as", 147);
readPlaylistXml(m_Loader.getLoadedXML());
} else {
m_sPlaylistError = m_Loader.getLoadError();
setPlaylistLoaded(false);
}
m_fOnPopulated();
}
function readPlaylistXml(xmlPlaylist) {
var _local3 = false;
if (m_eSourceFileType & org.webminster.utils.Converter.eFiletype_COMB_WPL) {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.INFO + "Found playlist format: WebPlayer Playlist", "org.webminster.vanadium.model.Playlist::readPlaylistXml", "org/webminster/vanadium/model/Playlist.as", 168);
_local3 = readWPPlaylistXml(xmlPlaylist);
} else if (m_eSourceFileType & org.webminster.utils.Converter.eFiletype_XSPF) {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.INFO + "Found playlist format: XSPF Playlist", "org.webminster.vanadium.model.Playlist::readPlaylistXml", "org/webminster/vanadium/model/Playlist.as", 174);
_local3 = readXspfPlaylistXml(xmlPlaylist);
} else {
_local3 = false;
m_sPlaylistError = ("Don't known playlist file type of file '" + m_sSource) + "'.";
}
setPlaylistLoaded(_local3);
return(undefined);
}
function readWPPlaylistXml(xmlPlaylist) {
var _local3 = xmlPlaylist.childNodes[0];
if ((_local3 == undefined) || ((_local3 == null) || (_local3.nodeName != org.webminster.vanadium.model.PlayerDefines.DOC_TYPE_PLAYLIST))) {
m_sPlaylistError = ((("Could not find rootNode '" + org.webminster.vanadium.model.PlayerDefines.DOC_TYPE_PLAYLIST) + "' in playlist '") + m_sSource) + "'.";
return(false);
}
setPlaylistName(_local3.attributes.name);
setBaseDir(_local3.attributes.basedir);
var _local4 = 0;
for ( ; _local4 < _local3.childNodes.length ; _local4++) {
var _local5 = _local3.childNodes[_local4];
if ((_local5.attributes.src != undefined) && (_local5.attributes.src != "")) {
addPlaylistEntry(_local5.attributes.src, _local4 + 1);
} else {
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.WARN + "") + (_local4 + 1)) + ". entry of playlist has undefined 'src' attribute. Entry skipped.", "org.webminster.vanadium.model.Playlist::readWPPlaylistXml", "org/webminster/vanadium/model/Playlist.as", 212);
}
}
return(true);
}
function readXspfPlaylistXml(xmlPlaylist) {
var _local3 = xmlPlaylist.childNodes[0];
if ((_local3 == undefined) || ((_local3 == null) || (_local3.nodeName != org.webminster.vanadium.model.PlayerDefines.DOC_TYPE_PLAYLIST))) {
m_sPlaylistError = ((("Could not find rootNode '" + org.webminster.vanadium.model.PlayerDefines.DOC_TYPE_PLAYLIST) + "' in playlist '") + m_sSource) + "'.";
return(false);
}
var _local4 = _local3.childNodes.length;
var _local5 = 0;
for ( ; _local5 < _local4 ; _local5++) {
var _local6 = _local3.childNodes[_local5];
switch (_local6.nodeName) {
case org.webminster.vanadium.model.PlayerDefines.XSPF_TITLE :
setPlaylistName(_local6.firstChild.nodeValue);
break;
case org.webminster.vanadium.model.PlayerDefines.XSPF_TRACKLIST :
var _local7 = _local6.childNodes.length;
var _local8 = 0;
// unexpected jump
for(;;){
_local8++;
if (_local8 >= _local7) {
break;
}
var _local9 = _local6.childNodes[_local8];
if (!readXspfTrackXml(_local9, _local8 + 1)) {
return(false);
}
};
}
}
return(true);
}
function readXspfTrackXml(track, iPlaylistPos) {
var _local4 = "";
var _local5 = "";
var _local6 = "";
var _local7 = "";
var _local8 = "";
var _local9 = "";
var _local10 = "";
var _local11 = "";
var _local12 = "";
var _local13 = track.childNodes.length;
var _local14 = 0;
for ( ; _local14 < _local13 ; _local14++) {
var _local15 = track.childNodes[_local14];
switch (_local15.nodeName) {
case org.webminster.vanadium.model.PlayerDefines.XSPF_TRACK_LOCATION :
_local4 = _local15.firstChild.nodeValue;
break;
case org.webminster.vanadium.model.PlayerDefines.XSPF_TRACK_TITLE :
_local5 = _local15.firstChild.nodeValue;
break;
case org.webminster.vanadium.model.PlayerDefines.XSPF_TRACK_CREATOR :
_local6 = _local15.firstChild.nodeValue;
break;
case org.webminster.vanadium.model.PlayerDefines.XSPF_TRACK_COMMENT :
_local7 = _local15.firstChild.nodeValue;
break;
case org.webminster.vanadium.model.PlayerDefines.XSPF_TRACK_INFO_URL :
_local8 = _local15.firstChild.nodeValue;
break;
case org.webminster.vanadium.model.PlayerDefines.XSPF_TRACK_IMAGE_URL :
_local9 = _local15.firstChild.nodeValue;
break;
case org.webminster.vanadium.model.PlayerDefines.XSPF_TRACK_ALBUM :
_local10 = _local15.firstChild.nodeValue;
break;
case org.webminster.vanadium.model.PlayerDefines.XSPF_TRACK_TRACK_NUM :
_local11 = _local15.firstChild.nodeValue;
break;
case org.webminster.vanadium.model.PlayerDefines.XSPF_TRACK_DURATION :
_local12 = _local15.firstChild.nodeValue;
}
}
if (_local4.length > 0) {
var _local16 = addPlaylistEntry(_local4, iPlaylistPos);
_local16.setTitle(_local5);
_local16.setArtist(_local6);
_local16.setComment(_local7);
_local16.setInfoUrl(_local8);
_local16.setPictureUrl(_local9);
_local16.setAlbumName(_local10);
_local16.setCDTitleNumber(Number(_local11));
_local16.setStoredDuration(Number(_local12));
return(true);
}
m_sPlaylistError = ((("" + (m_Entries.length + 1)) + ". Track read without specified ") + org.webminster.vanadium.model.PlayerDefines.XSPF_TRACK_LOCATION) + " tag.";
return(false);
}
function addPlaylistEntry(sUrl, iPlaylistPos) {
if (m_sBasedir.length > 0) {
sUrl = m_sBasedir + sUrl;
}
org.webminster.utils.Tracer.trace(((((org.webminster.utils.Tracer.INFO + "") + iPlaylistPos) + ". Added playlist entry '") + sUrl) + "'.", "org.webminster.vanadium.model.Playlist::addPlaylistEntry", "org/webminster/vanadium/model/Playlist.as", 333);
var _local4 = new org.webminster.vanadium.model.PlaylistEntry(sUrl, this, iPlaylistPos);
m_Entries.push(_local4);
m_iNum2Pos.push(m_Entries.length - 1);
return(_local4);
}
function setPlaylistName(sName) {
m_sPlaylistName = sName;
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.INFO + "Read playlist name '") + m_sPlaylistName) + "'.", "org.webminster.vanadium.model.Playlist::setPlaylistName", "org/webminster/vanadium/model/Playlist.as", 346);
}
function setBaseDir(sDir) {
m_sBasedir = org.webminster.utils.Converter.completeDir(sDir);
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.INFO + "Read base dir '") + m_sBasedir) + "'.", "org.webminster.vanadium.model.Playlist::setBaseDir", "org/webminster/vanadium/model/Playlist.as", 353);
}
function setPlaylistLoaded(bWasLoaded) {
m_bPlaylistLoaded = bWasLoaded;
m_bGaveUpToLoadPlaylist = !m_bPlaylistLoaded;
if (m_bGaveUpToLoadPlaylist && (m_sPlaylistError == "")) {
m_sPlaylistError = "Not specified error occured while loading playlist!";
}
if (m_bPlaylistLoaded && (org.webminster.vanadium.model.CoreModel.instance().isRandom())) {
fillRandomIndices();
}
}
function fillRandomIndices() {
var _local2 = (org.webminster.vanadium.model.CoreModel.instance().isLooping() ? (org.webminster.vanadium.model.PlayerDefines.RANDOM_LOOP_REPEAT) : 1);
m_iNum2Pos.length = 0;
var _local3 = 0;
for ( ; _local3 < (m_Entries.length * _local2) ; _local3++) {
m_iNum2Pos.push(-1);
}
var _local4 = 0;
for ( ; _local4 < _local2 ; _local4++) {
var _local5 = _local4 * m_Entries.length;
var _local6 = ((_local4 + 1) * m_Entries.length) - 1;
var _local7 = 0;
for ( ; _local7 < m_Entries.length ; _local7++) {
var _local8 = false;
var _local9 = org.webminster.utils.Misc.randRange(_local5, _local6);
while (m_iNum2Pos[_local9] != -1) {
_local9++;
if (_local9 > _local6) {
_local9 = _local5;
}
}
m_iNum2Pos[_local9] = _local7;
}
}
var _local10 = "";
var _local11 = 0;
for ( ; _local11 < m_iNum2Pos.length ; _local11++) {
_local10 = _local10 + (m_iNum2Pos[_local11] + 1);
_local10 = _local10 + ", ";
}
org.webminster.utils.Tracer.trace((((org.webminster.utils.Tracer.DEBUG + "Permutation of ") + m_iNum2Pos.length) + " positions: ") + _local10, "org.webminster.vanadium.model.Playlist::fillRandomIndices", "org/webminster/vanadium/model/Playlist.as", 416);
}
function playListIsLoaded() {
return(m_bPlaylistLoaded);
}
function gaveUpLoadingPlaylist() {
return(m_bGaveUpToLoadPlaylist);
}
function getPlaylistError() {
return(m_sPlaylistError);
}
function num2Pos(iNum) {
return(m_iNum2Pos[iNum - 1] + 1);
}
function pos2Num(iPos) {
if (iPos > m_Entries.length) {
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.WARN + "No position within the play order defined for the ") + iPos) + "-th playlist entry.", "org.webminster.vanadium.model.Playlist::pos2Num", "org/webminster/vanadium/model/Playlist.as", 457);
return(ENTRY_NUM_UNDEFINED);
}
var _local3 = org.webminster.utils.Misc.randRange(0, m_iNum2Pos.length - 1);
while (m_iNum2Pos[_local3] != (iPos - 1)) {
_local3 = (_local3 + 1) % m_iNum2Pos.length;
}
return(_local3);
}
function entryByNum(iNum) {
if ((iNum < 1) || (iNum > m_iNum2Pos.length)) {
org.webminster.utils.Tracer.trace(((((org.webminster.utils.Tracer.WARN + "entryByNum(") + iNum) + ") called using iNum not between 1 and ") + m_iNum2Pos.length) + ".", "org.webminster.vanadium.model.Playlist::entryByNum", "org/webminster/vanadium/model/Playlist.as", 481);
return(null);
}
return(entryByPos(num2Pos(iNum)));
}
function entryByPos(iPos) {
if ((iPos < 1) || (iPos > getEntryCount())) {
org.webminster.utils.Tracer.trace(((((org.webminster.utils.Tracer.WARN + "entryByPos(") + iPos) + ") called using iPos not between 1 and ") + getEntryCount()) + ".", "org.webminster.vanadium.model.Playlist::entryByPos", "org/webminster/vanadium/model/Playlist.as", 497);
return(null);
}
return(m_Entries[iPos - 1]);
}
function currentEntry(iOffset) {
if (getEntryCount() == 0) {
return(null);
}
if (iOffset == undefined) {
iOffset = 0;
}
var _local3 = m_iCurEntryNum + iOffset;
if (org.webminster.vanadium.model.CoreModel.instance().isLooping()) {
while (_local3 > m_iNum2Pos.length) {
_local3 = _local3 - m_iNum2Pos.length;
}
while (_local3 < 1) {
_local3 = _local3 + m_iNum2Pos.length;
}
}
if (_local3 > m_iNum2Pos.length) {
org.webminster.utils.Tracer.trace(((((((org.webminster.utils.Tracer.WARN + "getCurrentEntry(") + iOffset) + ") called and thus pointing to ") + _local3) + "th song, which is after last song (") + m_iNum2Pos.length) + ").", "org.webminster.vanadium.model.Playlist::currentEntry", "org/webminster/vanadium/model/Playlist.as", 528);
return(null);
}
return(entryByNum(_local3));
}
function setCurrentEntryByNum(iNum) {
if ((iNum > 0) && (iNum <= m_iNum2Pos.length)) {
m_iCurEntryNum = iNum;
org.webminster.vanadium.controller.CoreController.instance().notifyAll(org.webminster.vanadium.model.PlayerDefines.CURRENT_ENTRY_CHANGED);
}
}
function setCurrentEntryByPos(iPos) {
if ((iPos > 0) && (iPos <= getEntryCount())) {
m_iCurEntryNum = pos2Num(iPos);
org.webminster.vanadium.controller.CoreController.instance().notifyAll(org.webminster.vanadium.model.PlayerDefines.CURRENT_ENTRY_CHANGED);
}
}
function hasNextEntry() {
if (org.webminster.vanadium.model.CoreModel.instance().isLooping()) {
return(true);
}
return(m_iCurEntryNum < m_iNum2Pos.length);
}
function hasPrevEntry() {
if (org.webminster.vanadium.model.CoreModel.instance().isLooping()) {
return(true);
}
return(m_iCurEntryNum > 1);
}
function incCurrentEntry() {
m_iCurEntryNum++;
if (m_iCurEntryNum > m_iNum2Pos.length) {
if (org.webminster.vanadium.model.CoreModel.instance().isLooping()) {
m_iCurEntryNum = 1;
} else {
m_iCurEntryNum--;
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.WARN + "incCurrentEntry() called even if m_iCurEntryNum is already at it's maximum (") + m_iCurEntryNum) + ").'", "org.webminster.vanadium.model.Playlist::incCurrentEntry", "org/webminster/vanadium/model/Playlist.as", 590);
return(undefined);
}
}
org.webminster.vanadium.controller.CoreController.instance().notifyAll(org.webminster.vanadium.model.PlayerDefines.CURRENT_ENTRY_CHANGED);
org.webminster.utils.Tracer.trace(((((((org.webminster.utils.Tracer.INFO + "CurrentEntry num increased to ") + m_iCurEntryNum) + " of ") + m_iNum2Pos.length) + ". Current entry: '") + getCurrentEntry(0).getFileUrl()) + "'", "org.webminster.vanadium.model.Playlist::incCurrentEntry", "org/webminster/vanadium/model/Playlist.as", 596);
}
function decCurrentEntry() {
m_iCurEntryNum--;
if (m_iCurEntryNum < 1) {
if (org.webminster.vanadium.model.CoreModel.instance().isLooping()) {
m_iCurEntryNum = m_iNum2Pos.length;
} else {
m_iCurEntryNum++;
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.WARN + "decCurrentEntry() called even if m_iCurEntryNum is already at it's minimum (") + m_iCurEntryNum) + ").'", "org.webminster.vanadium.model.Playlist::decCurrentEntry", "org/webminster/vanadium/model/Playlist.as", 612);
return(undefined);
}
}
org.webminster.vanadium.controller.CoreController.instance().notifyAll(org.webminster.vanadium.model.PlayerDefines.CURRENT_ENTRY_CHANGED);
org.webminster.utils.Tracer.trace(((((((org.webminster.utils.Tracer.INFO + "CurrentEntry num decreased to ") + m_iCurEntryNum) + " of ") + m_iNum2Pos.length) + ". Current entry: '") + getCurrentEntry(0).getFileUrl()) + "'", "org.webminster.vanadium.model.Playlist::decCurrentEntry", "org/webminster/vanadium/model/Playlist.as", 618);
}
function setCurLoadedEntryPos(iCurLoadedPos) {
m_bCurLoadedEntryChanged = true;
m_iCurLoadedPos = iCurLoadedPos;
m_iLastLoadedBytes = curLoadedEntry().getLoadedSize();
}
function curLoadedEntry() {
if (m_iCurLoadedPos == ENTRY_NUM_UNDEFINED) {
return(null);
}
return(entryByPos(m_iCurLoadedPos));
}
function traceLoadStatus() {
if (m_bCurLoadedEntryChanged && (m_iCurLoadedPos == ENTRY_NUM_UNDEFINED)) {
m_bCurLoadedEntryChanged = false;
return(true);
}
if (m_iCurLoadedPos == ENTRY_NUM_UNDEFINED) {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "traceLoadStatus() called, but currently no entry is loaded.", "org.webminster.vanadium.model.Playlist::traceLoadStatus", "org/webminster/vanadium/model/Playlist.as", 656);
return(false);
}
var _local2 = false;
var _local3 = entryByPos(m_iCurLoadedPos);
if ((_local3 == undefined) || (_local3 == null)) {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "traceLoadStatus() called, currently loaded entry could not be determined.", "org.webminster.vanadium.model.Playlist::traceLoadStatus", "org/webminster/vanadium/model/Playlist.as", 664);
} else {
if (_local3.getLoadedSize() > m_iLastLoadedBytes) {
m_iLastLoadedBytes = _local3.getLoadedSize();
_local2 = true;
}
_local3.traceLoadStatus();
}
return(_local2);
}
function enoughLoadedToPlayCurrent() {
var _local2 = currentEntry(0);
_local2.traceLoadStatus();
var _local3 = _local2.loadStatus();
if (_local3.iPerc == 100) {
return(true);
}
if (_local3.iPerc == 0) {
return(false);
}
if ((_local2.isAudio() && (_local3.iRestDT == 0)) || ((_local3.iRestDT + org.webminster.vanadium.model.PlayerDefines.PLAYTIME_DOWNLOAD_BUFFER) < _local3.iExpPT)) {
return(true);
}
if (_local2.isVideo() && (_local2.hasValidSize())) {
var _local4 = _local2.getMovieClip();
org.webminster.utils.Tracer.trace((((((("Width: " + _local4._width) + " - Height: ") + _local4._height) + " - FramesTotal: ") + _local4._totalframes) + " - FramesLoaded: ") + _local4._framesloaded, "org.webminster.vanadium.model.Playlist::enoughLoadedToPlayCurrent", "org/webminster/vanadium/model/Playlist.as", 706);
return(true);
}
return(false);
}
function curOrLaterMightBeOK() {
var _local2 = 0;
for ( ; _local2 < getEntryCount() ; _local2++) {
var _local3 = currentEntry(_local2);
if (_local3 == null) {
return(false);
}
if (!_local3.loadWasErrornous()) {
return(true);
}
}
return(false);
}
function getName() {
return(m_sPlaylistName);
}
function getEntryCount() {
return(m_Entries.length);
}
function getCurrentEntryPos(iOffset) {
return(m_iNum2Pos[m_iCurEntryNum - 1] + 1);
}
function getCurrentEntry(iOffset) {
return(currentEntry(iOffset));
}
static var ENTRY_NUM_UNDEFINED = -1;
}
Symbol 20 MovieClip [__Packages.org.webminster.utils.Tracer] Frame 0
class org.webminster.utils.Tracer
{
function Tracer () {
}
static function instance() {
if (m_TheOneTracer == null) {
m_TheOneTracer = new org.webminster.utils.Tracer();
}
return(m_TheOneTracer);
}
function enableTracer() {
m_bTracingEnabled = true;
}
static function trace(sText, sMethodName, sFileName, iLineOfFile) {
var _local6 = "";
var _local7 = "debug";
if (sText.substr(0, 2) == "##") {
var _local8 = sText.indexOf("##", 2);
_local7 = sText.substring(2, _local8);
_local6 = sText.substr(_local8 + 2);
} else {
_local6 = sText;
}
instance().sendTraceToJS(_local6, sMethodName, sFileName, iLineOfFile, _local7);
}
function sendTraceToJS(sText, sMethodName, sFileName, iLineOfFile, sTraceClass) {
if (!m_bTracingEnabled) {
return(undefined);
}
var _local7 = org.webminster.utils.StringParser.StringReplace(sText, "'", "\\'");
getURL (((((((((("javascript:" + sTraceClass) + "('") + _local7) + "', '") + sMethodName) + "', '") + sFileName) + "', '") + iLineOfFile) + "')", "_self");
}
static function traceInit() {
}
static var m_TheOneTracer = null;
static var m_bTracingEnabled = false;
static var DEBUG = "##debug##";
static var INFO = "##info##";
static var WARN = "##warning##";
static var ERROR = "##error##";
static var STEP = "##step##";
}
Symbol 21 MovieClip [__Packages.org.webminster.utils.IObserver] Frame 0
class org.webminster.utils.IObserver
{
function IObserver () {
}
}
Symbol 22 MovieClip [__Packages.org.webminster.vanadium.gui.IGui] Frame 0
class org.webminster.vanadium.gui.IGui implements org.webminster.utils.IObserver
{
function IGui () {
}
}
Symbol 23 MovieClip [__Packages.org.webminster.vanadium.gui.CoreGui] Frame 0
class org.webminster.vanadium.gui.CoreGui implements org.webminster.vanadium.gui.IGui
{
var m_mc, m_display, m_background, m_previousButton, m_playButton, m_pauseButton, m_nextButton, m_plusButton, m_minusButton, m_infoButton, m_fader, m_iEventID, m_model, m_playlist, m_ctrl, m_icons, m_entry, m_lBorder, m_rBorder, m_ol;
function CoreGui () {
m_mc = _root.createEmptyMovieClip("gui", org.webminster.utils.Misc.getNextHighestLevel());
m_display = new org.webminster.vanadium.gui.VDisplay(m_mc, 300);
m_background = new org.webminster.vanadium.gui.VBackground(m_mc, 45);
m_previousButton = new org.webminster.vanadium.gui.VButton(m_mc, 50, "prevbut");
m_playButton = new org.webminster.vanadium.gui.VButton(m_mc, 51, "playbut");
m_pauseButton = new org.webminster.vanadium.gui.VButton(m_mc, 52, "pausebut");
m_nextButton = new org.webminster.vanadium.gui.VButton(m_mc, 53, "nextbut");
m_plusButton = new org.webminster.vanadium.gui.VButton(m_mc, 54, "plusbut");
m_minusButton = new org.webminster.vanadium.gui.VButton(m_mc, 55, "minusbut");
m_infoButton = new org.webminster.vanadium.gui.VButton(m_mc, 56, "infobut");
m_fader = new org.webminster.vanadium.gui.VFader(m_mc, 57, "fader");
m_iEventID = 0;
m_fader.registerEvent();
}
function setModel(model) {
m_model = model;
m_playlist = m_model.getPlaylist();
}
function setCtrl(ctrl) {
m_ctrl = ctrl;
m_ctrl.attachObserver(this);
m_playButton.registerEvent(org.webminster.vanadium.model.PlayerDefines.GUI_EVENT_RELEASED, com.dynamicflash.utils.Delegate.create(m_ctrl, m_ctrl.play), m_iEventID++);
m_pauseButton.registerEvent(org.webminster.vanadium.model.PlayerDefines.GUI_EVENT_RELEASED, com.dynamicflash.utils.Delegate.create(m_ctrl, m_ctrl.pause), m_iEventID++);
m_previousButton.registerEvent(org.webminster.vanadium.model.PlayerDefines.GUI_EVENT_RELEASED, com.dynamicflash.utils.Delegate.create(m_ctrl, m_ctrl.prev), m_iEventID++);
m_nextButton.registerEvent(org.webminster.vanadium.model.PlayerDefines.GUI_EVENT_RELEASED, com.dynamicflash.utils.Delegate.create(m_ctrl, m_ctrl.next), m_iEventID++);
m_fader.registerEvent(org.webminster.vanadium.model.PlayerDefines.GUI_EVENT_RELEASED, com.dynamicflash.utils.Delegate.create(this, setPosition), m_iEventID++);
m_minusButton.registerEvent(org.webminster.vanadium.model.PlayerDefines.GUI_EVENT_RELEASED, com.dynamicflash.utils.Delegate.create(this, volDown), m_iEventID++);
m_plusButton.registerEvent(org.webminster.vanadium.model.PlayerDefines.GUI_EVENT_RELEASED, com.dynamicflash.utils.Delegate.create(this, volUp), m_iEventID++);
m_infoButton.registerEvent(org.webminster.vanadium.model.PlayerDefines.GUI_EVENT_RELEASED, com.dynamicflash.utils.Delegate.create(this, infoWindow), m_iEventID++);
}
function setPosition() {
m_ctrl.setPosition((m_model.getPlaylist().getCurrentEntry(0).getLength() * m_fader.getFaderPosition()) / 100);
}
function infoWindow() {
if (Key.isDown(Key.SPACE)) {
m_ctrl.displayFileInfo();
} else if (Key.isDown(Key.CONTROL)) {
m_ctrl.displayPlayerInfo();
} else {
m_ctrl.openInfoWindow();
}
}
function volUp() {
var _local2 = m_model.getVolume();
if (_local2 < 100) {
m_ctrl.setVolume(_local2 + 10);
}
}
function volDown() {
var _local2 = m_model.getVolume();
if (_local2 > 0) {
m_ctrl.setVolume(_local2 - 10);
}
}
function drawGui() {
m_icons = new org.webminster.vanadium.gui.VIconDraw();
m_entry = m_playlist.getCurrentEntry(0);
_root.vanadium_logo._visible = false;
if (m_model.isAutostart()) {
m_mc.playbut._visible = 0;
m_mc.pausebut._visible = 1;
} else {
m_mc.playbut._visible = 1;
m_mc.pausebut._visible = 0;
}
if ((Stage.height > 61) && (Stage.width > 159)) {
var _local3 = Stage.width;
if (_local3 > 384) {
_local3 = 384;
var _local2 = 12;
} else if (_local3 >= 288) {
var _local2 = 11;
} else if (_local3 >= 224) {
var _local2 = 10;
} else if (_local3 >= 192) {
var _local2 = 9;
} else if (_local3 >= 160) {
var _local2 = 8;
} else {
var _local2 = 6;
}
m_lBorder = (org.webminster.vanadium.model.Defines.PLAYER_WIDTH - _local3) / 2;
m_rBorder = ((_local3 - org.webminster.vanadium.model.Defines.PLAYER_WIDTH) / 2) + org.webminster.vanadium.model.Defines.PLAYER_WIDTH;
m_background.setSize(_local3, org.webminster.vanadium.model.Defines.PLAYER_HEIGHT);
m_background.setPosition(m_lBorder, 0);
m_background.draw();
m_display.draw(_local3 - (2 * _local2), 34, m_lBorder + _local2, 6);
setWidgetBar(_local3 - (2 * _local2), 16, m_lBorder + _local2, 43);
}
}
function setWidgetBar(w, h, x, y) {
m_fader.setSize(w - 126, h);
m_fader.setPosition(x + 63, y);
m_fader.draw();
m_fader.setFaderPosition(0);
m_previousButton.setPosition(x, y);
m_previousButton.setIcon(m_icons.getPreviousIcon());
m_previousButton.setSize(20, 16);
m_previousButton.setRadii(3, 0, 0, 3);
m_previousButton.draw();
m_playButton.setPosition(x + 19, y);
m_playButton.setIcon(m_icons.getPlayIcon());
m_playButton.setSize(20, 16);
m_playButton.draw();
m_pauseButton.setPosition(x + 19, y);
m_pauseButton.setIcon(m_icons.getPauseIcon());
m_pauseButton.setSize(20, 16);
m_pauseButton.draw();
m_nextButton.setPosition(x + 38, y);
m_nextButton.setIcon(m_icons.getNextIcon());
m_nextButton.setSize(20, 16);
m_nextButton.setRadii(0, 3, 3, 0);
m_nextButton.draw();
m_minusButton.setPosition((x + w) - 58, y);
m_minusButton.setIcon(m_icons.getMinusIcon());
m_minusButton.setSize(20, 16);
m_minusButton.setRadii(3, 0, 0, 3);
m_minusButton.draw();
m_plusButton.setPosition((x + w) - 39, y);
m_plusButton.setIcon(m_icons.getPlusIcon());
m_plusButton.setSize(20, 16);
m_plusButton.draw();
m_infoButton.setPosition((x + w) - 20, y);
m_infoButton.setIcon(m_icons.getInfoIcon());
m_infoButton.setSize(20, 16);
m_infoButton.setRadii(0, 3, 3, 0);
m_infoButton.draw();
}
function notify(iEventType) {
var _local3 = m_model.getPlaylist().getCurrentEntry(0);
var _local4 = m_model.getPlaylist().getCurrentEntry(-1);
switch (iEventType) {
case org.webminster.vanadium.model.PlayerDefines.DISPLAY_MOVIE :
if (_local3.getEntryType() != 2) {
break;
}
var _local5 = _local3.getMovieClip();
if (_local5 == null) {
} else {
_local5._x = (org.webminster.vanadium.model.Defines.PLAYER_WIDTH - _local3.getWidth()) / 2;
_local5._y = -_local3.getHeight();
_local5._visible = true;
break;
var _local6 = _local3.getLoadedLength() / _local3.getLength();
if (_global.isNaN(_local6)) {
_local6 = 0;
}
m_fader.setFaderUsage(_local6 * 100);
break;
if (m_model.isPlaying()) {
m_mc.playbut._visible = 0;
m_mc.pausebut._visible = 1;
} else {
m_mc.playbut._visible = 1;
m_mc.pausebut._visible = 0;
}
break;
break;
m_display.setText((m_model.getPlaylist().getCurrentEntry(0).getArtist() + " - ") + m_model.getPlaylist().getCurrentEntry(0).getTitle());
break;
if (_local3.getLength() == 0) {
m_fader.setFaderPosition(0);
} else {
var _local7 = _local3.getPosition() / _local3.getLength();
m_fader.setFaderPosition(_local7 * 100);
}
m_display.setTime(_local3.getPosition());
break;
showFileInfo();
break;
m_display.setText(m_model.getPlayerInfo(), 16);
break;
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.WARN + "Recieved unhandled event (iEventType = ") + iEventType) + ")!", "org.webminster.vanadium.gui.CoreGui::notify", "org/webminster/vanadium/gui/CoreGui.as", 365);
}
case org.webminster.vanadium.model.PlayerDefines.LOAD_STATUS_CHANGED :
var _local6 = _local3.getLoadedLength() / _local3.getLength();
if (_global.isNaN(_local6)) {
_local6 = 0;
}
m_fader.setFaderUsage(_local6 * 100);
break;
case org.webminster.vanadium.model.PlayerDefines.GLOBAL_STATE_CHANGED :
if (m_model.isPlaying()) {
m_mc.playbut._visible = 0;
m_mc.pausebut._visible = 1;
} else {
m_mc.playbut._visible = 1;
m_mc.pausebut._visible = 0;
}
break;
case org.webminster.vanadium.model.PlayerDefines.LOADER_STATE_CHANGED :
break;
case org.webminster.vanadium.model.PlayerDefines.CURRENT_ENTRY_CHANGED :
case org.webminster.vanadium.model.PlayerDefines.FILE_INFO_CHANGED :
m_display.setText((m_model.getPlaylist().getCurrentEntry(0).getArtist() + " - ") + m_model.getPlaylist().getCurrentEntry(0).getTitle());
break;
case org.webminster.vanadium.model.PlayerDefines.POSITION_CHANGED :
if (_local3.getLength() == 0) {
m_fader.setFaderPosition(0);
} else {
var _local7 = _local3.getPosition() / _local3.getLength();
m_fader.setFaderPosition(_local7 * 100);
}
m_display.setTime(_local3.getPosition());
break;
case org.webminster.vanadium.model.PlayerDefines.DISPLAY_FILE_INFO :
showFileInfo();
break;
case org.webminster.vanadium.model.PlayerDefines.DISPLAY_PLAYER_INFO :
m_display.setText(m_model.getPlayerInfo(), 16);
break;
default :
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.WARN + "Recieved unhandled event (iEventType = ") + iEventType) + ")!", "org.webminster.vanadium.gui.CoreGui::notify", "org/webminster/vanadium/gui/CoreGui.as", 365);
}
}
function showFileInfo() {
var _local2 = "[ ";
_local2 = _local2 + m_model.getPlaylist().getCurrentEntryPos();
_local2 = _local2 + "/";
_local2 = _local2 + m_model.getPlaylist().getEntryCount();
_local2 = _local2 + " | ";
_local2 = _local2 + m_model.getPlaylist().getCurrentEntry().getQuality();
_local2 = _local2 + " kbit/s | ";
_local2 = _local2 + org.webminster.utils.Converter.milliSec2Time(m_model.getPlaylist().getCurrentEntry(0).getLength());
_local2 = _local2 + " | ";
_local2 = _local2 + (Math.round(m_model.getPlaylist().getCurrentEntry().getSize() / 104857.6) / 10);
_local2 = _local2 + " MB | ";
_local2 = _local2 + org.webminster.utils.Converter.path2FileName(m_model.getPlaylist().getCurrentEntry(0).getFileUrl());
_local2 = _local2 + " ]";
m_display.setText(_local2, 8);
}
function hidePreloaderImage() {
_root.vanadium_logo.removeMovieClip();
}
function displayPreview(fPreviewClicked) {
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.INFO + "displayPreview(): display '") + m_model.getPreviewUrl()) + "'!", "org.webminster.vanadium.gui.CoreGui::displayPreview", "org/webminster/vanadium/gui/CoreGui.as", 400);
_root.createEmptyMovieClip("preview_image", org.webminster.utils.Misc.getNextHighestLevel());
_root.preview_image._visible = false;
m_ol = new org.webminster.utils.ObjectLoader(true);
m_ol.loadFromUrl(m_model.getPreviewUrl(), com.dynamicflash.utils.Delegate.create(this, previewLoaded, fPreviewClicked), org.webminster.utils.ObjectLoader.eLoadMovie, _root.preview_image, org.webminster.utils.Misc.getNextHighestLevel());
}
function previewLoaded(fPreviewClicked) {
if (!m_ol.loadWasSuccessful()) {
org.webminster.utils.Tracer.trace((org.webminster.utils.Tracer.WARN + "Could not load preview image! Proceeding without preview: ") + m_ol.getLoadError(), "org.webminster.vanadium.gui.CoreGui::previewLoaded", "org/webminster/vanadium/gui/CoreGui.as", 415);
fPreviewClicked();
} else {
var _local3 = _root.preview_image._width;
var _local4 = _root.preview_image._height;
_root.preview_image._x = (org.webminster.vanadium.model.Defines.PLAYER_WIDTH - _local3) / 2;
_root.preview_image._y = (org.webminster.vanadium.model.Defines.PLAYER_HEIGHT - _local4) / 2;
_root.preview_image._visible = true;
_root.preview_image.onRelease = com.dynamicflash.utils.Delegate.create(this, previewClicked, fPreviewClicked);
hidePreloaderImage();
}
}
function previewClicked(fPreviewClicked) {
_root.preview_image.removeMovieClip();
fPreviewClicked();
}
}
Symbol 24 MovieClip [__Packages.org.webminster.caco3.Rectangle] Frame 0
#initclip
if (!org.webminster.caco3.Rectangle) {
if (!org) {
_global.org = new Object();
}
if (!org.webminster) {
_global.org.webminster = new Object();
}
if (!org.webminster.caco3) {
_global.org.webminster.caco3 = new Object();
}
((_global.org.webminster.caco3.Rectangle = function (mc, level, name) {
if ((name == undefined) && (level != undefined)) {
name = "rectangle" + level;
}
super(mc, level, name);
this.m_iWidth = 100;
this.m_iHeight = 100;
this.closePath();
this.setRadius(0);
})).prototype.__proto__ = org.webminster.caco3.Shape.prototype;
(_global.org.webminster.caco3.Rectangle /* register */).prototype.__constructor__ = org.webminster.caco3.Shape;
var _local1 = (_global.org.webminster.caco3.Rectangle /* register */).prototype;
_local1.setRadius = function (r) {
this.setRadii(r, r, r, r);
};
_local1.setRadii = function (tl, tr, br, bl) {
if (tl != null) {
this.m_iRadius_tl = tl;
}
if (tr != null) {
this.m_iRadius_tr = tr;
}
if (br != null) {
this.m_iRadius_br = br;
}
if (bl != null) {
this.m_iRadius_bl = bl;
}
this.fillArray();
};
_local1.setSize = function (width, height) {
this.m_iWidth = width;
this.m_iHeight = height;
this.fillArray();
};
_local1.fillArray = function () {
this.deletePoints();
if (this.m_iRadius_tl <= 0) {
this.calcPoint(true, 0, 0);
} else {
this.calcPoint(true, 0, this.m_iRadius_tl, 270, this.getHandleLength(this.m_iRadius_tl), 0, 0);
this.calcPoint(false, this.m_iRadius_tl, 0, 0, 0, 180, this.getHandleLength(this.m_iRadius_tl));
}
if (this.m_iRadius_tr <= 0) {
this.calcPoint(false, this.m_iWidth, 0);
} else {
this.calcPoint(false, this.m_iWidth - this.m_iRadius_tr, 0, 0, this.getHandleLength(this.m_iRadius_tr), 0, 0);
this.calcPoint(false, this.m_iWidth, this.m_iRadius_tr, 0, 0, 270, this.getHandleLength(this.m_iRadius_tr));
}
if (this.m_iRadius_br <= 0) {
this.calcPoint(false, this.m_iWidth, this.m_iHeight);
} else {
this.calcPoint(false, this.m_iWidth, this.m_iHeight - this.m_iRadius_br, 90, this.getHandleLength(this.m_iRadius_br), 0, 0);
this.calcPoint(false, this.m_iWidth - this.m_iRadius_br, this.m_iHeight, 0, 0, 0, this.getHandleLength(this.m_iRadius_br));
}
if (this.m_iRadius_bl <= 0) {
this.calcPoint(false, 0, this.m_iHeight);
} else {
this.calcPoint(false, this.m_iRadius_bl, this.m_iHeight, 180, this.getHandleLength(this.m_iRadius_bl), 0, 0);
this.calcPoint(false, 0, this.m_iHeight - this.m_iRadius_bl, 0, 0, 90, this.getHandleLength(this.m_iRadius_bl));
}
};
_local1.calcPoint = function (sp, x, y, a1, l1, a2, l2) {
this.addPoint(sp, x, y);
this.getPoint(this.getNumberOfPoints() - 1).setControlPoints(a1, l1, a2, l2);
};
ASSetPropFlags(_local1, null, 1);
}
#endinitclip
Symbol 25 MovieClip [__Packages.org.webminster.utils.Observable] Frame 0
class org.webminster.utils.Observable
{
var m_Observers, m_iLastKey;
function Observable () {
m_Observers = new com.dynamicflash.utils.HashMap();
m_iLastKey = 0;
}
function attachObserver(observer) {
m_iLastKey++;
m_Observers.put(m_iLastKey, observer);
org.webminster.utils.Tracer.trace((org.webminster.utils.Tracer.INFO + "Attached Observer ") + m_iLastKey, "org.webminster.utils.Observable::attachObserver", "org/webminster/utils/Observable.as", 55);
return(m_iLastKey);
}
function detachObserver(iObserverKey) {
org.webminster.utils.Tracer.trace((org.webminster.utils.Tracer.INFO + "Detached Observer ") + iObserverKey, "org.webminster.utils.Observable::detachObserver", "org/webminster/utils/Observable.as", 63);
m_Observers.remove(iObserverKey);
}
function notifyAll(iEventType) {
var _local3 = m_Observers.getAll();
var _local4 = 0;
for ( ; _local4 < _local3.length ; _local4++) {
_local3[_local4].notify(iEventType);
}
}
}
Symbol 26 MovieClip [__Packages.org.webminster.vanadium.controller.IController] Frame 0
class org.webminster.vanadium.controller.IController
{
function IController () {
}
}
Symbol 27 MovieClip [__Packages.org.webminster.vanadium.controller.CoreController] Frame 0
#initclip
if (!org.webminster.vanadium.controller.CoreController) {
if (!org) {
_global.org = new Object();
}
if (!org.webminster) {
_global.org.webminster = new Object();
}
if (!org.webminster.vanadium) {
_global.org.webminster.vanadium = new Object();
}
if (!org.webminster.vanadium.controller) {
_global.org.webminster.vanadium.controller = new Object();
}
((_global.org.webminster.vanadium.controller.CoreController = function () {
super();
this.m_gui = org.webminster.vanadium.gui.GuiFactory.createGui();
this.m_model = org.webminster.vanadium.model.CoreModel.instance();
this.m_remote = org.webminster.vanadium.remote.RemoteControl.instance();
this.m_gui.setCtrl(this);
this.m_gui.setModel(this.m_model);
this.m_remote.setModel(this.m_model);
this.m_remote.setCtrl(this);
})).prototype.__proto__ = org.webminster.utils.Observable.prototype;
(_global.org.webminster.vanadium.controller.CoreController /* register */).prototype.__constructor__ = org.webminster.utils.Observable;
var _local1 = (_global.org.webminster.vanadium.controller.CoreController /* register */).prototype;
(_global.org.webminster.vanadium.controller.CoreController /* register */).instance = function () {
if (null == org.webminster.vanadium.controller.CoreController.m_TheInstance) {
org.webminster.vanadium.controller.CoreController.m_TheInstance = new org.webminster.vanadium.controller.CoreController();
}
return(org.webminster.vanadium.controller.CoreController.m_TheInstance);
};
(_global.org.webminster.vanadium.controller.CoreController /* register */).guiInstance = function () {
return(org.webminster.vanadium.controller.CoreController.instance().m_gui);
};
_local1.start = function () {
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_INIT);
org.webminster.utils.Scheduler.instance().registerExecutedFunction(com.dynamicflash.utils.Delegate.create(this, this.checkGlobalState), -1, org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
};
_local1.checkGlobalState = function () {
var _local2 = this.m_model._getPlaylist().currentEntry(0);
switch (this.m_model.currentState()) {
case org.webminster.vanadium.model.CoreModel.STATE_INIT :
if (this.m_model.previewIsConfigured()) {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.STEP + "Load preview image.", "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 107);
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_SHOWINGPREVIEW);
this.m_gui.displayPreview(com.dynamicflash.utils.Delegate.create(this, this.proceedToNextState, org.webminster.vanadium.model.CoreModel.STATE_LOADINGPLAYLIST));
break;
}
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_LOADINGPLAYLIST);
return(undefined);
case org.webminster.vanadium.model.CoreModel.STATE_LOADINGPLAYLIST :
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.STEP + "Load and read playlist.", "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 124);
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
this.m_model._getPlaylist().populatePlaylist(this.m_model.source(), com.dynamicflash.utils.Delegate.create(this, this.proceedToNextState, org.webminster.vanadium.model.CoreModel.STATE_CHECKINGINPUT));
break;
case org.webminster.vanadium.model.CoreModel.STATE_CHECKINGINPUT :
if (this.m_model._getPlaylist().gaveUpLoadingPlaylist()) {
org.webminster.utils.Tracer.trace((org.webminster.utils.Tracer.ERROR + "Gave up loading playlist: ") + this.m_model._getPlaylist().getPlaylistError(), "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 134);
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_INPUTERROR);
} else if (this.m_model._getPlaylist().playListIsLoaded()) {
this.notifyAll(org.webminster.vanadium.model.PlayerDefines.PLAYLIST_CHANGED);
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.STEP + "Checking playlist entries.", "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 141);
if (this.m_model._getPlaylist().getEntryCount() > 0) {
org.webminster.utils.Tracer.trace((org.webminster.utils.Tracer.INFO + "First played song: ") + _local2.getFileUrl(), "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 144);
if (this.m_model._getPlaylist().entryByNum(1).isAudio() || (this.m_model._getPlaylist().entryByNum(1).isVideo())) {
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_PLAYINIT);
} else {
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_INPUTERROR);
}
// unexpected jump
}
org.webminster.utils.Tracer.trace((org.webminster.utils.Tracer.ERROR + "Playlist loaded, but no entries found in playlist: ") + this.m_model._getPlaylist().getName(), "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 164);
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_INPUTERROR);
} else {
break;
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.ERROR + "Controller stopped due to InputError.", "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 173);
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
break;
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.STEP + "Initialize player.", "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 178);
this.m_gui.drawGui();
if (this.m_model.isAutostart()) {
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_WAITFORENOUGHLOADED);
} else {
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_WAITFORCLICK);
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
}
break;
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.STEP + "Wait until user click on play.", "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 193);
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
break;
while (this.m_model._getPlaylist().curOrLaterMightBeOK()) {
if (this.m_model._getPlaylist().enoughLoadedToPlayCurrent()) {
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_PLAY);
this.loadEntry(_local2);
break;
}
if (_local2.isLoading()) {
break;
}
if (this.loadEntry(_local2)) {
break;
}
this.incCurrentEntry();
}
if (!this.m_model._getPlaylist().curOrLaterMightBeOK()) {
this.m_model.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_INPUTERROR);
}
break;
if (!_local2.isPlaying()) {
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.STEP + "Play entry '") + _local2.getTitle()) + "'.", "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 238);
if (_local2.isVideo()) {
this.notifyAll(org.webminster.vanadium.model.PlayerDefines.DISPLAY_MOVIE);
}
_local2.play(com.dynamicflash.utils.Delegate.create(this, this.playOfPleFinished, _local2));
}
this.notifyAll(org.webminster.vanadium.model.PlayerDefines.POSITION_CHANGED);
break;
if (_local2.isPlaying()) {
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.STEP + "Pause entry '") + _local2.getTitle()) + "'.", "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 251);
_local2.pause();
}
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
break;
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.WARN + "Current global state '") + this.m_model.currentState()) + "' is undefined.", "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 258);
}
case org.webminster.vanadium.model.CoreModel.STATE_INPUTERROR :
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.ERROR + "Controller stopped due to InputError.", "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 173);
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
break;
case org.webminster.vanadium.model.CoreModel.STATE_PLAYINIT :
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.STEP + "Initialize player.", "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 178);
this.m_gui.drawGui();
if (this.m_model.isAutostart()) {
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_WAITFORENOUGHLOADED);
} else {
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_WAITFORCLICK);
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
}
break;
case org.webminster.vanadium.model.CoreModel.STATE_WAITFORCLICK :
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.STEP + "Wait until user click on play.", "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 193);
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
break;
case org.webminster.vanadium.model.CoreModel.STATE_WAITFORENOUGHLOADED :
while (this.m_model._getPlaylist().curOrLaterMightBeOK()) {
if (this.m_model._getPlaylist().enoughLoadedToPlayCurrent()) {
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_PLAY);
this.loadEntry(_local2);
break;
}
if (_local2.isLoading()) {
break;
}
if (this.loadEntry(_local2)) {
break;
}
this.incCurrentEntry();
}
if (!this.m_model._getPlaylist().curOrLaterMightBeOK()) {
this.m_model.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_INPUTERROR);
}
break;
case org.webminster.vanadium.model.CoreModel.STATE_PLAY :
if (!_local2.isPlaying()) {
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.STEP + "Play entry '") + _local2.getTitle()) + "'.", "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 238);
if (_local2.isVideo()) {
this.notifyAll(org.webminster.vanadium.model.PlayerDefines.DISPLAY_MOVIE);
}
_local2.play(com.dynamicflash.utils.Delegate.create(this, this.playOfPleFinished, _local2));
}
this.notifyAll(org.webminster.vanadium.model.PlayerDefines.POSITION_CHANGED);
break;
case org.webminster.vanadium.model.CoreModel.STATE_PAUSE :
if (_local2.isPlaying()) {
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.STEP + "Pause entry '") + _local2.getTitle()) + "'.", "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 251);
_local2.pause();
}
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
break;
default :
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.WARN + "Current global state '") + this.m_model.currentState()) + "' is undefined.", "org.webminster.vanadium.controller.CoreController::checkGlobalState", "org/webminster/vanadium/controller/CoreController.as", 258);
}
};
_local1.proceedToNextState = function (eNextState) {
this.setCurrentState(eNextState);
org.webminster.utils.Scheduler.instance().registerExecutedFunction(com.dynamicflash.utils.Delegate.create(this, this.checkGlobalState), -1, org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
};
_local1.setCurrentState = function (eNewState) {
this.m_model.setCurrentState(eNewState);
this.notifyAll(org.webminster.vanadium.model.PlayerDefines.GLOBAL_STATE_CHANGED);
};
_local1.setCurrentLoaderState = function (eNewState) {
this.m_model.setCurrentLoaderState(eNewState);
this.notifyAll(org.webminster.vanadium.model.PlayerDefines.LOADER_STATE_CHANGED);
};
_local1.stopCurrentEntry = function () {
var _local2 = this.m_model._getPlaylist().currentEntry(0);
_local2.stop();
this.notifyAll(org.webminster.vanadium.model.PlayerDefines.POSITION_CHANGED);
if (_local2.isVideo()) {
this.hideCurrentEntry();
}
};
_local1.hideCurrentEntry = function () {
var _local2 = this.m_model._getPlaylist().currentEntry(0).getMovieClip();
if (_local2 == null) {
return(undefined);
}
_local2._visible = false;
};
_local1.gotoCurrentEntry = function (iEntryPos) {
this.m_model._getPlaylist().setCurrentEntryByPos(iEntryPos);
this.traceLoadStatus(true);
};
_local1.incCurrentEntry = function () {
if (this.m_model._getPlaylist().hasNextEntry()) {
this.m_model._getPlaylist().incCurrentEntry();
}
if (this.m_model._getPlaylist().curLoadedEntry() != null) {
this.traceLoadStatus(true);
}
};
_local1.decCurrentEntry = function () {
if (this.m_model._getPlaylist().hasPrevEntry()) {
this.m_model._getPlaylist().decCurrentEntry();
}
if (this.m_model._getPlaylist().curLoadedEntry() != null) {
this.traceLoadStatus(true);
}
};
_local1.isCurPlaying = function () {
return(this.m_model.currentState() == org.webminster.vanadium.model.CoreModel.STATE_PLAY);
};
_local1.isCurPaused = function () {
return(this.m_model.currentState() == org.webminster.vanadium.model.CoreModel.STATE_PAUSE);
};
_local1.isCurWaitingForClick = function () {
return(this.m_model.currentState() == org.webminster.vanadium.model.CoreModel.STATE_WAITFORCLICK);
};
_local1.isCurError = function () {
return(this.m_model.currentState() == org.webminster.vanadium.model.CoreModel.STATE_INPUTERROR);
};
_local1.playOfPleFinished = function (loadedPle) {
this.next();
};
_local1.loadEntry = function (pleToLoad) {
if ((pleToLoad == null) || (!pleToLoad.canBeLoaded())) {
this.setCurrentLoaderState(org.webminster.vanadium.model.CoreModel.LOADERSTATE_LOADING_INACTIV);
return(false);
}
this.setCurrentLoaderState(org.webminster.vanadium.model.CoreModel.LOADERSTATE_LOADING);
org.webminster.utils.Scheduler.instance().registerExecutedFunction(com.dynamicflash.utils.Delegate.create(this, this.traceLoadStatus, false), -1, org.webminster.vanadium.controller.CoreController.sTraceLoadStatus);
pleToLoad.load(com.dynamicflash.utils.Delegate.create(this, this.loadOfPleFinished, pleToLoad));
return(true);
};
_local1.loadOfPleFinished = function (loadedPle) {
this.m_model.setCurrentLoaderState(org.webminster.vanadium.model.CoreModel.LOADERSTATE_LOADING_INACTIV);
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(org.webminster.vanadium.controller.CoreController.sTraceLoadStatus);
this.traceLoadStatus(false);
org.webminster.utils.Scheduler.instance().registerExecutedFunction(com.dynamicflash.utils.Delegate.create(this, this.traceLoadStatus, true), 2 * org.webminster.vanadium.model.PlayerDefines.PLAYER_FPS, org.webminster.vanadium.controller.CoreController.sTempTraceLoadStatus, org.webminster.vanadium.model.PlayerDefines.PLAYER_FPS);
};
_local1.stopLoadingCurrentEntry = function () {
this.m_model._getPlaylist().curLoadedEntry().stopLoading();
this.m_model.setCurrentLoaderState(org.webminster.vanadium.model.CoreModel.LOADERSTATE_LOADING_INACTIV);
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(org.webminster.vanadium.controller.CoreController.sTraceLoadStatus);
};
_local1.traceLoadStatus = function (bForceTrace) {
var _local3 = this.m_model._getPlaylist();
var _local4 = _local3.traceLoadStatus();
if (bForceTrace || (_local4)) {
this.notifyAll(org.webminster.vanadium.model.PlayerDefines.LOAD_STATUS_CHANGED);
}
};
_local1.play = function () {
if (this.isCurError()) {
return(undefined);
}
if (this.isCurWaitingForClick()) {
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_WAITFORENOUGHLOADED);
} else {
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_PLAY);
}
org.webminster.utils.Scheduler.instance().registerExecutedFunction(com.dynamicflash.utils.Delegate.create(this, this.checkGlobalState), -1, org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
};
_local1.pause = function () {
if (this.isCurError()) {
return(undefined);
}
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_PAUSE);
org.webminster.utils.Scheduler.instance().registerExecutedFunction(com.dynamicflash.utils.Delegate.create(this, this.checkGlobalState), -1, org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
};
_local1.stop = function () {
if (this.isCurError()) {
return(undefined);
}
if (this.m_model.currentLoaderState() == org.webminster.vanadium.model.CoreModel.LOADERSTATE_LOADING) {
this.stopLoadingCurrentEntry();
}
this.stopCurrentEntry();
this.m_model._getPlaylist().setCurrentEntryByNum(1);
this.notifyAll(org.webminster.vanadium.model.PlayerDefines.DISPLAY_MOVIE);
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_WAITFORCLICK);
};
_local1.setPosition = function (iPos) {
if (this.isCurError()) {
return(undefined);
}
var _local3 = this.m_model._getPlaylist().currentEntry(0);
if (null == _local3) {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "Can't setPosition() as there is no current entry in playlist!", "org.webminster.vanadium.controller.CoreController::setPosition", "org/webminster/vanadium/controller/CoreController.as", 476);
}
_local3.setPosition(iPos);
this.notifyAll(org.webminster.vanadium.model.PlayerDefines.POSITION_CHANGED);
};
_local1.setVolume = function (iVol) {
this.m_model.setVolume(iVol);
};
_local1.incVolume = function (iVol) {
this.m_model.incVolume(iVol);
};
_local1.decVolume = function (iVol) {
this.m_model.decVolume(iVol);
};
_local1.next = function () {
if (this.isCurError()) {
return(undefined);
}
if (this.m_model.currentLoaderState() == org.webminster.vanadium.model.CoreModel.LOADERSTATE_LOADING) {
this.stopLoadingCurrentEntry();
}
if (!this.isCurWaitingForClick()) {
if (this.isCurPlaying() || (this.isCurPaused())) {
this.stopCurrentEntry();
}
if (this.m_model._getPlaylist().hasNextEntry()) {
this.incCurrentEntry();
if (this.isCurPaused()) {
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_WAITFORCLICK);
} else {
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_WAITFORENOUGHLOADED);
}
org.webminster.utils.Scheduler.instance().registerExecutedFunction(com.dynamicflash.utils.Delegate.create(this, this.checkGlobalState), -1, org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
} else {
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_WAITFORCLICK);
}
} else {
this.incCurrentEntry();
}
};
_local1.prev = function () {
if (this.isCurError()) {
return(undefined);
}
if (this.m_model._getPlaylist().getCurrentEntry(0).getPosition() < 4000) {
if (this.isCurPaused() || (this.isCurWaitingForClick())) {
this.prevSetState(org.webminster.vanadium.model.CoreModel.STATE_WAITFORCLICK);
} else {
this.prevSetState(org.webminster.vanadium.model.CoreModel.STATE_WAITFORENOUGHLOADED);
}
if (this.m_model.currentLoaderState() == org.webminster.vanadium.model.CoreModel.LOADERSTATE_LOADING) {
this.stopLoadingCurrentEntry();
}
} else if (this.isCurPaused()) {
this.stopCurrentEntry();
} else {
this.restartCurrent();
}
};
_local1.prevSetState = function (nextState) {
this.stopCurrentEntry();
if (this.m_model._getPlaylist().hasPrevEntry()) {
this.decCurrentEntry();
}
this.setCurrentState(nextState);
org.webminster.utils.Scheduler.instance().registerExecutedFunction(com.dynamicflash.utils.Delegate.create(this, this.checkGlobalState), -1, org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
};
_local1.restartCurrent = function () {
this.stopCurrentEntry();
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_PLAY);
org.webminster.utils.Scheduler.instance().registerExecutedFunction(com.dynamicflash.utils.Delegate.create(this, this.checkGlobalState), -1, org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
};
_local1.gotoEntry = function (iEntryPos) {
if (this.isCurError()) {
return(undefined);
}
if (this.m_model.currentLoaderState() == org.webminster.vanadium.model.CoreModel.LOADERSTATE_LOADING) {
this.stopLoadingCurrentEntry();
}
if (!this.isCurWaitingForClick()) {
if (this.isCurPlaying() || (this.isCurPaused())) {
this.stopCurrentEntry();
}
this.gotoCurrentEntry(iEntryPos);
if (this.isCurPaused()) {
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_WAITFORCLICK);
} else {
this.setCurrentState(org.webminster.vanadium.model.CoreModel.STATE_WAITFORENOUGHLOADED);
}
org.webminster.utils.Scheduler.instance().registerExecutedFunction(com.dynamicflash.utils.Delegate.create(this, this.checkGlobalState), -1, org.webminster.vanadium.controller.CoreController.sCheckGlobalStateID);
} else {
this.gotoCurrentEntry(iEntryPos);
}
};
_local1.openInfoWindow = function () {
getURL (org.webminster.vanadium.model.Defines.INFO_URL, "_self");
};
_local1.displayPlayerInfo = function () {
this.notifyAll(org.webminster.vanadium.model.PlayerDefines.DISPLAY_PLAYER_INFO);
};
_local1.displayFileInfo = function () {
this.notifyAll(org.webminster.vanadium.model.PlayerDefines.DISPLAY_FILE_INFO);
};
//_global.org.webminster.vanadium.controller.CoreController /* register */ implements org.webminster.vanadium.controller.IController
ASSetPropFlags(_local1, null, 1);
(_global.org.webminster.vanadium.controller.CoreController /* register */).m_TheInstance = null;
(_global.org.webminster.vanadium.controller.CoreController /* register */).sCheckGlobalStateID = "checkGlobalState";
(_global.org.webminster.vanadium.controller.CoreController /* register */).sTraceLoadStatus = "traceLoadStatus";
(_global.org.webminster.vanadium.controller.CoreController /* register */).sTempTraceLoadStatus = "tempTraceLoadStatus";
}
#endinitclip
Symbol 28 MovieClip [__Packages.org.webminster.caco3.Point] Frame 0
class org.webminster.caco3.Point
{
var m_bStartingPoint, m_px, m_py, m_cp1x, m_cp1y, m_cp2x, m_cp2y;
function Point (sp, px, py, cp1x, cp1y, cp2x, cp2y) {
m_bStartingPoint = sp;
m_px = 0;
m_py = 0;
m_cp1x = 0;
m_cp1y = 0;
m_cp2x = 0;
m_cp2y = 0;
if (px != null) {
m_px = px;
if (cp1x != null) {
m_cp1x = cp1x - m_px;
}
if (cp2x != null) {
m_cp2x = cp2x - m_px;
}
}
if (px != null) {
m_py = py;
if (cp1y != null) {
m_cp1y = cp1y - m_py;
}
if (cp2y != null) {
m_cp2y = cp2y - m_py;
}
}
}
function copy() {
return(new org.webminster.caco3.Point(m_bStartingPoint, m_px, m_py, m_cp1x + m_px, m_cp1y + m_py, m_cp2x + m_px, m_cp2y + m_py));
}
function setAnchorPoint(sp, px, py) {
if (sp != null) {
m_bStartingPoint = sp;
}
if (px != null) {
m_px = px;
}
if (py != null) {
m_py = py;
}
}
function setControlPoint1(angle, distance) {
setControlPoint(1, angle, distance);
}
function setControlPoint2(angle, distance) {
setControlPoint(2, angle, distance);
}
function setControlPoints(angle1, distance1, angle2, distance2) {
setControlPoint(1, angle1, distance1);
setControlPoint(2, angle2, distance2);
}
function setControlPoint1Abs(dx, dy) {
if (dx != null) {
m_cp1x = dx - m_px;
}
if (dy != null) {
m_cp1y = dy - m_py;
}
}
function setControlPoint2Abs(dx, dy) {
if (dx != null) {
m_cp2x = dx - m_px;
}
if (dy != null) {
m_cp2y = dy - m_py;
}
}
function setControlPointsAbs(dx1, dy1, dx2, dy2) {
setControlPoint1Abs(dx1, dy1);
setControlPoint2Abs(dx2, dy2);
}
function getAnchorPoint() {
return({x:m_px, y:m_py, startingPoint:m_bStartingPoint});
}
function getControlPoint1() {
return({x:m_px + m_cp1x, y:m_py + m_cp1y, angle:calcAngle(m_cp1x, m_cp1y), distance:calcDistance(m_cp1x, m_cp1y)});
}
function getControlPoint2() {
return({x:m_px + m_cp2x, y:m_py + m_cp2y, angle:calcAngle(m_cp2x, m_cp2y), distance:calcDistance(m_cp2x, m_cp2y)});
}
function calcAngle(dx, dy) {
var _local4 = (Math.atan2(dy, dx) * 180) / Math.PI;
if (_local4 < 0) {
_local4 = _local4 + 360;
}
return(_local4);
}
function calcDistance(dx, dy) {
return(Math.sqrt(Math.pow(dx, 2) + Math.pow(dy, 2)));
}
function setControlPoint(cp, a, d) {
var _local5 = 0;
var _local6 = 0;
if ((a == null) && (d == null)) {
return(undefined);
}
if (cp == 1) {
var _local7 = m_cp1x;
var _local8 = m_cp1y;
} else if (cp == 2) {
var _local7 = m_cp2x;
var _local8 = m_cp2y;
} else {
return(undefined);
}
if (a == null) {
_local5 = calcAngle(_local7, _local8);
} else {
_local5 = a;
}
if (d == null) {
_local6 = calcDistance(_local7, _local8);
} else {
_local6 = d;
}
var _local8 = Math.sin((_local5 / 180) * Math.PI) * _local6;
var _local7 = Math.cos((_local5 / 180) * Math.PI) * _local6;
if (cp == 1) {
m_cp1x = _local7;
m_cp1y = _local8;
} else {
m_cp2x = _local7;
m_cp2y = _local8;
}
}
}
Symbol 29 MovieClip [__Packages.org.webminster.vanadium.gui.VDisplay] Frame 0
class org.webminster.vanadium.gui.VDisplay
{
var m_mc, m_iTextState, m_textField, m_bIsMainText, m_mainText, m_mainTextPosition, m_mainTextDirection, m_iDeltaHscroll, m_iScrollWaitTime, m_iTextPasses, m_iScrollWaitUntil, m_rect1, m_rect2, m_rect3, m_reflection2, m_reflection, m_reflection3, m_textformat, m_timeField, m_loopShape, m_randomShape;
function VDisplay (mc, level) {
m_mc = mc.createEmptyMovieClip("display", level);
}
function setText(t, d) {
m_iTextState = STATE_SET_WAIT_TIME;
if (m_textField.text != t) {
if ((d > 0) && (m_bIsMainText == true)) {
m_mainText = m_textField.text;
m_mainTextPosition = m_textField.hscroll;
m_mainTextDirection = m_iDeltaHscroll;
}
m_iDeltaHscroll = 1;
m_textField.text = t;
m_textField.hscroll = 0;
org.webminster.utils.Scheduler.instance().registerExecutedFunction(com.dynamicflash.utils.Delegate.create(this, scrollText), -1, m_idString);
if ((m_textField.textWidth + 6) > m_textField._width) {
m_iScrollWaitTime = 2000;
if (d > 0) {
m_iTextPasses = 2;
m_bIsMainText = false;
} else {
m_iTextPasses = -1;
m_bIsMainText = true;
}
} else {
m_iScrollWaitTime = d * 1000;
if (d > 0) {
m_iTextPasses = 1;
m_bIsMainText = false;
} else {
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(m_idString);
m_bIsMainText = true;
}
}
}
}
function scrollText() {
switch (m_iTextState) {
case STATE_SET_WAIT_TIME :
m_iScrollWaitUntil = getTimer() + m_iScrollWaitTime;
m_iTextState = STATE_WAIT;
break;
case STATE_WAIT :
if (getTimer() >= m_iScrollWaitUntil) {
m_iTextState = STATE_CHECK_PASSES;
}
break;
case STATE_CHECK_PASSES :
if (m_iTextPasses > 0) {
m_iTextPasses--;
}
if (m_iTextPasses == 0) {
setText(m_mainText);
m_textField.hscroll = m_mainTextPosition;
m_iDeltaHscroll = m_mainTextDirection;
} else {
m_iTextState = STATE_MOVE_TEXT;
}
break;
case STATE_MOVE_TEXT :
m_textField.hscroll = m_textField.hscroll + m_iDeltaHscroll;
m_textField.background = false;
if (!((m_textField.hscroll == m_textField.maxhscroll) || (m_textField.hscroll == 0))) {
break;
}
m_iDeltaHscroll = m_iDeltaHscroll * -1;
m_iTextState = STATE_SET_WAIT_TIME;
}
}
function draw(width, height, x, y) {
if (x != undefined) {
m_mc._x = x;
}
if (y != undefined) {
m_mc._y = y;
}
m_rect1 = new org.webminster.caco3.Rectangle(m_mc, 1);
m_rect1.setSize(width, height - 20);
m_rect1.setRadius(3);
m_rect1.setPosition(0, 21);
m_rect1.setLineStyle(0);
m_rect1.setFillStyle(org.webminster.caco3.Shape.SIMPLE, [14540253]);
m_rect1.draw();
m_rect2 = new org.webminster.caco3.Rectangle(m_mc, 2);
m_rect2.setSize(width, height);
m_rect2.setRadius(3);
m_rect2.setLineStyle(0);
m_rect2.setFillStyle(org.webminster.caco3.Shape.SIMPLE, [10066329]);
m_rect2.draw();
m_rect3 = new org.webminster.caco3.Rectangle(m_mc, 3);
m_rect3.setSize(width - 2, height - 2);
m_rect3.setRadius(2);
m_rect3.setPosition(1, 1);
m_rect3.setLineStyle(0);
m_rect3.setFillStyle(org.webminster.caco3.Shape.LINEAR, [39389, 6745855], [100, 100], [0, 255], {matrixType:"box", x:0, y:0, w:1, h:height - 2, r:(90 / 180) * Math.PI});
m_rect3.draw();
m_reflection2 = new org.webminster.caco3.Rectangle(m_mc, 5);
m_reflection2.setSize(width - 4, (height / 2) - 2);
m_reflection2.setRadii(1.6, 1.6, 0, 0);
m_reflection2.setPosition(2, 2);
m_reflection2.setLineStyle(0);
m_reflection2.setFillStyle(org.webminster.caco3.Shape.LINEAR, [16777215, 16777215], [60, 30], [0, 255], {matrixType:"box", x:0, y:0, w:1, h:(height / 2) - 2, r:(90 / 180) * Math.PI});
m_reflection2.draw();
m_reflection = new org.webminster.caco3.Rectangle(m_mc, 4);
m_reflection.setSize(width - 2, (height / 2) - 1);
m_reflection.setRadii(1.8, 1.8, 0, 0);
m_reflection.setPosition(1, 1);
m_reflection.setLineStyle(0);
m_reflection.setFillStyle(org.webminster.caco3.Shape.LINEAR, [16777215, 16777215], [76, 46], [0, 255], {matrixType:"box", x:0, y:0, w:1, h:(height / 2) - 1, r:(90 / 180) * Math.PI});
m_reflection.addPoints(m_reflection2, 1, 1);
m_reflection.draw();
m_reflection3 = new org.webminster.caco3.Rectangle();
m_reflection3.setSize(width - 4, (height / 2) - 2);
m_reflection3.setRadii(0, 0, 1.6, 1.6);
m_reflection3.setPosition(2, 17);
m_reflection3.setLineStyle(0);
m_reflection = new org.webminster.caco3.Rectangle(m_mc, 7);
m_reflection.setSize(width - 2, (height / 2) - 1);
m_reflection.setRadii(0, 0, 1.8, 1.8);
m_reflection.setPosition(1, height / 2);
m_reflection.setLineStyle(0);
m_reflection.setFillStyle(org.webminster.caco3.Shape.LINEAR, [16777215, 16777215], [36, 26], [0, 255], {matrixType:"box", x:0, y:0, w:1, h:(height / 2) - 1, r:(90 / 180) * Math.PI});
m_reflection.addPoints(m_reflection3, 1, 0);
m_reflection.draw();
m_textformat = new TextFormat("Verdana", 11, 0);
m_textformat.align = "center";
m_mc.createTextField("text", 10, 4, 1, width - 8, 24);
m_textField = m_mc.text;
m_textField.setNewTextFormat(m_textformat);
m_textField.selectable = false;
m_textField.border = false;
m_textField.background = false;
m_mc.createTextField("time", 11, (width - 60) / 2, 15, 60, 20);
m_timeField = m_mc.time;
m_timeField.setNewTextFormat(m_textformat);
m_timeField.selectable = false;
m_timeField.border = false;
m_timeField.background = false;
setTime(0);
m_loopShape = new org.webminster.caco3.Rectangle(m_mc, 12, "loopShape");
m_loopShape.setSize(18, 10);
m_loopShape.setDrawOffset(-9, -5);
m_loopShape.setRadius(2);
m_loopShape.setPosition(40, 25);
m_loopShape.setLineStyle(0);
m_loopShape.setFillStyle(org.webminster.caco3.Shape.SIMPLE, [0], [10]);
m_loopShape.draw();
m_randomShape = new org.webminster.caco3.Rectangle(m_mc, 13, "randomShape");
m_randomShape.setSize(18, 10);
m_randomShape.setDrawOffset(-9, -5);
m_randomShape.setRadius(2);
m_randomShape.setPosition(width - 40, 25);
m_randomShape.setLineStyle(0);
m_randomShape.setFillStyle(org.webminster.caco3.Shape.SIMPLE, [0], [10]);
m_randomShape.draw();
}
function setTime(ms) {
var _local3 = Math.round(ms / 1000);
var _local4 = _local3 % 60;
var _local5 = (_local3 - _local4) / 60;
var _local6 = "";
if (_local5 < 10) {
_local6 = _local6 + "0";
}
_local6 = _local6 + (_local5 + ":");
if (_local4 < 10) {
_local6 = _local6 + "0";
}
_local6 = _local6 + _local4;
m_timeField.text = _local6;
}
static var STATE_SET_WAIT_TIME = 0;
static var STATE_WAIT = 1;
static var STATE_CHECK_PASSES = 2;
static var STATE_MOVE_TEXT = 3;
static var m_idString = "gui.display.text";
}
Symbol 30 MovieClip [__Packages.org.webminster.utils.FunctionCall] Frame 0
class org.webminster.utils.FunctionCall
{
var m_fFunc, m_sID, m_iCallCount, m_iCallFreq;
function FunctionCall (fFunc, sID, iCallCount, iCallFreq) {
m_fFunc = fFunc;
m_sID = sID;
m_iCallCount = iCallCount;
m_iCallFreq = iCallFreq;
}
function func() {
return(m_fFunc);
}
function id() {
return(m_sID);
}
function callCount() {
return(m_iCallCount);
}
function callFreq() {
return(m_iCallFreq);
}
function decreaseCallCount() {
m_iCallCount--;
}
}
Symbol 31 MovieClip [__Packages.org.webminster.vanadium.gui.GuiFactory] Frame 0
class org.webminster.vanadium.gui.GuiFactory
{
function GuiFactory () {
}
static function createGui() {
return(new org.webminster.vanadium.gui.CoreGui());
}
}
Symbol 32 MovieClip [__Packages.org.webminster.vanadium.controller.Player] Frame 0
class org.webminster.vanadium.controller.Player
{
function Player () {
}
static function main(mc) {
if (org.webminster.vanadium.model.Defines.MayPlayerRun()) {
_root.version = org.webminster.vanadium.model.Defines.getPlayerVersion();
_root.releaseDate = org.webminster.vanadium.model.Defines.getPlayerDate();
_root.language = org.webminster.vanadium.model.Defines.getPlayerLanguage();
_root.officialName = org.webminster.vanadium.model.Defines.getPlayerName();
org.webminster.utils.Tracer.traceInit();
var _local3 = org.webminster.vanadium.controller.CoreController.instance();
_local3.start();
org.webminster.utils.Tracer.trace((((((((org.webminster.utils.Tracer.STEP + org.webminster.vanadium.model.Defines.getPlayerName()) + " in version ") + org.webminster.vanadium.model.Defines.getPlayerVersion()) + " (") + org.webminster.vanadium.model.Defines.getPlayerLanguage()) + ") from ") + org.webminster.vanadium.model.Defines.getPlayerDateStr()) + " started.", "org.webminster.vanadium.controller.Player::main", "/home/johannes/Development/Vanadium/make/../src_as/org/webminster/vanadium/controller/Player.as", 55);
}
}
}
Symbol 33 MovieClip [__Packages.org.webminster.vanadium.gui.VElement] Frame 0
class org.webminster.vanadium.gui.VElement
{
var m_mc, m_ID2FunctionPressEvents, m_ID2FunctionReleaseEvents, m_ID2FunctionMoveEvents, m_ID2HashMap, m_iWidth, m_iHeight, m_iXPos, m_iYPos;
function VElement (mc, level, name) {
if (mc == undefined) {
var _local5 = _root;
} else if (level == undefined) {
var _local5 = mc;
} else {
if (name == undefined) {
name = "element" + level;
}
if (mc[name] == null) {
var _local5 = mc.createEmptyMovieClip(name, level);
} else {
var _local5 = mc[name];
}
}
m_mc = _local5;
m_ID2FunctionPressEvents = new com.dynamicflash.utils.HashMap();
m_ID2FunctionReleaseEvents = new com.dynamicflash.utils.HashMap();
m_ID2FunctionMoveEvents = new com.dynamicflash.utils.HashMap();
m_ID2HashMap = new com.dynamicflash.utils.HashMap();
}
function setSize(w, h) {
m_iWidth = w;
m_iHeight = h;
}
function setPosition(x, y) {
m_iXPos = x;
m_iYPos = y;
}
function draw() {
m_mc._x = m_iXPos;
m_mc._y = m_iYPos;
}
function registerEvent(eEventID, fFunc, iID) {
switch (eEventID) {
case org.webminster.vanadium.model.PlayerDefines.GUI_EVENT_RELEASED :
m_ID2HashMap.put(iID, m_ID2FunctionReleaseEvents);
m_ID2FunctionReleaseEvents.put(iID, fFunc);
break;
case org.webminster.vanadium.model.PlayerDefines.GUI_EVENT_PRESSED :
m_ID2HashMap.put(iID, m_ID2FunctionPressEvents);
m_ID2FunctionPressEvents.put(iID, fFunc);
break;
case org.webminster.vanadium.model.PlayerDefines.GUI_EVENT_MOVED :
m_ID2HashMap.put(iID, m_ID2FunctionMoveEvents);
m_ID2FunctionMoveEvents.put(iID, fFunc);
break;
default :
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "Could not register event (unsupported event type)!", "org.webminster.vanadium.gui.VElement::registerEvent", "org/webminster/vanadium/gui/VElement.as", 134);
}
}
function unregisterEvent(iID) {
m_ID2HashMap.get(iID).remove(iID);
m_ID2HashMap.remove(iID);
}
function release() {
callFuncs(m_ID2FunctionReleaseEvents.getAll());
}
function press() {
callFuncs(m_ID2FunctionPressEvents.getAll());
}
function move() {
callFuncs(m_ID2FunctionMoveEvents.getAll());
}
function callFuncs(a) {
var _local3 = 0;
for ( ; _local3 < a.length ; _local3++) {
a[_local3]();
}
_global.updateAfterEvent();
}
}
Symbol 34 MovieClip [__Packages.org.webminster.vanadium.gui.VFader] Frame 0
#initclip
if (!org.webminster.vanadium.gui.VFader) {
if (!org) {
_global.org = new Object();
}
if (!org.webminster) {
_global.org.webminster = new Object();
}
if (!org.webminster.vanadium) {
_global.org.webminster.vanadium = new Object();
}
if (!org.webminster.vanadium.gui) {
_global.org.webminster.vanadium.gui = new Object();
}
((_global.org.webminster.vanadium.gui.VFader = function (mc, level, name) {
super(mc, level, name);
this.m_iWidth = 100;
this.m_iHeight = 16;
this.m_iXPos = 0;
this.m_iYPos = 0;
this.m_usage = 0;
this.m_pressed = false;
})).prototype.__proto__ = org.webminster.vanadium.gui.VElement.prototype;
(_global.org.webminster.vanadium.gui.VFader /* register */).prototype.__constructor__ = org.webminster.vanadium.gui.VElement;
var _local1 = (_global.org.webminster.vanadium.gui.VFader /* register */).prototype;
_local1.draw = function () {
super.draw();
var _local3 = new org.webminster.caco3.Rectangle(this.m_mc, 9, "clickfield");
_local3.setSize(this.m_iWidth, this.m_iHeight);
_local3.setLineStyle(0);
_local3.setFillStyle(org.webminster.caco3.Shape.SIMPLE, [16711935], [0]);
_local3.draw().useHandCursor = false;
var _local4 = new org.webminster.caco3.Rectangle(this.m_mc, 11);
_local4.setSize(this.m_iWidth - 12, 4);
_local4.setRadii(0, 0, 3, 3);
_local4.setPosition(6, this.m_iHeight / 2);
_local4.setLineStyle(0);
_local4.setFillStyle(org.webminster.caco3.Shape.SIMPLE, [14540253]);
_local4.draw();
var _local5 = new org.webminster.caco3.Rectangle(this.m_mc, 12);
_local5.setSize(this.m_iWidth - 12, 6);
_local5.setRadius(3);
_local5.setPosition(6, (this.m_iHeight / 2) - 3);
_local5.setLineStyle(0);
_local5.setFillStyle(org.webminster.caco3.Shape.SIMPLE, [10066329]);
_local5.draw();
var _local6 = new org.webminster.caco3.Rectangle(this.m_mc, 13);
_local6.setSize(this.m_iWidth - 14, 4);
_local6.setRadius(2);
_local6.setPosition(7, (this.m_iHeight / 2) - 2);
_local6.setLineStyle(0);
_local6.setFillStyle(org.webminster.caco3.Shape.LINEAR, [10066329, 12303291], [100, 100], [0, 255], {matrixType:"box", x:0, y:0, w:1, h:4, r:(90 / 180) * Math.PI});
_local6.draw();
this.m_handle = this.m_mc.createEmptyMovieClip("handle", 17);
this.m_handle._x = 9;
this.m_handle._y = 8;
var _local7 = new org.webminster.caco3.Circle(this.m_handle, 1, "bottom");
_local7.setRadius(6);
_local7.setDrawOffset(-6, -6);
_local7.setLineStyle(0);
_local7.setFillStyle(org.webminster.caco3.Shape.SIMPLE, [6710886]);
_local7.draw();
var _local8 = new org.webminster.caco3.Circle(this.m_handle, 2, "top");
_local8.setRadius(5.5);
_local8.setDrawOffset(-5.5, -5.5);
_local8.setLineStyle(0);
_local8.setFillStyle(org.webminster.caco3.Shape.LINEAR, [14540253, 11184810], [100, 100], [0, 255], {matrixType:"box", x:-5.5, y:-5.5, w:1, h:11, r:(90 / 180) * Math.PI});
_local8.draw();
var _local9 = new org.webminster.caco3.Rectangle(this.m_mc, 14, "usage_mask");
_local9.setSize(this.m_iWidth - 14, 4);
_local9.setRadius(2);
_local9.setPosition(7, (this.m_iHeight / 2) - 2);
_local9.setLineStyle(0);
_local9.setFillStyle(org.webminster.caco3.Shape.SIMPLE, [16711935], [100]);
var _local10 = _local9.draw();
var _local11 = new org.webminster.caco3.Rectangle(this.m_mc, 15, "usage");
_local11.setSize(this.m_iWidth - 18, 4);
_local11.setPosition(this.m_iWidth - 7, (this.m_iHeight / 2) - 2);
_local11.setDrawOffset(-(this.m_iWidth - 18), 0);
_local11.setLineStyle(0);
_local11.setFillStyle(org.webminster.caco3.Shape.SIMPLE, [16777215], [100]);
_local11.draw().setMask(_local10);
this.m_mc.clickfield.onPress = com.dynamicflash.utils.Delegate.create(this, this.press);
this.m_mc.clickfield.onRelease = com.dynamicflash.utils.Delegate.create(this, this.release);
this.m_mc.clickfield.onReleaseOutside = com.dynamicflash.utils.Delegate.create(this, this.release);
this.m_mc.clickfield.onMouseMove = com.dynamicflash.utils.Delegate.create(this, this.wasMoved);
Mouse.addListener(this.m_mc.clickfield);
};
_local1.press = function () {
this.m_handle.startDrag(true, 9, 8, 9 + Math.round(((this.m_iWidth - 18) * this.m_usage) / 100), 8);
this.m_handle.top._rotation = 180;
this.m_pressed = true;
this.m_mc.onEnterFrame = com.dynamicflash.utils.Delegate.create(this, this.move);
super.press();
};
_local1.release = function () {
this.m_handle.stopDrag();
this.m_handle.top._rotation = 0;
this.m_pressed = false;
this.m_mc.onEnterFrame = null;
super.release();
};
_local1.move = function () {
if (this.m_moved) {
this.m_moved = false;
super.move();
}
};
_local1.wasMoved = function () {
this.m_moved = true;
_global.updateAfterEvent();
};
_local1.getFaderPosition = function () {
return(((this.m_handle._x - 9) / (this.m_iWidth - 18)) * 100);
};
_local1.setFaderPosition = function (pos) {
if (!this.m_pressed) {
this.m_handle._x = ((pos * (this.m_iWidth - 18)) / 100) + 9;
}
};
_local1.setFaderUsage = function (use) {
this.m_usage = use;
this.m_mc.usage._xscale = Math.round(100 - use);
};
ASSetPropFlags(_local1, null, 1);
}
#endinitclip
Symbol 35 MovieClip [__Packages.org.webminster.vanadium.gui.VButton] Frame 0
#initclip
if (!org.webminster.vanadium.gui.VButton) {
if (!org) {
_global.org = new Object();
}
if (!org.webminster) {
_global.org.webminster = new Object();
}
if (!org.webminster.vanadium) {
_global.org.webminster.vanadium = new Object();
}
if (!org.webminster.vanadium.gui) {
_global.org.webminster.vanadium.gui = new Object();
}
((_global.org.webminster.vanadium.gui.VButton = function (mc, level, name) {
super(mc, level, name);
this.m_iWidth = 16;
this.m_iHeight = 16;
this.m_iXPos = 0;
this.m_iYPos = 0;
this.m_iR1_tl = 0;
this.m_iR1_tr = 0;
this.m_iR1_br = 0;
this.m_iR1_bl = 0;
this.m_iR2_tl = 0;
this.m_iR2_tr = 0;
this.m_iR2_br = 0;
this.m_iR2_bl = 0;
})).prototype.__proto__ = org.webminster.vanadium.gui.VElement.prototype;
(_global.org.webminster.vanadium.gui.VButton /* register */).prototype.__constructor__ = org.webminster.vanadium.gui.VElement;
var _local1 = (_global.org.webminster.vanadium.gui.VButton /* register */).prototype;
_local1.draw = function () {
super.draw();
var _local3 = new org.webminster.caco3.Rectangle(this.m_mc, 6, "border");
_local3.setSize(this.m_iWidth, this.m_iHeight);
_local3.setLineStyle(0);
_local3.setFillStyle(org.webminster.caco3.Shape.SIMPLE, [10066329], [100]);
_local3.setRadii(this.m_iR1_tl, this.m_iR1_tr, this.m_iR1_br, this.m_iR1_bl);
_local3.draw();
var _local4 = new org.webminster.caco3.Rectangle(this.m_mc, 7, "glossy1");
_local4.setSize(this.m_iWidth - 2, (this.m_iHeight - 2) / 2);
_local4.setRadii(this.m_iR2_tl, this.m_iR2_tr, 0, 0);
_local4.setDrawOffset((-(this.m_iWidth - 2)) / 2, (-(this.m_iHeight - 2)) / 2);
_local4.setPosition(((this.m_iWidth - 2) / 2) + 1, ((this.m_iHeight - 2) / 2) + 1);
_local4.setLineStyle(0);
_local4.setFillStyle(org.webminster.caco3.Shape.SIMPLE, [14540253], [100]);
_local4.draw();
var _local5 = new org.webminster.caco3.Rectangle(this.m_mc, 5, "glossy2");
_local5.setSize(this.m_iWidth, this.m_iHeight / 2);
_local5.setRadii(0, 0, this.m_iR1_br, this.m_iR1_bl);
_local5.setDrawOffset((-this.m_iWidth) / 2, ((-this.m_iHeight) / 2) + 1);
_local5.setPosition(this.m_iWidth / 2, this.m_iHeight);
_local5.setLineStyle(0);
_local5.setFillStyle(org.webminster.caco3.Shape.SIMPLE, [13948116], [100]);
_local5.draw();
var _local6 = new org.webminster.caco3.Rectangle(this.m_mc, 10, "clickfield");
_local6.setSize(this.m_iWidth - 2, this.m_iHeight - 2);
_local6.setDrawOffset((-(this.m_iWidth - 2)) / 2, (-(this.m_iHeight - 2)) / 2);
_local6.setPosition(((this.m_iWidth - 2) / 2) + 1, ((this.m_iHeight - 2) / 2) + 1);
_local6.setLineStyle(0);
_local6.setFillStyle(org.webminster.caco3.Shape.SIMPLE, [11184810], [0]);
_local6.draw().useHandCursor = false;
var _local7 = new org.webminster.caco3.Rectangle(this.m_mc, 8, "bg1");
_local7.setSize(this.m_iWidth - 2, this.m_iHeight - 3);
_local7.setRadii(this.m_iR2_tl, this.m_iR2_tr, this.m_iR2_br, this.m_iR2_bl);
_local7.setDrawOffset((-(this.m_iWidth - 2)) / 2, (-(this.m_iHeight - 2)) / 2);
_local7.setPosition(((this.m_iWidth - 2) / 2) + 1, ((this.m_iHeight - 2) / 2) + 2);
_local7.setLineStyle(0);
_local7.setFillStyle(org.webminster.caco3.Shape.LINEAR, [11974326, 13355979], [100, 100], [0, 255], {matrixType:"box", x:((-(this.m_iWidth - 2)) / 2) + 1, y:((-(this.m_iHeight - 2)) / 2) + 2, w:this.m_iWidth - 2, h:this.m_iHeight - 3, r:(90 / 180) * Math.PI});
_local7.draw()._visible = false;
var _local8 = new org.webminster.caco3.Rectangle(this.m_mc, 9, "bg2");
_local8.setSize(this.m_iWidth - 2, this.m_iHeight - 3);
_local8.setRadii(this.m_iR2_tl, this.m_iR2_tr, this.m_iR2_br, this.m_iR2_bl);
_local8.setDrawOffset((-(this.m_iWidth - 2)) / 2, (-(this.m_iHeight - 2)) / 2);
_local8.setPosition(((this.m_iWidth - 2) / 2) + 1, ((this.m_iHeight - 2) / 2) + 2);
_local8.setLineStyle(0);
_local8.setFillStyle(org.webminster.caco3.Shape.LINEAR, [13355979, 11974326], [100, 100], [0, 255], {matrixType:"box", x:((-(this.m_iWidth - 2)) / 2) + 1, y:((-(this.m_iHeight - 2)) / 2) + 2, w:this.m_iWidth - 2, h:this.m_iHeight - 3, r:(90 / 180) * Math.PI});
_local8.draw()._visible = true;
this.m_icon.setPosition(this.m_iWidth / 2, this.m_iHeight / 2);
this.m_icon.draw(this.m_mc, 20, "icon");
this.m_mc.clickfield.onPress = com.dynamicflash.utils.Delegate.create(this, this.press);
this.m_mc.clickfield.onRelease = com.dynamicflash.utils.Delegate.create(this, this.release);
this.m_mc.clickfield.onReleaseOutside = com.dynamicflash.utils.Delegate.create(this, this.release);
};
_local1.setIcon = function (icon) {
this.m_icon = icon;
};
_local1.setRadii = function (tl, tr, br, bl) {
if (tl != null) {
this.m_iR1_tl = tl;
if ((tl - 1) > 0) {
this.m_iR2_tl = tl - 1;
}
}
if (tr != null) {
this.m_iR1_tr = tr;
if ((tr - 1) > 0) {
this.m_iR2_tr = tr - 1;
}
}
if (br != null) {
this.m_iR1_br = br;
if ((br - 1) > 0) {
this.m_iR2_br = br - 1;
}
}
if (bl != null) {
this.m_iR1_bl = bl;
if ((bl - 1) > 0) {
this.m_iR2_bl = bl - 1;
}
}
};
_local1.press = function () {
this.m_mc.bg1._visible = true;
this.m_mc.bg2._visible = false;
this.m_icon.getDrawingMovieClip()._y++;
super.press();
};
_local1.release = function () {
this.m_mc.bg1._visible = false;
this.m_mc.bg2._visible = true;
this.m_icon.getDrawingMovieClip()._y--;
super.release();
};
ASSetPropFlags(_local1, null, 1);
}
#endinitclip
Symbol 36 MovieClip [__Packages.org.webminster.vanadium.gui.VBackground] Frame 0
#initclip
if (!org.webminster.vanadium.gui.VBackground) {
if (!org) {
_global.org = new Object();
}
if (!org.webminster) {
_global.org.webminster = new Object();
}
if (!org.webminster.vanadium) {
_global.org.webminster.vanadium = new Object();
}
if (!org.webminster.vanadium.gui) {
_global.org.webminster.vanadium.gui = new Object();
}
((_global.org.webminster.vanadium.gui.VBackground = function (mc, level, name) {
super(mc, level, name);
this.m_iWidth = 240;
this.m_iHeight = 64;
this.m_iR1_tl = 0;
this.m_iR1_tr = 0;
this.m_iR1_br = 0;
this.m_iR1_bl = 0;
this.m_iR2_tl = 0;
this.m_iR2_tr = 0;
this.m_iR2_br = 0;
this.m_iR2_bl = 0;
this.m_bBorder = true;
})).prototype.__proto__ = org.webminster.vanadium.gui.VElement.prototype;
(_global.org.webminster.vanadium.gui.VBackground /* register */).prototype.__constructor__ = org.webminster.vanadium.gui.VElement;
var _local1 = (_global.org.webminster.vanadium.gui.VBackground /* register */).prototype;
_local1.draw = function () {
super.draw();
var _local3 = this.m_iWidth;
var _local4 = this.m_iHeight;
var _local5 = new org.webminster.caco3.Rectangle(this.m_mc, 1);
_local5.setSize(_local3, _local4);
_local5.setRadius(4);
_local5.setLineStyle(0);
_local5.setFillStyle(org.webminster.caco3.Shape.SIMPLE, [6710886]);
_local5.draw();
var _local6 = new org.webminster.caco3.Rectangle(this.m_mc, 2);
_local6.setSize(_local3 - 2, _local4 - 2);
_local6.setRadius(3);
_local6.setPosition(1, 1);
_local6.setLineStyle(0);
_local6.setFillStyle(org.webminster.caco3.Shape.LINEAR, [15329769, 10526880], [100, 100], [0, 255], {matrixType:"box", x:0, y:0, w:1, h:_local4 - 2, r:(90 / 180) * Math.PI});
_local6.draw();
var _local7 = new org.webminster.caco3.Rectangle(this.m_mc, 3);
_local7.setSize(_local3 - 4, _local4 - 4);
_local7.setRadius(2);
_local7.setPosition(2, 2);
_local7.setLineStyle(0);
_local7.setFillStyle(org.webminster.caco3.Shape.LINEAR, [14540253, 12303291], [100, 100], [0, 255], {matrixType:"box", x:0, y:0, w:1, h:_local4 - 4, r:(90 / 180) * Math.PI});
_local7.draw();
};
_local1.showBorder = function (b) {
this.m_bBorder = b;
};
_local1.showOffset = function (b) {
this.m_bOffset = b;
};
_local1.setRaduis = function (r) {
this.setRadii(r, r, r, r);
};
_local1.setRadii = function (tl, tr, br, bl) {
if (tl != null) {
this.m_iR1_tl = tl;
if ((tl - 1) > 0) {
this.m_iR2_tl = tl - 1;
}
}
if (tr != null) {
this.m_iR1_tr = tr;
if ((tr - 1) > 0) {
this.m_iR2_tr = tr - 1;
}
}
if (br != null) {
this.m_iR1_br = br;
if ((br - 1) > 0) {
this.m_iR2_br = br - 1;
}
}
if (bl != null) {
this.m_iR1_bl = bl;
if ((bl - 1) > 0) {
this.m_iR2_bl = bl - 1;
}
}
};
ASSetPropFlags(_local1, null, 1);
}
#endinitclip
Symbol 37 MovieClip [__Packages.org.webminster.vanadium.model.IEntry] Frame 0
class org.webminster.vanadium.model.IEntry
{
function IEntry () {
}
}
Symbol 38 MovieClip [__Packages.com.dynamicflash.utils.Delegate] Frame 0
class com.dynamicflash.utils.Delegate
{
function Delegate () {
}
static function create(target, handler) {
var _local4 = arguments.slice(2);
var _local5 = function () {
var _local2 = arguments.callee;
var _local3 = arguments.concat(_local2.extraArgs, [_local2]);
return(_local2.handler.apply(_local2.target, _local3));
};
_local5.extraArgs = _local4;
_local5.handler = handler;
_local5.target = target;
return(_local5);
}
}
Symbol 39 MovieClip [__Packages.org.webminster.caco3.Drawer] Frame 0
class org.webminster.caco3.Drawer
{
static var m_theOneDrawer;
function Drawer () {
}
static function getInstance() {
if (m_theOneDrawer == null) {
m_theOneDrawer = new org.webminster.caco3.Drawer();
}
return(m_theOneDrawer);
}
function draw(shape, parent_mc, level, name) {
var _local8 = new Array();
var _local9 = 0;
var _local10 = 0;
var _local11 = shape.getDrawOffset().x;
var _local12 = shape.getDrawOffset().y;
if (arguments.length == 0) {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "Draw needs arguments", "org.webminster.caco3.Drawer::draw", "org/webminster/caco3/Drawer.as", 75);
return(null);
}
if (arguments.length == 1) {
var _local6 = createDrawingMovieClip(shape.getMovieClip(), shape.getLevel(), shape.getName());
} else {
var _local6 = createDrawingMovieClip(parent_mc, level, name);
}
var _local13 = shape.getStyle();
var _local7 = shape.getRenderPoints();
if (shape.getNumberOfPoints() > 1) {
if (shape.isClosed()) {
if (_local13.fillType == org.webminster.caco3.Shape.SIMPLE) {
_local6.beginFill(_local13.fillColors[0], _local13.fillAlphas[0]);
} else {
if (_local13.fillType == org.webminster.caco3.Shape.LINEAR) {
var _local14 = "linear";
} else if (_local13.fillType == org.webminster.caco3.Shape.RADIAL) {
var _local14 = "radial";
}
_local6.beginGradientFill(_local14, _local13.fillColors, _local13.fillAlphas, _local13.fillRatios, _local13.fillMatrix);
}
}
if (_local13.lineWidth > 0) {
_local6.lineStyle(_local13.lineWidth, _local13.lineColor, _local13.lineAlpha);
}
var _local15 = 0;
for ( ; _local15 < shape.getNumberOfPoints() ; _local15++) {
_local8.push(_local7[_local15]);
if (((_local15 + 1) == shape.getNumberOfPoints()) || (shape.getPoint(_local15 + 1).getAnchorPoint().startingPoint)) {
_local6.moveTo(_local8[0].getAnchorPoint().x + _local11, _local8[0].getAnchorPoint().y + _local12);
_local9 = _local9 + drawPath(_local6, _local8, shape.isClosed(), _local11, _local12, shape.bezierQuality);
_local10++;
_local8 = new Array();
}
}
if (shape.isClosed()) {
_local6.endFill();
}
if (shape.showControls) {
drawInfo(_local6, shape);
}
} else {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "Shape must consist at least out of 2 Points!", "org.webminster.caco3.Drawer::draw", "org/webminster/caco3/Drawer.as", 158);
}
return(_local6);
}
function createDrawingMovieClip(mc, level, name) {
if (mc == undefined) {
var _local5 = _root;
} else if (level == undefined) {
var _local5 = mc;
} else {
if (name == undefined) {
name = "object" + level;
}
if (mc[name] == null) {
var _local5 = mc.createEmptyMovieClip(name, level);
} else {
var _local5 = mc[name];
}
}
return(_local5);
}
function drawPath(mc, points, closed, xOffset, yOffset, quality) {
var _local8 = points.length - 1;
if (closed) {
_local8++;
if ((points[0].getAnchorPoint().x == points[points.length - 1].getAnchorPoint().x) && ((points[0].getAnchorPoint().y == points[points.length - 1].getAnchorPoint().y) && ((!points[0].getControlPoint2().distance) && (!points[points.length - 1].getControlPoint1().distance)))) {
_local8--;
}
}
var _local10 = 0;
for ( ; _local10 < _local8 ; _local10++) {
if ((_local10 + 1) < points.length) {
var _local9 = _local10 + 1;
} else {
var _local9 = 0;
}
drawSection(mc, points[_local10], points[_local9], xOffset, yOffset, quality);
}
return(_local8);
}
function drawSection(mc, point1, point2, xOffset, yOffset, quality) {
var _local8 = point1.getControlPoint1().distance;
var _local9 = point2.getControlPoint2().distance;
if (_local8 && (_local9)) {
var _local10 = point1.getAnchorPoint().x + xOffset;
var _local11 = point1.getAnchorPoint().y + yOffset;
var _local12 = point1.getControlPoint1().x + xOffset;
var _local13 = point1.getControlPoint1().y + yOffset;
var _local14 = point2.getControlPoint2().x + xOffset;
var _local15 = point2.getControlPoint2().y + yOffset;
var _local16 = point2.getAnchorPoint().x + xOffset;
var _local17 = point2.getAnchorPoint().y + yOffset;
drawCubicBezier2({x:_local10, y:_local11}, {x:_local12, y:_local13}, {x:_local14, y:_local15}, {x:_local16, y:_local17}, mc);
} else if (_local8 || (_local9)) {
if (_local8) {
var _local18 = point1.getControlPoint1().x;
var _local19 = point1.getControlPoint1().y;
}
if (_local9) {
var _local18 = point2.getControlPoint2().x;
var _local19 = point2.getControlPoint2().y;
}
mc.curveTo(_local18 + xOffset, _local19 + yOffset, point2.getAnchorPoint().x + xOffset, point2.getAnchorPoint().y + yOffset);
} else {
mc.lineTo(point2.getAnchorPoint().x + xOffset, point2.getAnchorPoint().y + yOffset);
}
}
function drawCubicBezier2(P0, P1, P2, P3, mc) {
var _local7 = getPointOnSegment(P0, P1, 3 / 4);
var _local8 = getPointOnSegment(P3, P2, 3 / 4);
var _local9 = (P3.x - P0.x) / 16;
var _local10 = (P3.y - P0.y) / 16;
var _local11 = getPointOnSegment(P0, P1, 3 / 8);
var _local12 = getPointOnSegment(_local7, _local8, 3 / 8);
_local12.x = _local12.x - _local9;
_local12.y = _local12.y - _local10;
var _local13 = getPointOnSegment(_local8, _local7, 3 / 8);
_local13.x = _local13.x + _local9;
_local13.y = _local13.y + _local10;
var _local14 = getPointOnSegment(P3, P2, 3 / 8);
var _local15 = getPointOnSegment(_local11, _local12, 0.5);
var _local16 = getPointOnSegment(_local7, _local8, 0.5);
var _local17 = getPointOnSegment(_local13, _local14, 0.5);
mc.curveTo(_local11.x, _local11.y, _local15.x, _local15.y);
mc.curveTo(_local12.x, _local12.y, _local16.x, _local16.y);
mc.curveTo(_local13.x, _local13.y, _local17.x, _local17.y);
mc.curveTo(_local14.x, _local14.y, P3.x, P3.y);
}
static function getPointOnSegment(P0, P1, ratio) {
return({x:P0.x + ((P1.x - P0.x) * ratio), y:P0.y + ((P1.y - P0.y) * ratio)});
}
function drawInfo(mc, shape) {
if ((mc != null) && (shape != null)) {
var _local4 = shape.getDrawOffset().x;
var _local5 = shape.getDrawOffset().y;
var _local6 = 0;
for ( ; _local6 < shape.getNumberOfPoints() ; _local6++) {
var _local7 = shape.getPoint(_local6);
if (_local7.getControlPoint1().distance) {
drawLine(mc, _local7.getAnchorPoint().x + _local4, _local7.getAnchorPoint().y + _local5, _local7.getControlPoint1().x + _local4, _local7.getControlPoint1().y + _local5);
drawRoundDot(mc, _local7.getControlPoint1().x + _local4, _local7.getControlPoint1().y + _local5);
}
if (_local7.getControlPoint2().distance) {
drawLine(mc, _local7.getAnchorPoint().x + _local4, _local7.getAnchorPoint().y + _local5, _local7.getControlPoint2().x + _local4, _local7.getControlPoint2().y + _local5);
drawRoundDot(mc, _local7.getControlPoint2().x + _local4, _local7.getControlPoint2().y + _local5);
}
if (_local7.getAnchorPoint().startingPoint) {
drawDot(mc, _local7.getAnchorPoint().x + _local4, _local7.getAnchorPoint().y + _local5, 16711808);
} else {
drawDot(mc, _local7.getAnchorPoint().x + _local4, _local7.getAnchorPoint().y + _local5, 16711680);
}
}
drawDot(mc, 0, 0, 65280, 3);
if (mc._parent.m_bLinesVisible == null) {
mc._parent.m_bLinesVisible = true;
drawLine(mc._parent, 0, -4096, 0, 4096, 65280, 50);
drawLine(mc._parent, -4096, 0, 4096, 0, 16711680, 50);
}
} else {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "DrawInfo needs Parameters!!!", "org.webminster.caco3.Drawer::drawInfo", "org/webminster/caco3/Drawer.as", 556);
}
}
function drawDot(mc, x, y, color, size) {
if (color == undefined) {
color = 16711680 /* 0xFF0000 */;
}
if (size == undefined) {
size = 2;
}
mc.beginFill(color, 40);
mc.lineStyle(1, color, 1000);
mc.moveTo(x - size, y - size);
mc.lineTo(x + size, y - size);
mc.lineTo(x + size, y + size);
mc.lineTo(x - size, y + size);
mc.endFill();
}
function drawRoundDot(mc, x, y, color, size) {
if (color == undefined) {
color = 255;
}
if (size == undefined) {
size = 2;
}
mc.beginFill(color, 40);
mc.lineStyle(1, color, 100);
mc.moveTo(x, y - size);
mc.curveTo(x + size, y - size, x + size, y);
mc.curveTo(x + size, y + size, x, y + size);
mc.curveTo(x - size, y + size, x - size, y);
mc.curveTo(x - size, y - size, x, y - size);
mc.endFill();
}
function drawLine(mc, x1, y1, x2, y2, color, alpha, size) {
if (color == undefined) {
color = 255;
}
if (alpha == undefined) {
alpha = 50;
}
if (size == undefined) {
size = 1;
}
mc.beginFill(16777215, 0);
mc.lineStyle(1, color, alpha);
mc.moveTo(x1, y1);
mc.lineTo(x2, y2);
mc.endFill();
}
}
Symbol 40 MovieClip [__Packages.org.webminster.vanadium.gui.VIconDraw] Frame 0
class org.webminster.vanadium.gui.VIconDraw
{
function VIconDraw () {
}
function getPlayIcon() {
var _local2 = new org.webminster.caco3.Shape();
_local2.moveTo(-4, -4);
_local2.lineTo(4, 0);
_local2.lineTo(-4, 4);
_local2.closePath();
setStyle(_local2);
return(_local2);
}
function getPauseIcon() {
var _local2 = new org.webminster.caco3.Shape();
_local2.moveTo(-3, -4);
_local2.lineTo(-1, -4);
_local2.lineTo(-1, 4);
_local2.lineTo(-3, 4);
_local2.moveTo(1, -4);
_local2.lineTo(3, -4);
_local2.lineTo(3, 4);
_local2.lineTo(1, 4);
_local2.closePath();
setStyle(_local2);
return(_local2);
}
function getPreviousIcon() {
var _local2 = new org.webminster.caco3.Shape();
_local2.moveTo(-4, -4);
_local2.lineTo(-2, -4);
_local2.lineTo(-2, 4);
_local2.lineTo(-4, 4);
_local2.moveTo(-2, 0);
_local2.lineTo(4, -4);
_local2.lineTo(4, 4);
_local2.closePath();
setStyle(_local2);
return(_local2);
}
function getNextIcon() {
var _local2 = new org.webminster.caco3.Shape();
_local2.moveTo(4, -4);
_local2.lineTo(2, -4);
_local2.lineTo(2, 4);
_local2.lineTo(4, 4);
_local2.moveTo(2, 0);
_local2.lineTo(-4, -4);
_local2.lineTo(-4, 4);
_local2.closePath();
setStyle(_local2);
return(_local2);
}
function getPlusIcon() {
var _local2 = new org.webminster.caco3.Shape();
_local2.moveTo(-1, -4);
_local2.lineTo(1, -4);
_local2.lineTo(1, -1);
_local2.lineTo(4, -1);
_local2.lineTo(4, 1);
_local2.lineTo(1, 1);
_local2.lineTo(1, 4);
_local2.lineTo(-1, 4);
_local2.lineTo(-1, 1);
_local2.lineTo(-4, 1);
_local2.lineTo(-4, -1);
_local2.lineTo(-1, -1);
_local2.closePath();
setStyle(_local2);
return(_local2);
}
function getMinusIcon() {
var _local2 = new org.webminster.caco3.Shape();
_local2.moveTo(-4, -1);
_local2.lineTo(4, -1);
_local2.lineTo(4, 1);
_local2.lineTo(-4, 1);
_local2.closePath();
setStyle(_local2);
return(_local2);
}
function getInfoIcon() {
var _local2 = new org.webminster.caco3.Shape();
var _local3 = new org.webminster.caco3.Circle();
_local3.setRadius(6);
_local2.addPoints(_local3, -6, -6);
_local3.setRadius(5);
_local2.addPoints(_local3, -5, -5);
_local2.moveTo(-1, -3);
_local2.lineTo(1, -3);
_local2.lineTo(1, -2);
_local2.lineTo(-1, -2);
_local2.moveTo(-1.5, -1);
_local2.lineTo(1, -1);
_local2.lineTo(1, 4);
_local2.lineTo(-1, 4);
_local2.lineTo(-1, 0);
_local2.lineTo(-1.5, 0);
_local2.closePath();
setStyle(_local2);
return(_local2);
}
function setStyle(shape) {
shape.setFillStyle(org.webminster.caco3.Shape.SIMPLE, [0]);
shape.setLineStyle(0);
}
}
Symbol 41 MovieClip [__Packages.org.webminster.utils.Scheduler] Frame 0
class org.webminster.utils.Scheduler
{
var m_OnEnterFrameFuncs, m_iUniqueNum;
function Scheduler () {
m_OnEnterFrameFuncs = new Array();
m_iUniqueNum = 42;
}
static function instance() {
if (null == m_TheInstance) {
m_TheInstance = new org.webminster.utils.Scheduler();
}
return(m_TheInstance);
}
function registerExecutedFunction(fExecutedFunc, iCallCount, sID, iCallFreq) {
var _local6 = false;
if ((sID == "") || ((sID == null) || (sID == undefined))) {
if (iCallCount == -1) {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "RegisterExecutedFunction() called with an undefined sID. A unique ID is created, but iCallCount must not be -1, as those functions will be called forever, but can't be unregistered.", "org.webminster.utils.Scheduler::registerExecutedFunction", "org/webminster/utils/Scheduler.as", 97);
}
sID = ("__uniquw__" + m_iUniqueNum) + "__";
m_iUniqueNum++;
} else {
var _local8 = 0;
for ( ; _local8 < m_OnEnterFrameFuncs.length ; _local8++) {
var _local7 = m_OnEnterFrameFuncs[_local8];
if (_local7.id() == sID) {
_local6 = true;
break;
}
}
}
if (_local6) {
return(undefined);
}
if (undefined == iCallCount) {
iCallCount = 1;
}
if (undefined == iCallFreq) {
iCallFreq = 1;
}
var _local9 = new org.webminster.utils.FunctionCall(fExecutedFunc, sID, iCallCount, iCallFreq);
m_OnEnterFrameFuncs.push(_local9);
traceRegisteredFunctions();
if (m_OnEnterFrameFuncs.length == 1) {
startRepeatedExecution();
}
}
function unregisterExecutedFunction(sID) {
var _local4 = 0;
for ( ; _local4 < m_OnEnterFrameFuncs.length ; _local4++) {
var _local3 = m_OnEnterFrameFuncs[_local4];
if (_local3.id() == sID) {
m_OnEnterFrameFuncs.splice(_local4, 1);
break;
}
}
traceRegisteredFunctions();
if (m_OnEnterFrameFuncs.length == 0) {
stopRepeatedExecution();
}
}
function registeredFunctionCount() {
return(m_OnEnterFrameFuncs.length);
}
function traceRegisteredFunctions() {
var _local2 = "";
var _local3 = 0;
for ( ; _local3 < m_OnEnterFrameFuncs.length ; _local3++) {
_local2 = _local2 + ((((" " + m_OnEnterFrameFuncs[_local3].id()) + "(") + m_OnEnterFrameFuncs[_local3].callFreq()) + ")");
if ((_local3 + 1) < m_OnEnterFrameFuncs.length) {
_local2 = _local2 + ",";
}
}
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.INFO + m_OnEnterFrameFuncs.length) + " functions registered in scheduler:") + _local2, "org.webminster.utils.Scheduler::traceRegisteredFunctions", "org/webminster/utils/Scheduler.as", 182);
}
function executeAll() {
var _local2 = new Array();
_local2 = m_OnEnterFrameFuncs;
var _local3 = new Array();
var _local5 = 0;
for ( ; _local5 < _local2.length ; _local5++) {
var _local4 = _local2[_local5];
if ((_local4.callCount() == 1) || ((_local4.callCount() % _local4.callFreq()) == 0)) {
_local4.func()();
}
_local4.decreaseCallCount();
if (0 == _local4.callCount()) {
_local3.push(_local4);
}
}
var _local6 = 0;
for ( ; _local6 < _local3.length ; _local6++) {
var _local4 = _local3[_local6];
unregisterExecutedFunction(_local4.id());
}
}
function startRepeatedExecution() {
_root.onEnterFrame = com.dynamicflash.utils.Delegate.create(this, executeAll);
}
function stopRepeatedExecution() {
_root.onEnterFrame = null;
}
static var m_TheInstance = null;
}
Symbol 42 MovieClip [__Packages.org.webminster.utils.StringParser] Frame 0
class org.webminster.utils.StringParser
{
var m_aStdTokenDelimiter, m_sSource, m_iCurPos;
function StringParser (sSource) {
ResetString(sSource);
m_aStdTokenDelimiter = new Array();
m_aStdTokenDelimiter.push(" ");
m_aStdTokenDelimiter.push("\t");
m_aStdTokenDelimiter.push("\r");
m_aStdTokenDelimiter.push(newline);
}
function ResetString(sSource) {
m_sSource = sSource;
m_iCurPos = 0;
}
function NextToken(aSpecialTokenDelimiter) {
var _local3 = 0;
var _local4 = 0;
var _local5 = 0;
var _local6 = m_sSource.charAt(m_iCurPos);
var _local7 = new Array();
_local7 = _local7.concat(m_aStdTokenDelimiter);
if ((aSpecialTokenDelimiter != null) && (aSpecialTokenDelimiter != undefined)) {
_local7 = _local7.concat(aSpecialTokenDelimiter);
}
while (IsOneOf(_local6, _local7)) {
m_iCurPos++;
_local6 = m_sSource.charAt(m_iCurPos);
}
if (_local6 == "") {
return("");
}
_local4 = m_iCurPos;
do {
if (!IsNotOneOf(_local6, _local7)) {
break;
}
m_iCurPos++;
_local6 = m_sSource.charAt(m_iCurPos);
} while (_local6 != "");
_local5 = m_iCurPos;
_local3 = _local5 - _local4;
if (_local3 == 0) {
return("");
}
return(m_sSource.substr(_local4, _local3));
}
function IsOneOf(sNeedle, aHaystack) {
var _local4 = 0;
for ( ; _local4 < aHaystack.length ; _local4++) {
if (aHaystack[_local4] == sNeedle) {
return(true);
}
}
return(false);
}
function IsNotOneOf(sNeedle, aHaystack) {
var _local4 = 0;
for ( ; _local4 < aHaystack.length ; _local4++) {
if (aHaystack[_local4] == sNeedle) {
return(false);
}
}
return(true);
}
static function StringReplace(sHaystack, sNeedle, sReplacement) {
var _local5 = sHaystack.split(sNeedle);
return(_local5.join(sReplacement));
}
}
Symbol 43 MovieClip [__Packages.org.webminster.vanadium.remote.RemoteControl] Frame 0
class org.webminster.vanadium.remote.RemoteControl implements org.webminster.utils.IObserver
{
var m_model, m_ctrl, m_sAttachedId, m_iObserverKey;
function RemoteControl () {
m_model = null;
m_ctrl = null;
m_sAttachedId = null;
m_iObserverKey = -1;
}
static function instance() {
if (null == m_TheInstance) {
m_TheInstance = new org.webminster.vanadium.remote.RemoteControl();
}
return(m_TheInstance);
}
function setModel(model) {
m_model = model;
if (m_model.isRemoteActive()) {
org.webminster.utils.Scheduler.instance().registerExecutedFunction(com.dynamicflash.utils.Delegate.create(this, checkRemoteCmd), -1, "checkRemoteCmd");
}
}
function setCtrl(ctrl) {
m_ctrl = ctrl;
}
function notify(iEventType) {
getURL (((("javascript:org.webminster.VanadiumInstances.notifyInstance('" + m_sAttachedId) + "', ") + iEventType) + ")", "_self");
}
function checkRemoteCmd() {
if (m_ctrl == null) {
return(undefined);
}
var _local2 = _root.jsCalled;
var _local3 = _root.jsValue;
if ((_local2 == undefined) && ((_local2 == null) && (_local2 == ""))) {
return(undefined);
}
_root.jsCalled = "";
_root.jsValue = "";
switch (_local2) {
case "play" :
m_ctrl.play();
break;
case "pause" :
m_ctrl.pause();
break;
case "stop" :
m_ctrl.stop();
break;
case "setPosition" :
m_ctrl.setPosition(Number(_local3));
break;
case "setVolume" :
m_ctrl.setVolume(Number(_local3));
break;
case "incVolume" :
m_ctrl.incVolume(Number(_local3));
break;
case "decVolume" :
m_ctrl.decVolume(Number(_local3));
break;
case "next" :
m_ctrl.next();
break;
case "prev" :
m_ctrl.prev();
break;
case "gotoEntry" :
m_ctrl.gotoEntry(Number(_local3));
break;
case "openInfoWindow" :
m_ctrl.openInfoWindow();
break;
case "attachObserver" :
attachObserver(_local3);
break;
case "detachObserver" :
detachObserver(_local3);
break;
}
}
function attachObserver(sId) {
if (null == m_sAttachedId) {
m_sAttachedId = sId;
m_iObserverKey = m_ctrl.attachObserver(this);
}
}
function detachObserver(sId) {
m_sAttachedId = null;
m_ctrl.detachObserver(m_iObserverKey);
}
static var m_TheInstance = null;
}
Symbol 44 MovieClip [__Packages.org.webminster.utils.ObjectLoader] Frame 0
class org.webminster.utils.ObjectLoader
{
var m_bTraceProgress, m_iTimeout, m_iAllowedReconnects, m_iStatusCheckDelay, m_sURLToLoadFrom, m_iStartTime, m_iEndTime, m_bIsLoading, m_bLoadAborted, m_iBytesTotal, m_iBytesLoaded, m_iBytesLoadedLastCheck, m_iLastCheckTimer, m_aDownloadedBytes, m_aDownloadTimes, m_iAverageDownloadRate, m_iLoadCount, m_iLoadedPercentage, m_sLoadError, m_iSetIntervalID, m_eLoadObject, m_LoadedObject, m_ParentMovie, m_iMCLevel, m_fCallbackFunction;
function ObjectLoader (bTraceProgress) {
m_bTraceProgress = ((bTraceProgress == undefined) ? false : (bTraceProgress));
m_iTimeout = 5000;
m_iAllowedReconnects = 2;
m_iStatusCheckDelay = 200;
init("", null, -1, null);
}
function init(sURL, mc, iMCLevel, fCallback) {
m_sURLToLoadFrom = sURL;
m_iStartTime = 0;
m_iEndTime = 0;
m_bIsLoading = false;
m_bLoadAborted = false;
m_iBytesTotal = 0;
m_iBytesLoaded = 0;
m_iBytesLoadedLastCheck = 0;
m_iLastCheckTimer = 0;
m_aDownloadedBytes = new Array();
m_aDownloadTimes = new Array();
m_iAverageDownloadRate = 0;
m_iLoadCount = 0;
m_iLoadedPercentage = 0;
m_sLoadError = "";
m_iSetIntervalID = -1;
m_eLoadObject = eLoadUnknown;
m_LoadedObject = null;
m_ParentMovie = mc;
m_iMCLevel = iMCLevel;
m_fCallbackFunction = fCallback;
}
function setTimeout(iTimeout) {
m_iTimeout = iTimeout;
}
function setAllowedReconnects(iReconnects) {
m_iAllowedReconnects = iReconnects;
}
function isLoading() {
return(m_bIsLoading);
}
function doneLoadTries() {
return(m_iLoadCount);
}
function loadFromUrl(sURL, fCallback, eLoadObject, mc, iMCLevel) {
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.INFO + "loadFromUrl() called for URL '") + sURL) + "'.", "org.webminster.utils.ObjectLoader::loadFromUrl", "org/webminster/utils/ObjectLoader.as", 192);
init(sURL, mc, iMCLevel, fCallback);
m_bIsLoading = true;
if ((eLoadObject != eLoadUnknown) && ((eLoadObject != undefined) && (eLoadObject != null))) {
m_eLoadObject = eLoadObject;
} else {
var _local7 = org.webminster.utils.Converter.filetype(sURL);
if (_local7 & org.webminster.utils.Converter.eFiletype_COMB_MOVIE) {
m_eLoadObject = eLoadMovie;
} else if (_local7 & org.webminster.utils.Converter.eFiletype_COMB_XML) {
m_eLoadObject = eLoadXML;
} else if (_local7 & org.webminster.utils.Converter.eFiletype_COMB_SOUND) {
m_eLoadObject = eLoadSound;
} else if (_local7 & org.webminster.utils.Converter.eFiletype_VARS) {
m_eLoadObject = eLoadVars;
} else {
m_eLoadObject = eLoadUnknown;
}
}
load();
}
function load() {
m_iStartTime = getTimer();
m_iLoadCount++;
org.webminster.utils.Tracer.trace((((org.webminster.utils.Tracer.INFO + m_iLoadCount) + ". try to load file '") + m_sURLToLoadFrom) + "'.", "org.webminster.utils.ObjectLoader::load", "org/webminster/utils/ObjectLoader.as", 237);
switch (m_eLoadObject) {
case eLoadXML :
loadXMLFromUrl();
m_iSetIntervalID = _global.setInterval(com.dynamicflash.utils.Delegate.create(this, checkLoadFromUrl), m_iStatusCheckDelay);
break;
case eLoadMovie :
if (m_ParentMovie == null) {
m_sLoadError = "Can't load movie if no MovieClip object was passed!";
loadFromUrlFinished();
} else {
loadMovieFromUrl();
m_iSetIntervalID = _global.setInterval(com.dynamicflash.utils.Delegate.create(this, checkLoadFromUrl), m_iStatusCheckDelay);
}
break;
case eLoadSound :
loadSoundFromUrl();
getLoadedSound().stop();
m_iSetIntervalID = _global.setInterval(com.dynamicflash.utils.Delegate.create(this, checkLoadFromUrl), m_iStatusCheckDelay);
break;
case eLoadVars :
loadVarsFromUrl();
m_iSetIntervalID = _global.setInterval(com.dynamicflash.utils.Delegate.create(this, checkLoadFromUrl), m_iStatusCheckDelay);
break;
default :
m_sLoadError = ("Could not determine filetype of file '" + m_sURLToLoadFrom) + "'!";
loadFromUrlFinished();
}
}
function stopLoading() {
m_bLoadAborted = true;
m_aDownloadTimes.splice(0, m_aDownloadTimes.length);
m_aDownloadedBytes.splice(0, m_aDownloadedBytes.length);
m_iAverageDownloadRate = 0;
loadFromUrlFinished();
switch (m_eLoadObject) {
case eLoadXML :
getLoadedXML().onLoad = null;
getLoadedXML().load("");
break;
case eLoadMovie :
getLoadedMovie().unloadMovie();
break;
case eLoadSound :
getLoadedSound().loadSound("", true);
break;
case eLoadVars :
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "Abort of loading of LoadVars not yet supported!", "org.webminster.utils.ObjectLoader::stopLoading", "org/webminster/utils/ObjectLoader.as", 305);
break;
}
}
function loadWasSuccessful() {
return((m_iLoadCount > 0) && (m_sLoadError == ""));
}
function loadWasErrornous() {
return((m_iLoadCount > 0) && (m_sLoadError != ""));
}
function getLoadError() {
return(m_sLoadError);
}
function getLoadedObject() {
return(m_LoadedObject);
}
function getLoadedXML() {
var _local2 = m_LoadedObject;
return(_local2);
}
function getLoadedMovie() {
var _local2 = m_LoadedObject;
return(_local2);
}
function getLoadedSound() {
var _local2 = m_LoadedObject;
return(_local2);
}
function getLoadedVars() {
var _local2 = m_LoadedObject;
return(_local2);
}
function getLoadedBytes() {
updateLoadStatus();
return(m_iBytesLoaded);
}
function getTotalBytes() {
updateLoadStatus();
return(m_iBytesTotal);
}
function getLoadedPercentage() {
if (isLoading()) {
updateLoadStatus();
}
return(m_iLoadedPercentage);
}
function getAverageDownloadRate() {
if (isLoading()) {
return(m_iAverageDownloadRate);
}
}
function getExpectedRestDownloadTime() {
if (0 == m_iAverageDownloadRate) {
return(Number.MAX_VALUE);
}
return((m_iBytesTotal - m_iBytesLoaded) / m_iAverageDownloadRate);
}
function getStartTime() {
return(m_iStartTime);
}
function getEndTime() {
if (isLoading()) {
return(getTimer());
}
return(m_iEndTime);
}
function movieSizeIsKnown() {
var _local2 = getLoadedMovie() != null;
var _local3 = getLoadedMovie()._width > 0;
var _local4 = getLoadedMovie()._height > 0;
return(_local2 && (_local3 && (_local4)));
}
function shallReconnect() {
return(m_iLoadCount < (m_iAllowedReconnects + 1));
}
function loadXMLFromUrl() {
var _local2 = new XML();
_local2.ignoreWhite = true;
_local2.onLoad = com.dynamicflash.utils.Delegate.create(this, onLoadedXml);
_local2.load(m_sURLToLoadFrom);
m_LoadedObject = _local2;
}
function onLoadedXml(success) {
if (success) {
switch (getLoadedXML().status) {
case 0 :
break;
case -2 :
m_sLoadError = "A CDATA section was not properly terminated.";
break;
case -3 :
m_sLoadError = "The XML declaration was not properly terminated.";
break;
case -4 :
m_sLoadError = "The DOCTYPE declaration was not properly terminated.";
break;
case -5 :
m_sLoadError = "A comment was not properly terminated.";
break;
case -6 :
m_sLoadError = "An XML element was malformed.";
break;
case -7 :
m_sLoadError = "Out of memory.";
break;
case -8 :
m_sLoadError = "An attribute value was not properly terminated.";
break;
case -9 :
m_sLoadError = "A start-tag was not matched with an end-tag.";
break;
case -10 :
m_sLoadError = "An end-tag was encountered without a matching start-tag.";
break;
default :
m_sLoadError = "An unknown error has occurred.";
}
} else {
m_sLoadError = ("Could not load XML file '" + m_sURLToLoadFrom) + "'.";
}
}
function loadMovieFromUrl() {
m_ParentMovie.createEmptyMovieClip("loadedMC", m_iMCLevel);
m_ParentMovie.loadedMC.loadMovie(m_sURLToLoadFrom);
m_LoadedObject = m_ParentMovie.loadedMC;
}
function loadSoundFromUrl() {
var _local2 = new Sound();
_local2.loadSound(m_sURLToLoadFrom, true);
m_LoadedObject = _local2;
}
function loadVarsFromUrl() {
}
function updateLoadStatus() {
if ((m_LoadedObject == null) || (m_LoadedObject == undefined)) {
m_iBytesTotal = 0;
m_iBytesLoaded = 0;
m_iLoadedPercentage = 0;
return(undefined);
}
m_iBytesTotal = m_LoadedObject.getBytesTotal();
m_iBytesLoaded = m_LoadedObject.getBytesLoaded();
m_iLoadedPercentage = (100 * m_iBytesLoaded) / m_iBytesTotal;
if ((m_iBytesTotal == 0) || (m_iBytesTotal == undefined)) {
m_iLoadedPercentage = 0;
}
}
function checkLoadFromUrl() {
updateLoadStatus();
if (m_bTraceProgress && (isLoading())) {
org.webminster.utils.Tracer.trace((((org.webminster.utils.Tracer.INFO + m_iLoadedPercentage.toString(10).substr(0, 4)) + "% of file '") + m_sURLToLoadFrom) + "' loaded.", "org.webminster.utils.ObjectLoader::checkLoadFromUrl", "org/webminster/utils/ObjectLoader.as", 560);
}
if ((m_iLoadedPercentage == 100) && (m_iBytesTotal > 0)) {
if ((m_eLoadObject != eLoadMovie) || (movieSizeIsKnown())) {
loadFromUrlFinished();
}
}
var _local2 = m_iBytesLoaded - m_iBytesLoadedLastCheck;
var _local3 = getTimer();
if (_local2 > 0) {
if (m_aDownloadedBytes.length == (3 * (1000 / m_iStatusCheckDelay))) {
m_aDownloadedBytes.shift();
m_aDownloadTimes.shift();
}
var _local4 = _local2;
var _local5 = _local3 - m_iLastCheckTimer;
var _local6 = m_aDownloadedBytes.length;
if (_local6 > 0) {
var _local7 = m_aDownloadedBytes[_local6 - 1];
var _local8 = m_aDownloadTimes[_local6 - 1];
_local4 = Math.round((_local7 + (2 * _local4)) / 3);
_local5 = Math.round((_local8 + (2 * _local5)) / 3);
}
m_aDownloadedBytes.push(_local4);
m_aDownloadTimes.push(_local5);
m_iAverageDownloadRate = averageByteRate(m_aDownloadedBytes, m_aDownloadTimes);
m_iBytesLoadedLastCheck = m_iBytesLoaded;
m_iLastCheckTimer = _local3;
}
var _local9 = getTimer();
if ((getTimer() > (m_iStartTime + m_iTimeout)) && (m_iLoadedPercentage == 0)) {
if (shallReconnect()) {
_global.clearInterval(m_iSetIntervalID);
org.webminster.utils.Tracer.trace(((((org.webminster.utils.Tracer.WARN + "Loading of file '") + m_sURLToLoadFrom) + "' timed out. Starting ") + (m_iLoadCount + 1)) + ". try.", "org.webminster.utils.ObjectLoader::checkLoadFromUrl", "org/webminster/utils/ObjectLoader.as", 612);
load();
} else {
m_sLoadError = ("Could not load file '" + m_sURLToLoadFrom) + "'. ";
m_sLoadError = m_sLoadError + (((m_iLoadCount + " tries timed out (timeout: ") + m_iTimeout) + "ms).");
loadFromUrlFinished();
}
}
}
function averageByteRate(aBytes, aTimes) {
var _local4 = Math.min(aBytes.length, aTimes.length);
if (_local4 == 0) {
return(0);
}
var _local5 = new Array();
var _local6 = aBytes[0] / aTimes[0];
var _local7 = 0;
var _local8 = 0;
var _local9 = false;
var _local10 = 1;
for ( ; _local10 < _local4 ; _local10++) {
_local7 = aBytes[_local10] / aTimes[_local10];
_local8 = Math.abs(_local7 - _local6);
if (((!_local9) && (_local8 < (0.1 * _local7))) || (_local9 && (_local8 < (0.4 * _local7)))) {
_local5.push(_local7);
_local9 = true;
} else {
_local9 = false;
_local5.splice(0, _local5.length);
}
_local6 = _local7;
}
if (_local5.length < (1 * (1000 / m_iStatusCheckDelay))) {
return(0);
}
return(org.webminster.utils.Misc.sum(_local5) / _local5.length);
}
function loadFromUrlFinished() {
m_bIsLoading = false;
m_iEndTime = getTimer();
_global.clearInterval(m_iSetIntervalID);
if (loadWasSuccessful() && (!m_bLoadAborted)) {
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.INFO + "File '") + m_sURLToLoadFrom) + "' was loaded successfully.", "org.webminster.utils.ObjectLoader::loadFromUrlFinished", "org/webminster/utils/ObjectLoader.as", 679);
} else if (m_bLoadAborted) {
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.INFO + "Load of file '") + m_sURLToLoadFrom) + "' was aborted.", "org.webminster.utils.ObjectLoader::loadFromUrlFinished", "org/webminster/utils/ObjectLoader.as", 683);
} else {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + m_sLoadError, "org.webminster.utils.ObjectLoader::loadFromUrlFinished", "org/webminster/utils/ObjectLoader.as", 687);
}
if (m_fCallbackFunction != null) {
m_fCallbackFunction();
}
}
static var eLoadUnknown = 0;
static var eLoadXML = 1;
static var eLoadMovie = 2;
static var eLoadSound = 3;
static var eLoadVars = 4;
}
Symbol 45 MovieClip [__Packages.org.webminster.vanadium.model.PlaylistEntry] Frame 0
class org.webminster.vanadium.model.PlaylistEntry implements org.webminster.vanadium.model.IEntry
{
var m_pl, m_sUrl, m_iPlaylistPos, m_eFileType, m_iStoredDuration, m_iQuality, m_sTitle, m_sArtist, m_sGenre, m_sAlbum, m_iCDTitleNumber, m_iCDNumber, m_iPublishYear, m_sComment, m_sPictureUrl, m_sInfoUrl, m_iWidth, m_iHeight, m_loader, m_bIsPlaying, m_iPausePosition, m_fPlayFinishedCallback;
function PlaylistEntry (sUrl, pl, iPlaylistPos) {
if (pl == undefined) {
org.webminster.utils.Tracer.trace(org.webminster.utils.Tracer.WARN + "Construct playlist entry with undefined playlist.", "org.webminster.vanadium.model.PlaylistEntry::PlaylistEntry", "org/webminster/vanadium/model/PlaylistEntry.as", 80);
}
m_pl = pl;
m_sUrl = sUrl;
m_iPlaylistPos = iPlaylistPos;
m_eFileType = org.webminster.utils.Converter.filetype(m_sUrl);
if ((isVideo() === false) && (isAudio() === false)) {
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.WARN + "Playlist entry for '") + m_sUrl) + "' created, which is neither audio nor video file.", "org.webminster.vanadium.model.PlaylistEntry::PlaylistEntry", "org/webminster/vanadium/model/PlaylistEntry.as", 89);
}
m_iStoredDuration = 0;
m_iQuality = 0;
m_sTitle = org.webminster.utils.Converter.path2FileName(m_sUrl, true);
m_sArtist = "";
m_sGenre = "";
m_sAlbum = "";
m_iCDTitleNumber = 0;
m_iCDNumber = 0;
m_iPublishYear = 0;
m_sComment = "";
m_sPictureUrl = "";
m_sInfoUrl = "";
m_iWidth = 0;
m_iHeight = 0;
m_loader = new org.webminster.utils.ObjectLoader(false);
m_bIsPlaying = false;
m_iPausePosition = POSITION_UNDEFINED;
m_fPlayFinishedCallback = null;
}
function playlistPos() {
return(m_iPlaylistPos);
}
function isVideo() {
return((m_eFileType & org.webminster.utils.Converter.eFiletype_COMB_MOVIE) != 0);
}
function isAudio() {
return((m_eFileType & org.webminster.utils.Converter.eFiletype_COMB_SOUND) != 0);
}
function isLoading() {
return(m_loader.isLoading());
}
function isPaused() {
return((!m_bIsPlaying) && (m_iPausePosition != POSITION_UNDEFINED));
}
function isStopped() {
return((!m_bIsPlaying) && (m_iPausePosition == POSITION_UNDEFINED));
}
function canBeLoaded() {
return((!isLoading()) && ((m_loader.getLoadedPercentage() < 100) && (!m_loader.loadWasErrornous())));
}
function loadWasSuccessful() {
return(m_loader.loadWasSuccessful());
}
function loadWasErrornous() {
return(m_loader.loadWasErrornous());
}
function load(fCallback) {
m_pl.setCurLoadedEntryPos(m_iPlaylistPos);
if (isAudio()) {
m_loader.loadFromUrl(m_sUrl, fCallback, org.webminster.utils.ObjectLoader.eLoadUnknown);
org.webminster.utils.Scheduler.instance().registerExecutedFunction(com.dynamicflash.utils.Delegate.create(this, loadID3), -1, sLoadID3);
} else if (isVideo()) {
var _local3 = "ple" + m_iPlaylistPos;
_root.createEmptyMovieClip(_local3, org.webminster.utils.Misc.getNextHighestLevel());
m_loader.loadFromUrl(m_sUrl, fCallback, org.webminster.utils.ObjectLoader.eLoadUnknown, _root[_local3], org.webminster.utils.Misc.getNextHighestLevel());
org.webminster.utils.Scheduler.instance().registerExecutedFunction(com.dynamicflash.utils.Delegate.create(this, checkMovieData), -1, sCheckMovieData);
}
}
function loadID3() {
var _local2 = m_loader.getLoadedSound();
var _local3 = getID3(_local2.id3, "TIT2", "songname");
var _local4 = getID3(_local2.id3, "TPE1", "artist");
var _local5 = getID3(_local2.id3, "TCON", "genre");
var _local6 = getID3(_local2.id3, "TALB", "album");
var _local7 = Number(getID3(_local2.id3, "TRCK", "track"));
var _local8 = Number(getID3(_local2.id3, "TPOS", ""));
var _local9 = Number(getID3(_local2.id3, "TYER", "year"));
var _local10 = getID3(_local2.id3, "COMM", "comment");
if ((_local3.length > 0) || ((_local4.length > 0) || ((_local5.length > 0) || ((_local6.length > 0) || ((_local10.length > 0) || ((!_global.isNaN(_local7)) || ((!_global.isNaN(_local8)) || (!_global.isNaN(_local9))))))))) {
setTitle(_local3);
setArtist(_local4);
setGenre(_local5);
setAlbumName(_local6);
setComment(_local10);
setCDTitleNumber(_local7);
setCDNumber(_local8);
setPublishYear(_local9);
org.webminster.vanadium.controller.CoreController.instance().notifyAll(org.webminster.vanadium.model.PlayerDefines.FILE_INFO_CHANGED);
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(sLoadID3);
}
}
function checkMovieData() {
var _local2 = m_loader.getLoadedMovie();
_local2._visible = false;
if ((_local2 == null) || (_local2 == undefined)) {
org.webminster.utils.Tracer.trace(((org.webminster.utils.Tracer.WARN + "checkMovieData() called for no movie entry: '") + m_sUrl) + "'", "org.webminster.vanadium.model.PlaylistEntry::checkMovieData", "org/webminster/vanadium/model/PlaylistEntry.as", 243);
return(undefined);
}
if (_local2._framesloaded > 0) {
m_iWidth = _local2._width;
m_iHeight = _local2._height;
_local2.gotoAndStop(2);
if (!hasValidSize()) {
if (!m_loader.isLoading()) {
org.webminster.utils.Tracer.trace(((((org.webminster.utils.Tracer.WARN + "Undefined size of first frame of movie clip (w,h) = (") + m_iWidth) + ",") + m_iHeight) + ")", "org.webminster.vanadium.model.PlaylistEntry::checkMovieData", "org/webminster/vanadium/model/PlaylistEntry.as", 258);
}
} else {
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(sCheckMovieData);
}
}
}
function getID3(id3, sv2Key, sv1Key) {
if ((sv2Key != "") && ((id3[sv2Key] != null) && ((id3[sv2Key] != undefined) && (id3[sv2Key].length > 0)))) {
return(id3[sv2Key]);
}
if ((sv1Key != "") && ((id3[sv1Key] != null) && ((id3[sv1Key] != undefined) && (id3[sv1Key].length > 0)))) {
return(id3[sv1Key]);
}
return("");
}
function stopLoading() {
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(sLoadID3);
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(sCheckMovieData);
m_pl.setCurLoadedEntryPos(org.webminster.vanadium.model.Playlist.ENTRY_NUM_UNDEFINED);
m_iHeight = 0;
m_iWidth = 0;
m_loader.stopLoading();
}
function getDownloadTime() {
var _local2 = m_loader.getEndTime() - m_loader.getStartTime();
return(_local2);
}
function getLength() {
if (isAudio()) {
if ((m_loader.doneLoadTries() < 1) || (m_loader.loadWasErrornous())) {
return(m_iStoredDuration);
}
if (m_loader.isLoading()) {
return(loadStatus().iExpPT);
}
return(m_loader.getLoadedSound().duration);
}
if (isVideo()) {
return(org.webminster.vanadium.model.PlayerDefines.frames2ms(m_loader.getLoadedMovie()._totalframes));
}
return(0);
}
function setStoredDuration(iDuration) {
m_iStoredDuration = iDuration;
}
function getLoadedLength() {
if (isAudio()) {
return(m_loader.getLoadedSound().duration);
}
if (isVideo()) {
return(org.webminster.vanadium.model.PlayerDefines.frames2ms(m_loader.getLoadedMovie()._framesloaded));
}
return(0);
}
function getPosition() {
if (isPaused()) {
return(m_iPausePosition);
}
if (isStopped()) {
return(0);
}
if (isAudio()) {
return(m_loader.getLoadedSound().position);
}
if (isVideo()) {
return(org.webminster.vanadium.model.PlayerDefines.frames2ms(m_loader.getLoadedMovie()._currentframe));
}
return(0);
}
function setPosition(iPos) {
org.webminster.utils.Tracer.trace((org.webminster.utils.Tracer.INFO + "setPosition() called with ") + iPos, "org.webminster.vanadium.model.PlaylistEntry::setPosition", "org/webminster/vanadium/model/PlaylistEntry.as", 407);
if (isStopped()) {
return(undefined);
}
if (isPaused()) {
m_iPausePosition = iPos;
if (isVideo()) {
m_loader.getLoadedMovie().gotoAndStop(org.webminster.vanadium.model.PlayerDefines.ms2frames(iPos));
}
return(undefined);
}
if (isAudio()) {
m_loader.getLoadedSound().stop();
m_loader.getLoadedSound().start(iPos / 1000);
} else if (isVideo()) {
var _local3 = org.webminster.vanadium.model.PlayerDefines.ms2frames(iPos);
m_loader.getLoadedMovie().gotoAndPlay(_local3);
}
}
function asSound() {
if (isAudio()) {
return(m_loader.getLoadedSound());
}
if (isVideo()) {
return(new Sound(m_loader.getLoadedMovie()));
}
return(null);
}
function setVolume(iAmount) {
if (iAmount > 100) {
iAmount = 100;
} else if (iAmount < 0) {
iAmount = 0;
}
var _local3 = asSound();
if (null != _local3) {
_local3.setVolume(iAmount);
}
org.webminster.utils.Tracer.trace((org.webminster.utils.Tracer.INFO + "Set volume of sound to ") + iAmount, "org.webminster.vanadium.model.PlaylistEntry::setVolume", "org/webminster/vanadium/model/PlaylistEntry.as", 464);
}
function getVolume() {
var _local2 = asSound();
if (null != _local2) {
return(_local2.getVolume());
}
return(0);
}
function loadStatus() {
var _local2 = m_loader.getLoadedPercentage();
var _local3 = getDownloadTime();
var _local4 = _local2 / 100;
var _local5 = m_loader.getExpectedRestDownloadTime();
var _local6 = _local5 + _local3;
var _local7 = getLoadedLength();
var _local8 = 0;
if (m_loader.isLoading() && (isAudio())) {
var _local9 = ((getLoadedSize() / m_loader.getLoadedSound().duration) * 8) - 3.5;
var _local10 = 0;
if (_global.isNaN(_local9)) {
_local9 = 0;
}
if (_local9 < 52) {
_local10 = 1.116;
m_iQuality = 32;
} else if (_local9 < 84) {
_local10 = 1.062;
m_iQuality = 64;
} else if (_local9 < 116) {
_local10 = 1.038;
m_iQuality = 96;
} else if (_local9 < 148) {
_local10 = 1.028;
m_iQuality = 128;
} else if (_local9 < 180) {
_local10 = 1.024;
m_iQuality = 160;
} else if (_local9 < 212) {
_local10 = 1.02;
m_iQuality = 192;
} else if (_local9 < 276) {
_local10 = 1.017;
m_iQuality = 256;
} else if (_local9 >= 276) {
_local10 = 1.014;
m_iQuality = 320;
}
if (_local4 != 0) {
_local8 = (_local7 * _local10) / _local4;
}
} else if (m_loader.isLoading() && (isVideo())) {
_local8 = m_loader.getLoadedMovie()._totalframes / org.webminster.vanadium.model.PlayerDefines.PLAYER_FPS;
}
return({iPerc:_local2, iCurDT:_local3, iExpDT:_local6, iRestDT:_local5, iCurPT:_local7, iExpPT:_local8});
}
function traceLoadStatus() {
var _local2 = loadStatus();
var _local3 = org.webminster.utils.Converter.milliSec2Time(_local2.iCurPT);
var _local4 = org.webminster.utils.Converter.milliSec2Time(_local2.iExpPT);
var _local5 = org.webminster.utils.Converter.milliSec2Time(_local2.iCurDT);
var _local6 = org.webminster.utils.Converter.milliSec2Time(_local2.iRestDT);
}
function isPlaying() {
return(m_bIsPlaying);
}
function play(fFinishedCallback) {
var _local3 = 0;
m_fPlayFinishedCallback = fFinishedCallback;
if (isPlaying()) {
return(undefined);
}
if (isPaused()) {
_local3 = m_iPausePosition;
m_iPausePosition = POSITION_UNDEFINED;
} else {
setVolume(org.webminster.vanadium.model.CoreModel.instance().getVolume());
}
m_bIsPlaying = true;
if (isAudio()) {
var _local4 = m_loader.getLoadedSound();
_local4.onSoundComplete = com.dynamicflash.utils.Delegate.create(this, playFinished);
_local4.start(_local3 / 1000);
} else if (isVideo()) {
org.webminster.utils.Scheduler.instance().registerExecutedFunction(com.dynamicflash.utils.Delegate.create(this, checkMovieFinished), -1, sCheckMovieFinished);
var _local5 = org.webminster.vanadium.model.PlayerDefines.ms2frames(m_iPausePosition);
if (_local5 < 2) {
_local5 = 2;
}
m_loader.getLoadedMovie().gotoAndPlay(_local5);
} else {
m_bIsPlaying = false;
}
}
function playFinished() {
m_bIsPlaying = false;
if (m_fPlayFinishedCallback) {
m_fPlayFinishedCallback();
}
}
function checkMovieFinished() {
if (!isVideo()) {
return(undefined);
}
if (getLength() == getPosition()) {
playFinished();
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(sCheckMovieFinished);
}
}
function pause() {
m_iPausePosition = getPosition();
m_bIsPlaying = false;
m_loader.getLoadedObject().stop();
}
function stop() {
m_bIsPlaying = false;
m_iPausePosition = POSITION_UNDEFINED;
if (isAudio()) {
m_loader.getLoadedSound().stop();
} else {
m_loader.getLoadedMovie().gotoAndStop(1);
}
org.webminster.utils.Scheduler.instance().unregisterExecutedFunction(sCheckMovieFinished);
}
function getTitle() {
return(m_sTitle);
}
function setTitle(sTitle) {
if (sTitle.length > 0) {
m_sTitle = sTitle;
}
}
function getArtist() {
return(m_sArtist);
}
function setArtist(sArtist) {
if (sArtist.length > 0) {
m_sArtist = sArtist;
}
}
function getGenre() {
return(m_sGenre);
}
function setGenre(sGenre) {
if (sGenre.length > 0) {
m_sGenre = sGenre;
}
}
function getAlbumName() {
return(m_sAlbum);
}
function setAlbumName(sAlbum) {
if (sAlbum.length > 0) {
m_sAlbum = sAlbum;
}
}
function getCDTitleNumber() {
return(m_iCDTitleNumber);
}
function setCDTitleNumber(iCDTitleNumber) {
m_iCDTitleNumber = iCDTitleNumber;
}
function getCDNumber() {
return(m_iCDNumber);
}
function setCDNumber(iCDNumber) {
m_iCDNumber = iCDNumber;
}
function getPublishYear() {
return(m_iPublishYear);
}
function setPublishYear(iPublishYear) {
m_iPublishYear = iPublishYear;
}
function getComment() {
return(m_sComment);
}
function setComment(sComment) {
if (sComment.length > 0) {
m_sComment = sComment;
}
}
function getPictureUrl() {
return(m_sPictureUrl);
}
function setPictureUrl(sPictureUrl) {
if (sPictureUrl.length > 0) {
m_sPictureUrl = sPictureUrl;
}
}
function getInfoUrl() {
return(m_sInfoUrl);
}
function setInfoUrl(sInfoUrl) {
if (sInfoUrl.length > 0) {
m_sInfoUrl = sInfoUrl;
}
}
function getWidth() {
return(m_iWidth);
}
function getHeight() {
return(m_iHeight);
}
function hasValidSize() {
return((m_iHeight > 0) && (m_iWidth > 0));
}
function getFileUrl() {
return(m_sUrl);
}
function getSize() {
return(m_loader.getTotalBytes());
}
function getLoadedSize() {
return(m_loader.getLoadedBytes());
}
function getQuality() {
if (isAudio()) {
return(m_iQuality);
}
return(0);
}
function getEntryType() {
if (isAudio()) {
return(1);
}
if (isVideo()) {
return(2);
}
return(3);
}
function getMovieClip() {
if ((!isVideo()) || (m_loader.loadWasErrornous())) {
return(null);
}
return(m_loader.getLoadedMovie());
}
static var sLoadID3 = "loadID3";
static var sCheckMovieData = "checkMovieData";
static var sCheckMovieFinished = "checkMovieFinished";
static var POSITION_UNDEFINED = -1;
}
Symbol 46 MovieClip [__Packages.com.dynamicflash.utils.HashMap] Frame 0
class com.dynamicflash.utils.HashMap
{
var o;
function HashMap () {
o = new Object();
}
function put(key, value) {
o[key] = value;
}
function get(key) {
return(o[key]);
}
function getAll() {
var _local2 = new Array();
for (var i in o) {
_local2.push(o[i]);
}
return(_local2);
}
function containsKey(key) {
return(o[key] != null);
}
function containsValue(value) {
var _local3 = false;
do {
if ((in o) == null) {
break;
}
var i = (in o);
_local3 = o[i] == value;
} while (!_local3);
do {
} while ("containsValue" != null);
return(_local3);
}
function isEmpty() {
var _local2 = true;
for (var i in o) {
_local2 = false;
break;
}
return(_local2);
}
function remove(key) {
delete o[key];
}
function size() {
var _local2 = 0;
for (var i in o) {
_local2++;
}
return(_local2);
}
function clear() {
o = new Object();
}
}
Symbol 47 MovieClip [__Packages.org.webminster.utils.Converter] Frame 0
class org.webminster.utils.Converter
{
function Converter () {
}
static function isTrue(sBool) {
if (sBool == "1") {
return(true);
}
var _local3 = sBool.toLowerCase();
if ((_local3 == "yes") || (_local3 == "true")) {
return(true);
}
return(false);
}
static function isFalse(sBool) {
if (sBool == "0") {
return(true);
}
var _local3 = sBool.toLowerCase();
if ((_local3 == "no") || (_local3 == "false")) {
return(true);
}
return(false);
}
static function varToString(obj) {
if ((obj == null) || (obj == undefined)) {
return("");
}
return(obj.toString());
}
static function path2FileName(sPath, bCutFileExtension) {
var _local4 = new Array();
var _local5 = sPath.indexOf("/") != -1;
var _local6 = sPath.indexOf("\\") != -1;
if (_local5) {
_local4 = sPath.split("/");
} else if (_local6) {
_local4 = sPath.split("\\");
}
if (_local4.length == 0) {
return("");
}
var _local7 = String(_local4.pop());
if (_local7.length == 0) {
return("");
}
var _local8 = _local7.lastIndexOf(".");
if ((_local8 == -1) || (!bCutFileExtension)) {
return(_local7);
}
var _local9 = _local7.slice(0, _local8);
return(_local9);
}
static function completeDir(sDir) {
var _local3 = org.webminster.utils.StringParser.StringReplace(sDir, "\\", "/");
if (_local3.charAt(_local3.length - 1) != "/") {
_local3 = _local3 + "/";
}
return(_local3);
}
static function filetype(sFilename) {
if ((sFilename == "") || (sFilename == null)) {
return(eFiletype_Unknown);
}
var _local3 = sFilename.toLowerCase().substr(sFilename.lastIndexOf(".") + 1);
switch (_local3) {
case "swf" :
return(eFiletype_SWF);
case "jpg" :
case "jpe" :
case "jpeg" :
return(eFiletype_JPG);
case "wpl" :
return(eFiletype_WPL);
case "xspf" :
return(eFiletype_XSPF);
case "xml" :
return(eFiletype_XML);
case "mp3" :
return(eFiletype_MP3);
}
return(eFiletype_Unknown);
}
static function milliSec2Time(iMilliSec) {
var _local3 = "";
var _local4 = Math.floor(iMilliSec / 1000);
var _local5 = Math.floor(_local4 / 3600);
_local4 = _local4 % 3600;
var _local6 = Math.floor(_local4 / 60);
var _local7 = _local4 % 60;
if (_local5 > 99) {
_local5 = 99;
_local6 = 99;
_local7 = 99;
}
if (_local5 > 0) {
_local3 = _local3 + (("" + _local5) + ":");
}
if (_local6 == 0) {
if (_local3 != "") {
_local3 = _local3 + "00:";
} else {
_local3 = _local3 + "0:";
}
}
if (_local6 > 0) {
if ((_local6 < 10) && (_local3 != "")) {
_local3 = _local3 + "0";
}
_local3 = _local3 + (_local6 + ":");
}
if ((_local7 == 0) && (_local3 != "")) {
_local3 = _local3 + "00";
}
if (_local7 > 0) {
if ((_local7 < 10) && (_local3 != "")) {
_local3 = _local3 + "0";
}
_local3 = _local3 + (_local7 + "");
}
return(_local3);
}
static var eFiletype_Unknown = 0;
static var eFiletype_SWF = 1;
static var eFiletype_JPG = 2;
static var eFiletype_COMB_MOVIE = eFiletype_SWF | eFiletype_JPG;
static var eFiletype_XML = 4;
static var eFiletype_WPL = 8;
static var eFiletype_COMB_WPL = eFiletype_XML | eFiletype_WPL;
static var eFiletype_XSPF = 16;
static var eFiletype_COMB_XML = (eFiletype_XML | eFiletype_WPL) | eFiletype_XSPF;
static var eFiletype_COMB_PLAYLIST = eFiletype_COMB_WPL | eFiletype_XSPF;
static var eFiletype_MP3 = 32;
static var eFiletype_COMB_SOUND = eFiletype_MP3;
static var eFiletype_VARS = 64;
}
Symbol 48 MovieClip [__Packages.org.webminster.vanadium.model.Defines] Frame 0
class org.webminster.vanadium.model.Defines
{
function Defines () {
}
static function MayPlayerRun() {
var _local2 = false;
var _local3 = new Date();
var _local4 = _local3.getUTCFullYear();
var _local5 = _local3.getUTCMonth() + 1;
if (runsUnlimited || ((_local4 < runsUntilYear) || ((_local5 <= runsUntilMonth) && (_local4 == runsUntilYear)))) {
if (officialRelease || ((_root._url.substr(0, 6) == "file:/") || (_root._url.substr(0, 36) == "http://test.vanadium.webminster.org/"))) {
_local2 = true;
}
}
return(_local2);
}
static function getPlayerVersion() {
return(VERSION);
}
static function getPlayerLanguage() {
return(LANGUAGE);
}
static function getPlayerDate() {
return(DATE);
}
static function getPlayerDateStr() {
return(DATE_STR);
}
static function getPlayerName() {
return(NAME);
}
static var VERSION = "2.5b3";
static var LANGUAGE = "EN";
static var DATE = "20081230";
static var DATE_STR = "2008/12/30";
static var NAME = "WebMinster WebPlayer";
static var officialRelease = true;
static var runsUnlimited = false;
static var runsUntilMonth = 6;
static var runsUntilYear = 2009;
static var PRELOADER_TIMEOUT = 2000;
static var INFO_URL = ((((((((((((("javascript:VanadiumInfoWindow=window.open(\"http://info.vanadium.webminster.org/v2.0/?version=" + getPlayerVersion()) + "&language=") + getPlayerLanguage()) + "&date=") + getPlayerDate()) + "&os=") + System.capabilities.os) + "&flashversion=") + getVersion()) + "\",\"VanadiumInfoWindow\",\"width=400,height=300,left=") + ((System.capabilities.screenResolutionX / 2) - 204)) + ",top=") + (((System.capabilities.screenResolutionY / 2) - 150) - Math.round((System.capabilities.screenResolutionY - 300) * 0.1))) + ",toolbar=no,status=no,resizable=no,menubar=no,location=no,dependent=yes\"); void(0);";
static var PLAYER_WIDTH = 240;
static var PLAYER_HEIGHT = 64;
}
Symbol 49 MovieClip [__Packages.org.webminster.vanadium.model.PlayerDefines] Frame 0
#initclip
if (!org.webminster.vanadium.model.PlayerDefines) {
if (!org) {
_global.org = new Object();
}
if (!org.webminster) {
_global.org.webminster = new Object();
}
if (!org.webminster.vanadium) {
_global.org.webminster.vanadium = new Object();
}
if (!org.webminster.vanadium.model) {
_global.org.webminster.vanadium.model = new Object();
}
((_global.org.webminster.vanadium.model.PlayerDefines = function () {
super();
})).prototype.__proto__ = org.webminster.vanadium.model.Defines.prototype;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).prototype.__constructor__ = org.webminster.vanadium.model.Defines;
var _local1 = (_global.org.webminster.vanadium.model.PlayerDefines /* register */).prototype;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).ms2frames = function (iMS) {
return(Math.floor((iMS * org.webminster.vanadium.model.PlayerDefines.PLAYER_FPS) / 1000));
};
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).frames2ms = function (iFrames) {
return((iFrames * 1000) / org.webminster.vanadium.model.PlayerDefines.PLAYER_FPS);
};
ASSetPropFlags(_local1, null, 1);
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).PLAYER_FPS = 30;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).PLAYTIME_DOWNLOAD_BUFFER = 1000;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).INITIAL_VOLUME = 80;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).RANDOM_LOOP_REPEAT = 10;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).GUI_EVENT_MOVED = 1;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).GUI_EVENT_PRESSED = 2;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).GUI_EVENT_RELEASED = 3;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).GUI_EVENT_ROLL_OUT = 4;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).GUI_EVENT_ROLL_OVER = 5;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).LOAD_STATUS_CHANGED = 1;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).GLOBAL_STATE_CHANGED = 2;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).LOADER_STATE_CHANGED = 3;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).POSITION_CHANGED = 4;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).CURRENT_ENTRY_CHANGED = 7;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).FILE_INFO_CHANGED = 5;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).PLAYLIST_CHANGED = 6;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).DISPLAY_FILE_INFO = 8;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).DISPLAY_PLAYER_INFO = 9;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).DISPLAY_MOVIE = 10;
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).DOC_TYPE_PLAYLIST = "playlist";
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).XSPF_TITLE = "title";
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).XSPF_TRACKLIST = "trackList";
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).XSPF_TRACK_LOCATION = "location";
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).XSPF_TRACK_TITLE = "title";
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).XSPF_TRACK_CREATOR = "creator";
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).XSPF_TRACK_COMMENT = "annotation";
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).XSPF_TRACK_INFO_URL = "info";
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).XSPF_TRACK_IMAGE_URL = "image";
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).XSPF_TRACK_ALBUM = "album";
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).XSPF_TRACK_TRACK_NUM = "trackNum";
(_global.org.webminster.vanadium.model.PlayerDefines /* register */).XSPF_TRACK_DURATION = "duration";
}
#endinitclip
Symbol 50 MovieClip [__Packages.org.webminster.utils.Misc] Frame 0
class org.webminster.utils.Misc
{
function Misc () {
}
static function getNextHighestLevel() {
return(m_iCurHighestLevel++);
}
static function randRange(min, max) {
var _local4 = Math.round(Math.random() * (max - min)) + min;
return(_local4);
}
static function average(numArray) {
if (numArray.length == 0) {
return(0);
}
return(sum(numArray) / numArray.length);
}
static function sum(numArray) {
var _local3 = 0;
var _local4 = 0;
for ( ; _local4 < numArray.length ; _local4++) {
_local3 = _local3 + numArray[_local4];
}
return(_local3);
}
static var m_iCurHighestLevel = 42;
}
Symbol 12 MovieClip [wp] Frame 1
org.webminster.vanadium.controller.Player.main(this);