#!/usr/bin/perl
# plong.pl by teabag
# creates a pong clone with the SWF::File module
use strict;
use SWF::Element;
use SWF::File;
# gamename
my $gamename = "plong";
# nr. of lives
my $life = 3;
#speed changes after $speedchange hits
my $speedchange = 5;
# speed changes with $speedincrease each time
my $speedincrease = 3;
# framerate, lower is slower
my $framerate = 36;
# generate html pages with the game embedded. Value can be 1 or 0 (def
+ault = 0)
my $genhtml = 0;
# bg color of the html page / this changes the bg of the movie too!
my $htmlcolor = "#33CC00";
# Config ends here
my $tag = "SWF::Element::Tag";
my $element = "SWF::Element";
my $shap = "SWF::Element::SHAPE";
my $actar = "SWF::Element::Array::ACTIONDATAARRAY";
my $shape = "SWF::Element::Array::SHAPERECORDARRAY";
my $shape1 = "SWF::Element::Array::SHAPERECORDARRAY1";
my $shape2 = "SWF::Element::SHAPERECORDn::STRAIGHTEDGERECORD";
my $shape3 = "SWF::Element::SHAPEWITHSTYLE1";
my $curve = "SWF::Element::SHAPERECORDn::CURVEDEDGERECORD";
my $style = "SWF::Element::SHAPERECORD1::STYLECHANGERECORD";
my $defshape = "SWF::Element::Tag::DefineShape";
my $edittext = "SWF::Element::Tag::DefineEditText";
my $rect = "SWF::Element::RECT";
my $rgb = "SWF::Element::RGBA";
my $rgb2 = "SWF::Element::RGB";
my $fillarray = "SWF::Element::Array::FILLSTYLEARRAY1";
my $linearray = "SWF::Element::Array::LINESTYLEARRAY1";
my $fillstyle = "SWF::Element::FILLSTYLE1";
my $linestyle = "SWF::Element::LINESTYLE1";
my $buttonrec = "SWF::Element::Array::BUTTONRECORDARRAY2";
my $buttonarray = "SWF::Element::Array::BUTTONCONDACTIONARRAY";
my $buttonaction = "SWF::Element::BUTTONCONDACTION";
my $buttonrec2 = "SWF::Element::BUTTONRECORD2";
my $defbutton = "SWF::Element::Tag::DefineButton2";
my $matrix = "SWF::Element::MATRIX";
my $actionarray = "SWF::Element::Array::ACTIONRECORDARRAY";
my $goto = "SWF::Element::ACTIONRECORD::ActionGotoFrame";
my $actionrec = "SWF::Element::ACTIONRECORD";
my $actionjump = "SWF::Element::ACTIONRECORD::ActionJump";
my $actionif = "SWF::Element::ACTIONRECORD::ActionIf";
my $actiontarget = "SWF::Element::ACTIONRECORD::ActionSetTarget";
my $actiongoto = "SWF::Element::ACTIONRECORD::ActionGotoLabel";
my $codetable = "SWF::Element::Array::CODETABLE";
my $sprite = "SWF::Element::Tag::DefineSprite";
my $tagarray = "SWF::Element::Array::TAGARRAY";
my $booldata = "SWF::Element::ACTIONDATA::Boolean";
my $glypshape = "SWF::Element::Array::GLYPHSHAPEARRAY2";
my $deffont = "SWF::Element::Tag::DefineFont2";
my $actionpool = "SWF::Element::ACTIONRECORD::ActionConstantPool";
my $actionpush = "SWF::Element::ACTIONRECORD::ActionPush";
my $placeobj = "SWF::Element::Tag::PlaceObject2";
my $showframe = "SWF::Element::Tag::ShowFrame";
my $bg = "SWF::Element::Tag::SetBackgroundColor";
my $doaction = "SWF::Element::Tag::DoAction";
my $removeobj = "SWF::Element::Tag::RemoveObject2";
my $doubleaction = "SWF::Element::ACTIONDATA::Double";
my $stringaction = "SWF::Element::ACTIONDATA::String";
my $framelabel = "SWF::Element::Tag::FrameLabel";
my $definetext = "SWF::Element::Tag::DefineText";
my $textarray = "SWF::Element::Array::TEXTRECORDARRAY1";
my $textrec = "SWF::Element::TEXTRECORD1::TYPE1";
my $textrec2 = "SWF::Element::TEXTRECORD::TYPE0";
my $glyphar = "SWF::Element::Array::GLYPHENTRYARRAY";
my $glyphentry = "SWF::Element::GLYPHENTRY";
my $tagend = "SWF::Element::Tag::End";
my $lookup = "SWF::Element::ACTIONDATA::Lookup";
my $stringar = "SWF::Element::Array::STRINGARRAY";
my $actionint = "SWF::Element::ACTIONDATA::Integer";
my $property = "SWF::Element::ACTIONDATA::Property";
my $new = SWF::File->new("$gamename\.swf");
$new->Version(6);
$new->FrameSize( 0, 0, 15400, 7000 );
$new->FrameRate($framerate);
$bg->new(
BackgroundColor => $rgb2->new(
Red => 51,
Green => 204,
Blue => 0,
),
)->pack($new);
$doaction->new(
Actions => $actionarray->new( [
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$stringaction->new("points"),
$doubleaction->new(0),
] ),
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$stringaction->new("life"),
$actionint->new($life),
] ),
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionrec->new(
Tag => 'ActionEnd',
),
] ),
)->pack($new);
$framelabel->new(
Name => "start",
)->pack($new);
$deffont->new(
FontID => 1,
FontFlags => 4,
LanguageCode => 1,
FontName => "Arial",
GlyphShapeTable => $glypshape->new( [
$shap->new(
ShapeRecords => $shape1->new( [
$style->new(
MoveDeltaX => 195,
MoveDeltaY => -102,
FillStyle1 => 1,
LineStyle => 0,
),
$shape2->new(
DeltaX => 0,
DeltaY => 102,
),
$shape2->new(
DeltaX => -102,
DeltaY => 0,
),
$shape2->new(
DeltaX => 0,
DeltaY => -102,
),
$shape2->new(
DeltaX => 102,
DeltaY => 0,
),
$style->new(
MoveDeltaX => 93,
MoveDeltaY => -428,
),
$shape2->new(
DeltaX => 0,
DeltaY => -103,
),
$shape2->new(
DeltaX => 102,
DeltaY => 0,
),
$shape2->new(
DeltaX => 0,
DeltaY => 103,
),
$shape2->new(
DeltaX => -102,
DeltaY => 0,
),
] ),
),
$shap->new(
ShapeRecords => $shape1->new( [
$style->new(
MoveDeltaX => 282,
MoveDeltaY => -543,
FillStyle1 => 1,
LineStyle => 0,
),
$curve->new(
ControlDeltaX => 87,
ControlDeltaY => 0,
AnchorDeltaX => 55,
AnchorDeltaY => 44,
),
$curve->new(
ControlDeltaX => 55,
ControlDeltaY => 44,
AnchorDeltaX => 15,
AnchorDeltaY => 80,
),
$shape2->new(
DeltaX => -87,
DeltaY => 14,
),
$curve->new(
ControlDeltaX => -13,
ControlDeltaY => -54,
AnchorDeltaX => -31,
AnchorDeltaY => -27,
),
$curve->new(
ControlDeltaX => -32,
ControlDeltaY => -27,
AnchorDeltaX => -45,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => -68,
ControlDeltaY => 0,
AnchorDeltaX => -43,
AnchorDeltaY => 49,
),
$curve->new(
ControlDeltaX => -42,
ControlDeltaY => 49,
AnchorDeltaX => 0,
AnchorDeltaY => 105,
),
$curve->new(
ControlDeltaX => 0,
ControlDeltaY => 107,
AnchorDeltaX => 41,
AnchorDeltaY => 49,
),
$curve->new(
ControlDeltaX => 41,
ControlDeltaY => 48,
AnchorDeltaX => 66,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => 53,
ControlDeltaY => 0,
AnchorDeltaX => 35,
AnchorDeltaY => -32,
),
$curve->new(
ControlDeltaX => 36,
ControlDeltaY => -33,
AnchorDeltaX => 9,
AnchorDeltaY => -67,
),
$shape2->new(
DeltaX => 89,
DeltaY => 11,
),
$curve->new(
ControlDeltaX => -15,
ControlDeltaY => 92,
AnchorDeltaX => -59,
AnchorDeltaY => 52,
),
$curve->new(
ControlDeltaX => -60,
ControlDeltaY => 51,
AnchorDeltaX => -87,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => -109,
ControlDeltaY => 0,
AnchorDeltaX => -66,
AnchorDeltaY => -71,
),
$curve->new(
ControlDeltaX => -67,
ControlDeltaY => -71,
AnchorDeltaX => 0,
AnchorDeltaY => -133,
),
$curve->new(
ControlDeltaX => 0,
ControlDeltaY => -86,
AnchorDeltaX => 29,
AnchorDeltaY => -65,
),
$curve->new(
ControlDeltaX => 28,
ControlDeltaY => -64,
AnchorDeltaX => 59,
AnchorDeltaY => -32,
),
$curve->new(
ControlDeltaX => 58,
ControlDeltaY => -33,
AnchorDeltaX => 68,
AnchorDeltaY => 0,
),
] ),
),
$shap->new(
ShapeRecords => $shape1->new( [
$style->new(
MoveDeltaX => 136,
MoveDeltaY => -316,
FillStyle1 => 1,
LineStyle => 0,
),
$shape2->new(
DeltaX => 296,
DeltaY => 0,
),
$curve->new(
ControlDeltaX => -6,
ControlDeltaY => -67,
AnchorDeltaX => -28,
AnchorDeltaY => -34,
),
$curve->new(
ControlDeltaX => -43,
ControlDeltaY => -52,
AnchorDeltaX => -68,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => -62,
ControlDeltaY => 0,
AnchorDeltaX => -42,
AnchorDeltaY => 42,
),
$curve->new(
ControlDeltaX => -43,
ControlDeltaY => 41,
AnchorDeltaX => -4,
AnchorDeltaY => 70,
),
$style->new(
MoveDeltaX => 376,
MoveDeltaY => -88,
),
$curve->new(
ControlDeltaX => 35,
ControlDeltaY => -26,
AnchorDeltaX => 20,
AnchorDeltaY => -57,
),
$shape2->new(
DeltaX => 93,
DeltaY => 12,
),
$curve->new(
ControlDeltaX => -22,
ControlDeltaY => 81,
AnchorDeltaX => -59,
AnchorDeltaY => 45,
),
$curve->new(
ControlDeltaX => -60,
ControlDeltaY => 45,
AnchorDeltaX => -92,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => -117,
ControlDeltaY => 0,
AnchorDeltaX => -68,
AnchorDeltaY => -71,
),
$curve->new(
ControlDeltaX => -68,
ControlDeltaY => -72,
AnchorDeltaX => 0,
AnchorDeltaY => -130,
),
$curve->new(
ControlDeltaX => 0,
ControlDeltaY => -134,
AnchorDeltaX => 69,
AnchorDeltaY => -74,
),
$curve->new(
ControlDeltaX => 69,
ControlDeltaY => -74,
AnchorDeltaX => 110,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => 106,
ControlDeltaY => 0,
AnchorDeltaX => 68,
AnchorDeltaY => 73,
),
$curve->new(
ControlDeltaX => 67,
ControlDeltaY => 72,
AnchorDeltaX => 0,
AnchorDeltaY => 132,
),
$shape2->new(
DeltaX => 0,
DeltaY => 24,
),
$shape2->new(
DeltaX => -396,
DeltaY => 0,
),
$curve->new(
ControlDeltaX => 5,
ControlDeltaY => 87,
AnchorDeltaX => 44,
AnchorDeltaY => 47,
),
$curve->new(
ControlDeltaX => 45,
ControlDeltaY => 46,
AnchorDeltaX => 66,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => 50,
ControlDeltaY => 0,
AnchorDeltaX => 35,
AnchorDeltaY => -26,
),
] ),
),
$shap->new(
ShapeRecords => $shape1->new( [
$style->new(
MoveDeltaX => 127,
MoveDeltaY => -265,
FillStyle1 => 1,
LineStyle => 0,
),
$curve->new(
ControlDeltaX => 0,
ControlDeltaY => 102,
AnchorDeltaX => 44,
AnchorDeltaY => 51,
),
$curve->new(
ControlDeltaX => 45,
ControlDeltaY => 50,
AnchorDeltaX => 67,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => 67,
ControlDeltaY => 0,
AnchorDeltaX => 45,
AnchorDeltaY => -51,
),
$curve->new(
ControlDeltaX => 44,
ControlDeltaY => -51,
AnchorDeltaX => 0,
AnchorDeltaY => -104,
),
$curve->new(
ControlDeltaX => 0,
ControlDeltaY => -99,
AnchorDeltaX => -44,
AnchorDeltaY => -50,
),
$curve->new(
ControlDeltaX => -45,
ControlDeltaY => -51,
AnchorDeltaX => -67,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => -67,
ControlDeltaY => 0,
AnchorDeltaX => -45,
AnchorDeltaY => 50,
),
$curve->new(
ControlDeltaX => -44,
ControlDeltaY => 51,
AnchorDeltaX => 0,
AnchorDeltaY => 102,
),
$style->new(
MoveDeltaX => 116,
MoveDeltaY => -484,
),
$curve->new(
ControlDeltaX => 69,
ControlDeltaY => -59,
AnchorDeltaX => 98,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => 110,
ControlDeltaY => 0,
AnchorDeltaX => 69,
AnchorDeltaY => 72,
),
$curve->new(
ControlDeltaX => 70,
ControlDeltaY => 72,
AnchorDeltaX => 0,
AnchorDeltaY => 126,
),
$curve->new(
ControlDeltaX => 0,
ControlDeltaY => 103,
AnchorDeltaX => -31,
AnchorDeltaY => 59,
),
$curve->new(
ControlDeltaX => -31,
ControlDeltaY => 58,
AnchorDeltaX => -58,
AnchorDeltaY => 33,
),
$curve->new(
ControlDeltaX => -59,
ControlDeltaY => 32,
AnchorDeltaX => -70,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => -111,
ControlDeltaY => 0,
AnchorDeltaX => -69,
AnchorDeltaY => -71,
),
$curve->new(
ControlDeltaX => -69,
ControlDeltaY => -72,
AnchorDeltaX => 0,
AnchorDeltaY => -134,
),
$curve->new(
ControlDeltaX => 0,
ControlDeltaY => -148,
AnchorDeltaX => 82,
AnchorDeltaY => -71,
),
] ),
),
$shap->new(
ShapeRecords => $shape1->new( [
$style->new(
MoveDeltaX => 148,
MoveDeltaY => -531,
FillStyle1 => 1,
LineStyle => 0,
),
$shape2->new(
DeltaX => 0,
DeltaY => 81,
),
$curve->new(
ControlDeltaX => 31,
ControlDeltaY => -57,
AnchorDeltaX => 26,
AnchorDeltaY => -18,
),
$curve->new(
ControlDeltaX => 26,
ControlDeltaY => -18,
AnchorDeltaX => 32,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => 45,
ControlDeltaY => 0,
AnchorDeltaX => 47,
AnchorDeltaY => 29,
),
$shape2->new(
DeltaX => -31,
DeltaY => 84,
),
$curve->new(
ControlDeltaX => -33,
ControlDeltaY => -20,
AnchorDeltaX => -33,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => -29,
ControlDeltaY => 0,
AnchorDeltaX => -24,
AnchorDeltaY => 18,
),
$curve->new(
ControlDeltaX => -23,
ControlDeltaY => 18,
AnchorDeltaX => -10,
AnchorDeltaY => 31,
),
$curve->new(
ControlDeltaX => -15,
ControlDeltaY => 48,
AnchorDeltaX => 0,
AnchorDeltaY => 57,
),
$shape2->new(
DeltaX => 0,
DeltaY => 278,
),
$shape2->new(
DeltaX => -90,
DeltaY => 0,
),
$shape2->new(
DeltaX => 0,
DeltaY => -531,
),
$shape2->new(
DeltaX => 81,
DeltaY => 0,
),
] ),
),
$shap->new(
ShapeRecords => $shape1->new( [
$style->new(
MoveDeltaX => 352,
MoveDeltaY => -525,
FillStyle1 => 1,
LineStyle => 0,
),
$curve->new(
ControlDeltaX => 47,
ControlDeltaY => 18,
AnchorDeltaX => 23,
AnchorDeltaY => 31,
),
$curve->new(
ControlDeltaX => 22,
ControlDeltaY => 31,
AnchorDeltaX => 9,
AnchorDeltaY => 51,
),
$shape2->new(
DeltaX => -88,
DeltaY => 12,
),
$curve->new(
ControlDeltaX => -6,
ControlDeltaY => -41,
AnchorDeltaX => -29,
AnchorDeltaY => -23,
),
$curve->new(
ControlDeltaX => -29,
ControlDeltaY => -23,
AnchorDeltaX => -52,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => -62,
ControlDeltaY => 0,
AnchorDeltaX => -27,
AnchorDeltaY => 21,
),
$curve->new(
ControlDeltaX => -26,
ControlDeltaY => 20,
AnchorDeltaX => 0,
AnchorDeltaY => 28,
),
$curve->new(
ControlDeltaX => 0,
ControlDeltaY => 17,
AnchorDeltaX => 11,
AnchorDeltaY => 14,
),
$curve->new(
ControlDeltaX => 11,
ControlDeltaY => 15,
AnchorDeltaX => 23,
AnchorDeltaY => 9,
),
$shape2->new(
DeltaX => 80,
DeltaY => 23,
),
$shape2->new(
DeltaX => 133,
DeltaY => 42,
),
$curve->new(
ControlDeltaX => 38,
ControlDeltaY => 16,
AnchorDeltaX => 21,
AnchorDeltaY => 31,
),
$curve->new(
ControlDeltaX => 22,
ControlDeltaY => 31,
AnchorDeltaX => 0,
AnchorDeltaY => 46,
),
$curve->new(
ControlDeltaX => 0,
ControlDeltaY => 45,
AnchorDeltaX => -26,
AnchorDeltaY => 40,
),
$curve->new(
ControlDeltaX => -27,
ControlDeltaY => 40,
AnchorDeltaX => -49,
AnchorDeltaY => 22,
),
$curve->new(
ControlDeltaX => -50,
ControlDeltaY => 21,
AnchorDeltaX => -62,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => -104,
ControlDeltaY => 0,
AnchorDeltaX => -54,
AnchorDeltaY => -43,
),
$curve->new(
ControlDeltaX => -54,
ControlDeltaY => -43,
AnchorDeltaX => -15,
AnchorDeltaY => -84,
),
$shape2->new(
DeltaX => 89,
DeltaY => -14,
),
$curve->new(
ControlDeltaX => 7,
ControlDeltaY => 53,
AnchorDeltaX => 35,
AnchorDeltaY => 29,
),
$curve->new(
ControlDeltaX => 34,
ControlDeltaY => 28,
AnchorDeltaX => 61,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => 62,
ControlDeltaY => 0,
AnchorDeltaX => 30,
AnchorDeltaY => -25,
),
$curve->new(
ControlDeltaX => 30,
ControlDeltaY => -25,
AnchorDeltaX => 0,
AnchorDeltaY => -34,
),
$curve->new(
ControlDeltaX => 0,
ControlDeltaY => -31,
AnchorDeltaX => -26,
AnchorDeltaY => -17,
),
$curve->new(
ControlDeltaX => -19,
ControlDeltaY => -12,
AnchorDeltaX => -73,
AnchorDeltaY => -19,
),
$curve->new(
ControlDeltaX => -99,
ControlDeltaY => -25,
AnchorDeltaX => -38,
AnchorDeltaY => -18,
),
$curve->new(
ControlDeltaX => -39,
ControlDeltaY => -18,
AnchorDeltaX => -19,
AnchorDeltaY => -32,
),
$curve->new(
ControlDeltaX => -20,
ControlDeltaY => -33,
AnchorDeltaX => 0,
AnchorDeltaY => -39,
),
$curve->new(
ControlDeltaX => 0,
ControlDeltaY => -35,
AnchorDeltaX => 16,
AnchorDeltaY => -30,
),
$curve->new(
ControlDeltaX => 16,
ControlDeltaY => -31,
AnchorDeltaX => 28,
AnchorDeltaY => -20,
),
$curve->new(
ControlDeltaX => 21,
ControlDeltaY => -15,
AnchorDeltaX => 37,
AnchorDeltaY => -11,
),
$shape2->new(
DeltaX => 77,
DeltaY => -11,
),
$curve->new(
ControlDeltaX => 63,
ControlDeltaY => 0,
AnchorDeltaX => 47,
AnchorDeltaY => 18,
),
] ),
),
] ),
CodeTable => $codetable->new( [
58, 99, 101, 111, 114, 115,
] ),
)->pack($new);
$edittext->new(
CharacterID => 2,
Bounds => $rect->new(
Xmin => -40,
Ymin => -40,
Xmax => 700,
Ymax => 324,
),
Flags => 12301,
FontID => 1,
FontHeight => 240,
TextColor => $rgb->new(
Red => 255,
Green => 255,
Blue => 255,
Alpha => 255,
),
Align => 0,
LeftMargin => 0,
RightMargin => 0,
Indent => 0,
Leading => 40,
VariableName => "life",
)->pack($new);
$placeobj->new(
Flags => 6,
Depth => 7,
CharacterID => 2,
Matrix => $matrix->new(
ScaleX => 1,
ScaleY => 1,
RotateSkew0 => 0,
RotateSkew1 => 0,
TranslateX => 14738,
TranslateY => 516,
),
)->pack($new);
$showframe->new(
)->pack($new);
$doaction->new(
Actions => $actionarray->new( [
$actionpool->new(
Tag => 'ActionConstantPool',
ConstantPool => $stringar->new( [
"Mouse",
"hide",
"/action:ypos",
"/action:xpos",
"x_bat",
"/action:width",
"/action:speed",
"points",
"/action:next",
] ),
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$doubleaction->new(0),
$lookup->new(0),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(1),
] ),
),
$actionrec->new(
Tag => 'ActionCallMethod',
),
$actionrec->new(
Tag => 'ActionPop',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(2),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$actionint->new(335),
] ),
),
$actionrec->new(
Tag => 'ActionGreater',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionif->new(
Tag => 'ActionIf',
BranchOffset => "A#195",
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(3),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(4),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(5),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$actionint->new(2),
] ),
),
$actionrec->new(
Tag => 'ActionDivide',
),
$actionrec->new(
Tag => 'ActionSubtract',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionrec->new(
Tag => 'ActionLess2',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(3),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(4),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(5),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$actionint->new(2),
] ),
),
$actionrec->new(
Tag => 'ActionDivide',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionrec->new(
Tag => 'ActionAdd2',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionrec->new(
Tag => 'ActionGreater',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionrec->new(
Tag => 'ActionAnd',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionif->new(
Tag => 'ActionIf',
BranchOffset => "A#122",
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(2),
$lookup->new(2),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$actionint->new(2),
$lookup->new(6),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionMultiply',
),
$actionrec->new(
Tag => 'ActionSubtract',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(7),
$lookup->new(7),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$actionint->new(1),
] ),
),
$actionrec->new(
Tag => 'ActionAdd2',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(7),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(8),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionrec->new(
Tag => 'ActionEquals2',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionif->new(
Tag => 'ActionIf',
BranchOffset => "B#38",
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(8),
$lookup->new(8),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$actionint->new($speedchange),
] ),
),
$actionrec->new(
Tag => 'ActionAdd2',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(6),
$lookup->new(6),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$actionint->new($speedincrease),
] ),
),
$actionrec->new(
Tag => 'ActionAdd2',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actiontarget->new(
Tag => 'ActionSetTarget',
LocalLabel => "B",
TargetName => "/action",
),
$actiongoto->new(
Tag => 'ActionGotoLabel',
Label => "up",
),
$actionrec->new(
Tag => 'ActionPlay',
),
$actiontarget->new(
Tag => 'ActionSetTarget',
TargetName => "",
),
$actionrec->new(
Tag => 'ActionEnd',
LocalLabel => "A",
),
] ),
)->pack($new);
$framelabel->new(
Name => "loop",
)->pack($new);
$doaction->new(
Actions => $actionarray->new( [
$actionpool->new(
Tag => 'ActionConstantPool',
ConstantPool => $stringar->new( [
"/bat",
"x_bat",
"y_bat",
] ),
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$doubleaction->new(0),
$actionint->new(345),
$actionint->new(770),
$actionint->new(345),
$actionint->new(1),
$actionint->new(1),
$lookup->new(0),
] ),
),
$actionrec->new(
Tag => 'ActionStartDrag',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(1),
$lookup->new(0),
$doubleaction->new(0),
] ),
),
$actionrec->new(
Tag => 'ActionGetProperty',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(2),
$lookup->new(0),
$actionint->new(1),
] ),
),
$actionrec->new(
Tag => 'ActionGetProperty',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionrec->new(
Tag => 'ActionEnd',
),
] ),
)->pack($new);
$defshape->new(
ShapeID => 3,
ShapeBounds => $rect->new(
Xmin => -640,
Ymin => -60,
Xmax => 640,
Ymax => 60,
),
Shapes => $shape3->new(
FillStyles => $fillarray->new( [
$fillstyle->new(
FillStyleType => 0,
Color => $rgb2->new(
Red => 255,
Green => 255,
Blue => 255,
),
),
] ),
ShapeRecords => $shape1->new( [
$style->new(
MoveDeltaX => -640,
MoveDeltaY => -60,
FillStyle1 => 1,
),
$shape2->new(
DeltaX => 1280,
DeltaY => 0,
),
$shape2->new(
DeltaX => 0,
DeltaY => 120,
),
$shape2->new(
DeltaX => -1280,
DeltaY => 0,
),
$shape2->new(
DeltaX => 0,
DeltaY => -120,
),
] ),
),
)->pack($new);
$sprite->new(
SpriteID => 4,
FrameCount => 1,
ControlTags => $tagarray->new( [
$placeobj->new(
Flags => 6,
Depth => 1,
CharacterID => 3,
Matrix => $matrix->new(
ScaleX => 1,
ScaleY => 1,
RotateSkew0 => 0,
RotateSkew1 => 0,
TranslateX => 0,
TranslateY => 0,
),
),
$showframe->new(
),
$tagend->new(
),
] ),
)->pack($new);
$placeobj->new(
Flags => 54,
Depth => 1,
CharacterID => 4,
Matrix => $matrix->new(
ScaleX => 0.9375,
ScaleY => 1,
RotateSkew0 => 0,
RotateSkew1 => 0,
TranslateX => 1020,
TranslateY => 6938,
),
Ratio => 1,
Name => "bat",
)->pack($new);
$defshape->new(
ShapeID => 5,
ShapeBounds => $rect->new(
Xmin => -110,
Ymin => -110,
Xmax => 110,
Ymax => 110,
),
Shapes => $shape3->new(
FillStyles => $fillarray->new( [
$fillstyle->new(
FillStyleType => 0,
Color => $rgb2->new(
Red => 255,
Green => 255,
Blue => 255,
),
),
] ),
ShapeRecords => $shape1->new( [
$style->new(
MoveDeltaX => 78,
MoveDeltaY => -78,
FillStyle1 => 1,
),
$curve->new(
ControlDeltaX => 32,
ControlDeltaY => 32,
AnchorDeltaX => 0,
AnchorDeltaY => 46,
),
$curve->new(
ControlDeltaX => 0,
ControlDeltaY => 46,
AnchorDeltaX => -32,
AnchorDeltaY => 32,
),
$curve->new(
ControlDeltaX => -32,
ControlDeltaY => 32,
AnchorDeltaX => -46,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => -46,
ControlDeltaY => 0,
AnchorDeltaX => -32,
AnchorDeltaY => -32,
),
$curve->new(
ControlDeltaX => -32,
ControlDeltaY => -32,
AnchorDeltaX => 0,
AnchorDeltaY => -46,
),
$curve->new(
ControlDeltaX => 0,
ControlDeltaY => -46,
AnchorDeltaX => 32,
AnchorDeltaY => -32,
),
$curve->new(
ControlDeltaX => 32,
ControlDeltaY => -32,
AnchorDeltaX => 46,
AnchorDeltaY => 0,
),
$curve->new(
ControlDeltaX => 46,
ControlDeltaY => 0,
AnchorDeltaX => 32,
AnchorDeltaY => 32,
),
] ),
),
)->pack($new);
$sprite->new(
SpriteID => 6,
FrameCount => 1,
ControlTags => $tagarray->new( [
$placeobj->new(
Flags => 6,
Depth => 1,
CharacterID => 5,
Matrix => $matrix->new(
ScaleX => 1,
ScaleY => 1,
RotateSkew0 => 0,
RotateSkew1 => 0,
TranslateX => 0,
TranslateY => 0,
),
),
$showframe->new(
),
$tagend->new(
),
] ),
)->pack($new);
$placeobj->new(
Flags => 54,
Depth => 3,
CharacterID => 6,
Matrix => $matrix->new(
ScaleX => 1,
ScaleY => 1,
RotateSkew0 => 0,
RotateSkew1 => 0,
TranslateX => 7470,
TranslateY => -2000,
),
Ratio => 1,
Name => "ball",
)->pack($new);
$sprite->new(
SpriteID => 7,
FrameCount => 25,
ControlTags => $tagarray->new( [
$doaction->new(
Actions => $actionarray->new( [
$actionpool->new(
Tag => 'ActionConstantPool',
ConstantPool => $stringar->new( [
"speed",
"next",
] ),
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(0),
$actionint->new(5),
] ),
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(1),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$booldata->new(0),
] ),
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionrec->new(
Tag => 'ActionEquals2',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionif->new(
Tag => 'ActionIf',
BranchOffset => "A#11",
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(1),
$actionint->new(5),
] ),
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionrec->new(
Tag => 'ActionEnd',
LocalLabel => "A",
),
] ),
),
$showframe->new(
),
$doaction->new(
Actions => $actionarray->new( [
$actionpool->new(
Tag => 'ActionConstantPool',
ConstantPool => $stringar->new( [
"/ball",
"randomise",
"vertical",
"speed",
] ),
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(0),
$property->new(0),
$actionint->new(770),
] ),
),
$actionrec->new(
Tag => 'ActionRandomNumber',
),
$actionrec->new(
Tag => 'ActionSetProperty',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(1),
$actionint->new(2),
] ),
),
$actionrec->new(
Tag => 'ActionRandomNumber',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$actionint->new(1),
] ),
),
$actionrec->new(
Tag => 'ActionAdd2',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(1),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$actionint->new(1),
] ),
),
$actionrec->new(
Tag => 'ActionEquals2',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionif->new(
Tag => 'ActionIf',
BranchOffset => "A#24",
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(2),
$doubleaction->new(0),
$lookup->new(3),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionSubtract',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionjump->new(
Tag => 'ActionJump',
BranchOffset => "B#9",
),
$actionpush->new(
Tag => 'ActionPush',
LocalLabel => "A",
DataList => $actar->new( [
$lookup->new(2),
$lookup->new(3),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionrec->new(
Tag => 'ActionEnd',
LocalLabel => "B",
),
] ),
),
$framelabel->new(
Name => "start",
),
$showframe->new(
),
$framelabel->new(
Name => "down",
),
$doaction->new(
Actions => $actionarray->new( [
$actionpool->new(
Tag => 'ActionConstantPool',
ConstantPool => $stringar->new( [
"ypos",
"/ball",
"xpos",
"width",
"/bat",
"../:points",
"speed",
"../:life",
"vertical",
] ),
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(0),
$lookup->new(1),
$actionint->new(1),
] ),
),
$actionrec->new(
Tag => 'ActionGetProperty',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(2),
$lookup->new(1),
$doubleaction->new(0),
] ),
),
$actionrec->new(
Tag => 'ActionGetProperty',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(3),
$lookup->new(4),
$actionint->new(8),
] ),
),
$actionrec->new(
Tag => 'ActionGetProperty',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(0),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$actionint->new(360),
] ),
),
$actionrec->new(
Tag => 'ActionGreater',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionif->new(
Tag => 'ActionIf',
BranchOffset => "A#107",
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(5),
$lookup->new(5),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$actionint->new(1),
] ),
),
$actionrec->new(
Tag => 'ActionSubtract',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(0),
$actionint->new("-2"),
$lookup->new(6),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionMultiply',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(7),
$lookup->new(7),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$actionint->new(1),
] ),
),
$actionrec->new(
Tag => 'ActionSubtract',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(7),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$doubleaction->new(0),
] ),
),
$actionrec->new(
Tag => 'ActionEquals2',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionif->new(
Tag => 'ActionIf',
BranchOffset => "B#24",
),
$actiontarget->new(
Tag => 'ActionSetTarget',
TargetName => "../",
),
$actiongoto->new(
Tag => 'ActionGotoLabel',
Label => "game over",
),
$actiontarget->new(
Tag => 'ActionSetTarget',
TargetName => "",
),
$goto->new(
Tag => 'ActionGotoFrame',
LocalLabel => "B",
Frame => 0,
),
$actionrec->new(
Tag => 'ActionPlay',
),
$actionpush->new(
Tag => 'ActionPush',
LocalLabel => "A",
DataList => $actar->new( [
$lookup->new(2),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$doubleaction->new(0),
] ),
),
$actionrec->new(
Tag => 'ActionGreater',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(2),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$actionint->new(770),
] ),
),
$actionrec->new(
Tag => 'ActionLess2',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionrec->new(
Tag => 'ActionOr',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionif->new(
Tag => 'ActionIf',
BranchOffset => "C#19",
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(8),
$doubleaction->new(0),
$lookup->new(8),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionSubtract',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
LocalLabel => "C",
DataList => $actar->new( [
$lookup->new(1),
$property->new(1),
$lookup->new(0),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(6),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionrec->new(
Tag => 'ActionAdd2',
),
$actionrec->new(
Tag => 'ActionSetProperty',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(1),
$property->new(0),
$lookup->new(2),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(8),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionrec->new(
Tag => 'ActionAdd2',
),
$actionrec->new(
Tag => 'ActionSetProperty',
),
$actionrec->new(
Tag => 'ActionEnd',
),
] ),
),
$showframe->new(
),
$doaction->new(
Actions => $actionarray->new( [
$goto->new(
Tag => 'ActionGotoFrame',
Frame => 2,
),
$actionrec->new(
Tag => 'ActionPlay',
),
$actionrec->new(
Tag => 'ActionEnd',
),
] ),
),
$showframe->new(
),
$showframe->new(
),
$showframe->new(
),
$showframe->new(
),
$showframe->new(
),
$showframe->new(
),
$showframe->new(
),
$showframe->new(
),
$showframe->new(
),
$showframe->new(
),
$showframe->new(
),
$showframe->new(
),
$showframe->new(
),
$showframe->new(
),
$showframe->new(
),
$showframe->new(
),
$framelabel->new(
Name => "up",
),
$doaction->new(
Actions => $actionarray->new( [
$actionpool->new(
Tag => 'ActionConstantPool',
ConstantPool => $stringar->new( [
"/ball",
"ypos",
"speed",
"xpos",
"../:x_bat",
"vertical",
] ),
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(0),
$property->new(1),
$lookup->new(1),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$actionint->new(2),
$lookup->new(2),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionMultiply',
),
$actionrec->new(
Tag => 'ActionSubtract',
),
$actionrec->new(
Tag => 'ActionSetProperty',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(3),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(4),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionrec->new(
Tag => 'ActionLess2',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionif->new(
Tag => 'ActionIf',
BranchOffset => "A#24",
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(5),
$doubleaction->new(0),
$lookup->new(2),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionSubtract',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionjump->new(
Tag => 'ActionJump',
BranchOffset => "B#9",
),
$actionpush->new(
Tag => 'ActionPush',
LocalLabel => "A",
DataList => $actar->new( [
$lookup->new(5),
$lookup->new(2),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
LocalLabel => "B",
DataList => $actar->new( [
$lookup->new(0),
$property->new(0),
$lookup->new(3),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(5),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionrec->new(
Tag => 'ActionAdd2',
),
$actionrec->new(
Tag => 'ActionSetProperty',
),
$actionrec->new(
Tag => 'ActionEnd',
),
] ),
),
$showframe->new(
),
$framelabel->new(
Name => "up2",
),
$doaction->new(
Actions => $actionarray->new( [
$actionpool->new(
Tag => 'ActionConstantPool',
ConstantPool => $stringar->new( [
"xpos",
"vertical",
"/ball",
"ypos",
"speed",
] ),
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(0),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$doubleaction->new(0),
] ),
),
$actionrec->new(
Tag => 'ActionGreater',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(0),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$actionint->new(770),
] ),
),
$actionrec->new(
Tag => 'ActionLess2',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionrec->new(
Tag => 'ActionOr',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionif->new(
Tag => 'ActionIf',
BranchOffset => "A#19",
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(1),
$doubleaction->new(0),
$lookup->new(1),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionSubtract',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
LocalLabel => "A",
DataList => $actar->new( [
$lookup->new(2),
$property->new(1),
$lookup->new(3),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$actionint->new(2),
$lookup->new(4),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionMultiply',
),
$actionrec->new(
Tag => 'ActionSubtract',
),
$actionrec->new(
Tag => 'ActionSetProperty',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(2),
$property->new(0),
$lookup->new(0),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(1),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionrec->new(
Tag => 'ActionAdd2',
),
$actionrec->new(
Tag => 'ActionSetProperty',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(3),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionrec->new(
Tag => 'ActionToNumber',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$actionint->new(20),
] ),
),
$actionrec->new(
Tag => 'ActionGreater',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionrec->new(
Tag => 'ActionNot',
),
$actionif->new(
Tag => 'ActionIf',
BranchOffset => "B#6",
),
$goto->new(
Tag => 'ActionGotoFrame',
Frame => 2,
),
$actionrec->new(
Tag => 'ActionPlay',
),
$actionrec->new(
Tag => 'ActionEnd',
LocalLabel => "B",
),
] ),
),
$showframe->new(
),
$doaction->new(
Actions => $actionarray->new( [
$actionpool->new(
Tag => 'ActionConstantPool',
ConstantPool => $stringar->new( [
"ypos",
"/ball",
"xpos",
] ),
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(0),
$lookup->new(1),
$actionint->new(1),
] ),
),
$actionrec->new(
Tag => 'ActionGetProperty',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$lookup->new(2),
$lookup->new(1),
$doubleaction->new(0),
] ),
),
$actionrec->new(
Tag => 'ActionGetProperty',
),
$actionrec->new(
Tag => 'ActionSetVariable',
),
$goto->new(
Tag => 'ActionGotoFrame',
Frame => 20,
),
$actionrec->new(
Tag => 'ActionPlay',
),
$actionrec->new(
Tag => 'ActionEnd',
),
] ),
),
$showframe->new(
),
$showframe->new(
),
$showframe->new(
),
$showframe->new(
),
$tagend->new(
),
] ),
)->pack($new);
$placeobj->new(
Flags => 54,
Depth => 5,
CharacterID => 7,
Matrix => $matrix->new(
ScaleX => 1,
ScaleY => 1,
RotateSkew0 => 0,
RotateSkew1 => 0,
TranslateX => 7199,
TranslateY => -520,
),
Ratio => 1,
Name => "action",
)->pack($new);
$edittext->new(
CharacterID => 8,
Bounds => $rect->new(
Xmin => -40,
Ymin => -40,
Xmax => 789,
Ymax => 350,
),
Flags => 12973,
FontID => 1,
FontHeight => 240,
TextColor => $rgb->new(
Red => 255,
Green => 255,
Blue => 255,
Alpha => 255,
),
Align => 0,
LeftMargin => 0,
RightMargin => 0,
Indent => 0,
Leading => 40,
VariableName => "",
InitialText => "<P ALIGN=\"LEFT\"><FONT FACE=\"Arial\" SIZE=\"12\"
+ COLOR=\"#FFFFFF\">score:</FONT></P>",
)->pack($new);
$placeobj->new(
Flags => 22,
Depth => 8,
CharacterID => 8,
Matrix => $matrix->new(
ScaleX => 1,
ScaleY => 1,
RotateSkew0 => 0,
RotateSkew1 => 0,
TranslateX => 13939,
TranslateY => 76,
),
Ratio => 1,
)->pack($new);
$edittext->new(
CharacterID => 9,
Bounds => $rect->new(
Xmin => -40,
Ymin => -40,
Xmax => 700,
Ymax => 307,
),
Flags => 12301,
FontID => 1,
FontHeight => 240,
TextColor => $rgb->new(
Red => 255,
Green => 255,
Blue => 255,
Alpha => 255,
),
Align => 0,
LeftMargin => 0,
RightMargin => 0,
Indent => 0,
Leading => 40,
VariableName => "points",
)->pack($new);
$placeobj->new(
Flags => 22,
Depth => 9,
CharacterID => 9,
Matrix => $matrix->new(
ScaleX => 1,
ScaleY => 1,
RotateSkew0 => 0,
RotateSkew1 => 0,
TranslateX => 14739,
TranslateY => 76,
),
Ratio => 1,
)->pack($new);
$edittext->new(
CharacterID => 10,
Bounds => $rect->new(
Xmin => -40,
Ymin => -40,
Xmax => 668,
Ymax => 350,
),
Flags => 12973,
FontID => 1,
FontHeight => 240,
TextColor => $rgb->new(
Red => 255,
Green => 255,
Blue => 255,
Alpha => 255,
),
Align => 0,
LeftMargin => 0,
RightMargin => 0,
Indent => 0,
Leading => 40,
VariableName => "",
InitialText => "<P ALIGN=\"LEFT\"><FONT FACE=\"Arial\" SIZE=\"12\"
+ COLOR=\"#FFFFFF\">lives:</FONT></P>",
)->pack($new);
$placeobj->new(
Flags => 22,
Depth => 10,
CharacterID => 10,
Matrix => $matrix->new(
ScaleX => 1,
ScaleY => 1,
RotateSkew0 => 0,
RotateSkew1 => 0,
TranslateX => 13939,
TranslateY => 536,
),
Ratio => 1,
)->pack($new);
$showframe->new(
)->pack($new);
$doaction->new(
Actions => $actionarray->new( [
$goto->new(
Tag => 'ActionGotoFrame',
Frame => 1,
),
$actionrec->new(
Tag => 'ActionPlay',
),
$actionrec->new(
Tag => 'ActionEnd',
),
] ),
)->pack($new);
$showframe->new(
)->pack($new);
$removeobj->new(
Depth => 1,
)->pack($new);
$removeobj->new(
Depth => 3,
)->pack($new);
$removeobj->new(
Depth => 5,
)->pack($new);
$removeobj->new(
Depth => 7,
)->pack($new);
$showframe->new(
)->pack($new);
$showframe->new(
)->pack($new);
$showframe->new(
)->pack($new);
$showframe->new(
)->pack($new);
$showframe->new(
)->pack($new);
$showframe->new(
)->pack($new);
$showframe->new(
)->pack($new);
$showframe->new(
)->pack($new);
$showframe->new(
)->pack($new);
$showframe->new(
)->pack($new);
$showframe->new(
)->pack($new);
$showframe->new(
)->pack($new);
$showframe->new(
)->pack($new);
$showframe->new(
)->pack($new);
$showframe->new(
)->pack($new);
$removeobj->new(
Depth => 8,
)->pack($new);
$removeobj->new(
Depth => 9,
)->pack($new);
$removeobj->new(
Depth => 10,
)->pack($new);
$doaction->new(
Actions => $actionarray->new( [
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$doubleaction->new(0),
$stringaction->new("Mouse"),
] ),
),
$actionrec->new(
Tag => 'ActionGetVariable',
),
$actionpush->new(
Tag => 'ActionPush',
DataList => $actar->new( [
$stringaction->new("show"),
] ),
),
$actionrec->new(
Tag => 'ActionCallMethod',
),
$actionrec->new(
Tag => 'ActionPop',
),
$actionrec->new(
Tag => 'ActionEnd',
),
] ),
)->pack($new);
$framelabel->new(
Name => "game over",
)->pack($new);
$definetext->new(
CharacterID => 11,
TextBounds => $rect->new(
Xmin => 7,
Ymin => 65,
Xmax => 803,
Ymax => 218,
),
TextMatrix => $matrix->new(
ScaleX => 1,
ScaleY => 1,
RotateSkew0 => 0,
RotateSkew1 => 0,
TranslateX => 0,
TranslateY => 0,
),
TextRecords => $textarray->new( [
$textrec->new(
FontID => 1,
TextColor => $rgb2->new(
Red => 255,
Green => 255,
Blue => 255,
),
YOffset => 215,
TextHeight => 240,
),
$textrec2->new(
GlyphEntries => $glyphar->new( [
$glyphentry->new(
GlyphIndex => 5,
GlyphAdvance => 120,
),
$glyphentry->new(
GlyphIndex => 1,
GlyphAdvance => 120,
),
$glyphentry->new(
GlyphIndex => 3,
GlyphAdvance => 133,
),
$glyphentry->new(
GlyphIndex => 4,
GlyphAdvance => 80,
),
$glyphentry->new(
GlyphIndex => 2,
GlyphAdvance => 133,
),
$glyphentry->new(
GlyphIndex => 0,
GlyphAdvance => 67,
),
] ),
),
] ),
)->pack($new);
$placeobj->new(
Flags => 6,
Depth => 1,
CharacterID => 11,
Matrix => $matrix->new(
ScaleX => 1,
ScaleY => 1,
RotateSkew0 => 0,
RotateSkew1 => 0,
TranslateX => 13939,
TranslateY => 76,
),
)->pack($new);
$edittext->new(
CharacterID => 12,
Bounds => $rect->new(
Xmin => -40,
Ymin => -40,
Xmax => 700,
Ymax => 307,
),
Flags => 12301,
FontID => 1,
FontHeight => 240,
TextColor => $rgb->new(
Red => 255,
Green => 255,
Blue => 255,
Alpha => 255,
),
Align => 0,
LeftMargin => 0,
RightMargin => 0,
Indent => 0,
Leading => 40,
VariableName => "points",
)->pack($new);
$placeobj->new(
Flags => 22,
Depth => 2,
CharacterID => 12,
Matrix => $matrix->new(
ScaleX => 1,
ScaleY => 1,
RotateSkew0 => 0,
RotateSkew1 => 0,
TranslateX => 14739,
TranslateY => 76,
),
Ratio => 18,
)->pack($new);
$edittext->new(
CharacterID => 13,
Bounds => $rect->new(
Xmin => -40,
Ymin => -40,
Xmax => 8427,
Ymax => 1860,
),
Flags => 12973,
FontID => 1,
FontHeight => 1440,
TextColor => $rgb->new(
Red => 255,
Green => 255,
Blue => 255,
Alpha => 255,
),
Align => 0,
LeftMargin => 0,
RightMargin => 0,
Indent => 0,
Leading => 40,
VariableName => "",
InitialText => "<P ALIGN=\"LEFT\"><FONT FACE=\"Arial\" SIZE=\"72\"
+ COLOR=\"#FFFFFF\">Game Over</FONT></P>",
)->pack($new);
$placeobj->new(
Flags => 22,
Depth => 3,
CharacterID => 13,
Matrix => $matrix->new(
ScaleX => 1,
ScaleY => 1,
RotateSkew0 => 0,
RotateSkew1 => 0,
TranslateX => 4176,
TranslateY => 2696,
),
Ratio => 18,
)->pack($new);
$edittext->new(
CharacterID => 14,
Bounds => $rect->new(
Xmin => -40,
Ymin => -40,
Xmax => 1650,
Ymax => 602,
),
Flags => 12973,
FontID => 1,
FontHeight => 440,
TextColor => $rgb->new(
Red => 255,
Green => 255,
Blue => 255,
Alpha => 255,
),
Align => 0,
LeftMargin => 0,
RightMargin => 0,
Indent => 0,
Leading => 40,
VariableName => "",
InitialText => "<P ALIGN=\"LEFT\"><FONT FACE=\"Arial\" SIZE=\"22\"
+ COLOR=\"#FFFFFF\">Restart</FONT></P>",
)->pack($new);
$edittext->new(
CharacterID => 15,
Bounds => $rect->new(
Xmin => -40,
Ymin => -40,
Xmax => 1650,
Ymax => 602,
),
Flags => 12973,
FontID => 1,
FontHeight => 440,
TextColor => $rgb->new(
Red => 255,
Green => 0,
Blue => 0,
Alpha => 255,
),
Align => 0,
LeftMargin => 0,
RightMargin => 0,
Indent => 0,
Leading => 40,
VariableName => "",
InitialText => "<P ALIGN=\"LEFT\"><FONT FACE=\"Arial\" SIZE=\"22\"
+ COLOR=\"#FF0000\">Restart</FONT></P>",
)->pack($new);
$defshape->new(
ShapeID => 16,
ShapeBounds => $rect->new(
Xmin => -947,
Ymin => -290,
Xmax => 947,
Ymax => 290,
),
Shapes => $shape3->new(
FillStyles => $fillarray->new( [
$fillstyle->new(
FillStyleType => 0,
Color => $rgb2->new(
Red => 255,
Green => 0,
Blue => 0,
),
),
] ),
LineStyles => $linearray->new( [
$linestyle->new(
Width => 20,
Color => $rgb2->new(
Red => 0,
Green => 0,
Blue => 0,
),
),
] ),
ShapeRecords => $shape1->new( [
$style->new(
MoveDeltaX => 947,
MoveDeltaY => 290,
FillStyle1 => 1,
),
$shape2->new(
DeltaX => -1894,
DeltaY => 0,
),
$shape2->new(
DeltaX => 0,
DeltaY => -580,
),
$shape2->new(
DeltaX => 1894,
DeltaY => 0,
),
$shape2->new(
DeltaX => 0,
DeltaY => 580,
),
] ),
),
)->pack($new);
$defbutton->new(
ButtonID => 17,
Flags => 0,
Characters => $buttonrec->new( [
$buttonrec2->new(
ButtonStates => 1,
CharacterID => 14,
PlaceDepth => 1,
PlaceMatrix => $matrix->new(
ScaleX => 1,
ScaleY => 1,
RotateSkew0 => 0,
RotateSkew1 => 0,
TranslateX => -711,
TranslateY => -250,
),
),
$buttonrec2->new(
ButtonStates => 6,
CharacterID => 15,
PlaceDepth => 1,
PlaceMatrix => $matrix->new(
ScaleX => 1,
ScaleY => 1,
RotateSkew0 => 0,
RotateSkew1 => 0,
TranslateX => -712,
TranslateY => -250,
),
),
$buttonrec2->new(
ButtonStates => 8,
CharacterID => 16,
PlaceDepth => 1,
PlaceMatrix => $matrix->new(
ScaleX => 1,
ScaleY => 1,
RotateSkew0 => 0,
RotateSkew1 => 0,
TranslateX => 0,
TranslateY => 0,
),
),
] ),
Actions => $buttonarray->new( [
$buttonaction->new(
Condition => 8,
Actions => $actionarray->new( [
$goto->new(
Tag => 'ActionGotoFrame',
Frame => 0,
),
$actionrec->new(
Tag => 'ActionPlay',
),
$actionrec->new(
Tag => 'ActionEnd',
),
] ),
),
] ),
)->pack($new);
$placeobj->new(
Flags => 22,
Depth => 4,
CharacterID => 17,
Matrix => $matrix->new(
ScaleX => 1,
ScaleY => 1,
RotateSkew0 => 0,
RotateSkew1 => 0,
TranslateX => 7700,
TranslateY => 5877,
),
Ratio => 18,
)->pack($new);
$showframe->new(
)->pack($new);
$tagend->new(
)->pack($new);
$new->close;
if ( $genhtml == 1 ) {
open( PAGE, ">$gamename\.html" );
print PAGE <<EOM;
<HTML>
<HEAD>
<meta http-equiv=Content-Type content="text/html; charset=">
<TITLE>$gamename</TITLE>
</HEAD>
<BODY bgcolor="$htmlcolor">
<OBJECT classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"
codebase="http://download.macromedia.com/pub/shockwave/cabs/flash/swf
+lash.cab#version=6,0,0,0"
WIDTH="100%" HEIGHT="100%" id="$gamename" ALIGN="">
<PARAM NAME=movie VALUE="$gamename\.swf"> <PARAM NAME=quality VALUE=h
+igh> <PARAM NAME=bgcolor VALUE=$htmlcolor> <EMBED src="$gamename\.swf
+" quality=high bgcolor=$htmlcolor WIDTH="100%" HEIGHT="100%" NAME="$
+gamename" ALIGN=""
TYPE="application/x-shockwave-flash" PLUGINSPAGE="http://www.macromed
+ia.com/go/getflashplayer"></EMBED>
</OBJECT>
</BODY>
</HTML>
EOM
close(PAGE);
}
|