OKay, what the crap am I doing wrong here:
package swiftclips
{
import flash.display.*;
import flash.text.TextField;
import flash.text.TextFormat;
trace ("Loaded Status class");
public class Status extends Sprite {
// Set how many status updates we've made
public var level:int = -1;
public var X:int = 15;
public var Y:int = 5;
public var Width:int = 300;
public var Height:int = 30;
public var loading_image:MovieClip = new Loading;
public function Request( request:String,tmp_color:String ) {
// Set what level the output will be written to is added to the last one
level++;
// Create a textbox with the request value in it
var status_box:TextField = new TextField();
status_box.width = Width;
status_box.height = Height;
// Lets format this up
var status_format:TextFormat = new TextFormat();
status_format.font = "Verdana";
// Move out box to the appropriate location
status_box.x = X;
status_box.y = (level * (Height/2) ) + Y;
status_box.text = " dfsdfdsfd " + request;
// Move out loading image
loading_image.visible = true;
loading_image.x = status_box.width + status_box.x;
loading_image.y = status_box.y;
addChildAt(loading_image, 0);
// Color the box
status_format.color = "0xFF000";
// Apply the format
//status_box.setTextFormat(status_format);
// Add this to the stage
this.addChild( status_box );
// Write out a debug message
trace("Updated Status: " + request + " @ " + status_box.x + "x" + status_box.y + "px Level " + getChildIndex(status_box));
// function
}
//class
}
// package
}
And on the main stage I call 'er like this:
// We wanna show what's going on
var Show:Status = new Status;
Show.Request( "Loading Credentials","0x0066CC" );
Everything traces out properly but nothing is added to the stage?
This is all pretty new to me. Plaaass Haallp.
Thanks!