public
Description: Github flash badge
Homepage: http://spinach.andascarygoat.com/tags/badjo
Clone URL: git://github.com/zmack/badjo.git
Search Repo:
Now resizable from html ;o
zmack (author)
Sun May 04 07:10:07 -0700 2008
commit  684dbc312be55e83d39966db83a793be04bbf1e0
tree    68242330872baa45dcb641f71109f3f313ce3d11
parent  4a9fa306c7620fbddafd2f7e6cc1dbe20fc78e7d
...
3
4
5
 
 
6
7
8
9
...
38
39
40
 
 
 
41
42
43
44
45
...
49
50
51
52
 
53
54
55
56
...
68
69
70
71
 
72
73
74
75
76
77
78
 
79
80
81
...
3
4
5
6
7
8
9
10
11
...
40
41
42
43
44
45
46
 
47
48
49
...
53
54
55
 
56
57
58
59
60
...
72
73
74
 
75
76
77
78
79
80
81
 
82
83
84
85
0
@@ -3,6 +3,8 @@
0
   import flash.display.Sprite;
0
   import flash.display.DisplayObject;
0
   import flash.display.LoaderInfo;
0
+ import flash.display.StageScaleMode;
0
+ import flash.display.StageAlign;
0
   import flash.text.TextField;
0
   import flash.text.TextFieldAutoSize;
0
   import flash.text.StyleSheet;
0
0
@@ -38,8 +40,10 @@
0
 
0
     public function GithubBadge() {
0
       var user:String;
0
+ stage.scaleMode = StageScaleMode.NO_SCALE;
0
+ stage.align = StageAlign.TOP_LEFT;
0
+
0
       addExternalInterface();
0
- trace(stage.height + ' -- ' + stage.width);
0
 
0
       try {
0
         user = getParams().gitUser;
0
@@ -49,7 +53,7 @@
0
 
0
       _gw = new Gateway();
0
       
0
- this.requestData(user || 'zmack');
0
+ this.requestData(user || 'defunkt');
0
     }
0
 
0
     private function addExternalInterface():void {
0
0
@@ -68,14 +72,14 @@
0
 
0
     private function displayProjectList(user:Object):void {
0
       if ( _pl != null ) _pl.parent.removeChild(_pl);
0
- _pl = new ProjectList()
0
+ _pl = new ProjectList({ width: stage.stageWidth, height: stage.stageHeight })
0
 
0
       _pl.setHeader({image: SpriteWrapper(loadAvatar('http://www.gravatar.com/avatar/' + MD5.hash(user.email || '') + '?s=40')), text: user.name || user.login });
0
       user.repositories.forEach( function(repo:Object, index:uint, arr:Array):void {
0
         _pl.addButton({
0
           image: SpriteWrapper(new GithubBadgeSkin.PublicProject()),
0
           text: repo.name,
0
- extended_content: SpriteWrapper(this.createTextField(repo.description))
0
+ extended_content: SpriteWrapper(this.createTextField(repo.description || 'No description'))
0
         });
0
       }, this);
0
 
...
19
20
21
22
23
24
 
 
 
25
26
27
...
51
52
53
 
54
55
56
...
19
20
21
 
 
 
22
23
24
25
26
27
...
51
52
53
54
55
56
57
0
@@ -19,9 +19,9 @@
0
     private var _buttonSpacing:uint;
0
     private var _maximum_y:uint;
0
 
0
- public function ProjectList() {
0
- this.listWidth = 210;
0
- this.listHeight = 200;
0
+ public function ProjectList(options:Object) {
0
+ this.listWidth = options.width;
0
+ this.listHeight = options.height;
0
       this._buttonSpacing = 5;
0
       this._maximum_y = 0;
0
       this.backgroundColor = 0x00FFD0;
0
@@ -51,6 +51,7 @@
0
     }
0
 
0
     public function addButton(options:Object):PickleButton {
0
+ options.width = this.listWidth - 2 * this.lateralPadding;
0
       var button:PickleButton = new PickleButton(options);
0
       button.parentItem = this;
0
       this._items.push(button);

Comments

    No one has commented yet.