Advertisement
Advertisement
| 07.08.2008 at 01:14AM PDT, ID: 23545763 | Points: 500 |
|
[x]
Attachment Details
|
||
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: |
this.createEmptyMovieClip("toolTip", 10);
function drawRectangle(target_mc:MovieClip, boxWidth:Number, boxHeight:Number, fillColor:Number, fillAlpha:Number):Void {
with (target_mc) {
lineStyle(2,0x000000,100);
beginFill(fillColor, fillAlpha);
moveTo(0, 0);
lineTo(boxWidth, 0);
lineTo(boxWidth, boxHeight);
lineTo(0, boxHeight);
lineTo(0, 0);
endFill();
}
var tipText:TextField = toolTip.createTextField("tipText", this.getNextHighestDepth(), 4, 4, boxWidth-4, boxHeight-4);
tipText.multiline = true;
tipText.wordWrap = true;
tipText.autoSize = true;
tipText.text = "New articles available on Developer Center. The preceding code dynamically creates a new text field, enables HTML formatting, and displays the text 'New articles available on Developer Center' on the Stage, with the word 'Developer Center' appearing in italics.";
var autoHeight = tipText.textHeight;
}
drawRectangle(toolTip, 240, autoHeight, 0x99FF00, 100);
|