Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package com.fileupload
- {
- import flash.display.*;
- import flash.text.*;
- /**
- * ...
- * @author Jonathan Torres
- */
- public class UploadButton extends Sprite
- {
- private var uploadButton:Sprite;
- private var uploadText:TextField;
- public function UploadButton()
- {
- this.buttonMode = true;
- this.x = 0;
- this.y = 0;
- var uploadTextFormat:TextFormat = new TextFormat();
- uploadTextFormat.align = TextFormatAlign.CENTER;
- uploadTextFormat.font = 'Arial';
- uploadTextFormat.color = 0xFFFFFF;
- uploadTextFormat.size = 12;
- uploadText = new TextField();
- uploadText.defaultTextFormat = uploadTextFormat;
- uploadText.text = 'Upload';
- uploadText.width = 50;
- uploadText.height = 20;
- uploadText.selectable = false;
- uploadButton = new Sprite();
- uploadButton.graphics.beginFill(0x990000, 1.0);
- uploadButton.graphics.drawRect(0, 0, 50, 20);
- uploadButton.graphics.endFill();
- uploadButton.addChild(uploadText);
- addChild(uploadButton);
- }
- }
- }
Add Comment
Please, Sign In to add comment