That is true mess. Awful resized bitmap backpad for controller and Crow-style inefficient implementation.
Please do not waste your time on this, there is much more sophisticated way to do that using simple copy-paste-edit script.
For start lets learn how to draw rounded rectangle pad with pink line and how to place text on that.
Let's assume we have a SWF file with a loading screen in frame 1 and scene in frame 2. Let's assume there is no controller at all yet. So have a key script (action?) for frame 2, where is already stop(); statement to stop the file in that last frame.
Add following code to that script:
// first create a function to draw rounded rectangle back pad
function drawRoundedRectangle(target_mc:MovieClip, boxWidth:Number, boxHeight:Number, cornerRadius:Number):Void
{ // Note: when using FFDec, omit parameter types as FFDec can't compile parameter types and flash ignores types anyway
with (target_mc)
{
beginFill(0x000000, 100); // black fill, full aplha
lineStyle(5, 0xff00ff, 100); // line 5 points wide, some pink color (RGB 0xff00ff), 100% alpha
moveTo(cornerRadius, 0);
lineTo(boxWidth - cornerRadius, 0);
curveTo(boxWidth, 0, boxWidth, cornerRadius);
lineTo(boxWidth, cornerRadius);
lineTo(boxWidth, boxHeight - cornerRadius);
curveTo(boxWidth, boxHeight, boxWidth - cornerRadius, boxHeight);
lineTo(boxWidth - cornerRadius, boxHeight);
lineTo(cornerRadius, boxHeight);
curveTo(0, boxHeight, 0, boxHeight - cornerRadius);
lineTo(0, boxHeight - cornerRadius);
lineTo(0, cornerRadius);
curveTo(0, 0, cornerRadius, 0);
lineTo(cornerRadius, 0);
endFill();
}
}
// Now Lets assume we have a main timeline frame with a scene object and no controller object yet.
// So lets create a controller object atop of all others.
// MovieClip type object is a rendered (displayed) object,
// while a basic "Object" type is just a data structure (not displayed)
// Unlike any other object it can't be creater/removed by new/delete statements
// but has special methods to put it on stage or remove from.
this.createEmptyMovieClip("controller", this.getNextHighestDepth()); // creates a MovieClip type object in highest free layer named "controller"
// move this object to desired coordinates
controller._x = 40;
controller._y = 40; // location coordinates from left top corner in default resolution pixels
// now draw a backdrop. See function definition on parameters meaning
drawRoundedRectangle(controller, 200, 50, 5);
// Now create a text label "SPEED" in that rectangle using TextField method
//createTextField(instanceName:String, depth:Number, x:Number, y:Number, width:Number, height:Number)
controller.createTextField("label", controller.getNextHighestDepth(), 0, 5, 75, 25);
// set TextField object named "label" actual text
controller.label.text = "SPEED";
// set a text format. Need a special object holding that data for TextField
var textformatdata:TextFormat = new TextFormat();
textformatdata.size = 18;
textformatdata.bold = true;
textformatdata.font = "Arial Black"; // System fonts are used, not fonts packed in SWF file.
textformatdata.color = 0xffffff; // white RGB code
textformatdata.leftMargin = 5;
// apply format on our label using it's setTextFormat() method
controller.label.setTextFormat(textformatdata);
You can create "Back" od "Done" button object the same way: just smaller size parameter, different _x & _y coordinates and different text value.
Next time I'll post how to create buttons in that object, how to make them change white-green color and do desired action.