http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Spinner.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Spinner.as 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Spinner.as
new file mode 100644
index 0000000..c6ef625
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/Spinner.as
@@ -0,0 +1,187 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html
+{
+       import org.apache.flex.core.IRangeModel;
+       import org.apache.flex.core.UIBase;
+    COMPILE::JS
+    {
+        import org.apache.flex.html.beads.controllers.SpinnerMouseController;
+        import org.apache.flex.core.WrappedHTMLElement;            
+    }
+       
+       [Event(name="valueChange", type="org.apache.flex.events.Event")]
+       
+       /**
+        *  The Spinner class is a component that displays a control for 
incrementing a value
+        *  and a control for decrementing a value. The 
org.apache.flex.html.NumericStepper 
+        *  uses a Spinner as part of the component. Spinner uses the following 
beads:
+        * 
+        *  org.apache.flex.core.IBeadModel: an IRangeModel to hold the 
properties.
+        *  org.apache.flex.core.IBeadView:  the bead that constructs the 
visual parts of the Spinner.
+        *  org.apache.flex.core.IBeadController: a bead that handles the input 
events.
+        *  
+        *  @langversion 3.0
+        *  @playerversion Flash 10.2
+        *  @playerversion AIR 2.6
+        *  @productversion FlexJS 0.0
+        */
+       public class Spinner extends UIBase
+       {
+               /**
+                *  constructor.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function Spinner()
+               {
+                       super();
+                       
+                       className = "Spinner";
+               }
+               
+               /**
+                *  The current value of the Spinner.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function get value():Number
+               {
+                       return IRangeModel(model).value;
+               }
+               public function set value(newValue:Number):void
+               {
+                       IRangeModel(model).value = newValue;
+               }
+               
+               /**
+                *  The minimum value of the Spinner.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function get minimum():Number
+               {
+                       return IRangeModel(model).minimum;
+               }
+               public function set minimum(value:Number):void
+               {
+                       IRangeModel(model).minimum = value;
+               }
+               
+               /**
+                *  The maximum value of the Spinner.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function get maximum():Number
+               {
+                       return IRangeModel(model).maximum;
+               }
+               public function set maximum(value:Number):void
+               {
+                       IRangeModel(model).maximum = value;
+               }
+               
+               /**
+                *  The modulus for the value. If this property is set,
+                *  the value displayed with a muliple of the snapInterval.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function get snapInterval():Number
+               {
+                       return IRangeModel(model).snapInterval;
+               }
+               public function set snapInterval(value:Number):void
+               {
+                       IRangeModel(model).snapInterval = value;
+               }
+               
+               /**
+                *  The amount to increase or descrease the value. The value
+                *  will not exceed the minimum or maximum value. The final
+                *  value is affected by the snapInterval.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function get stepSize():Number
+               {
+                       return IRangeModel(model).stepSize;
+               }
+               public function set stepSize(value:Number):void
+               {
+                       IRangeModel(model).stepSize = value;
+               }
+               
+        COMPILE::JS
+        public var incrementButton:TextButton;
+        
+        COMPILE::JS
+        public var decrementButton:TextButton;
+        
+        COMPILE::JS
+        private var controller:SpinnerMouseController;
+        
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+            element = document.createElement('div') as WrappedHTMLElement;
+            positioner = element;
+            positioner.style.position = 'relative';
+            
+            element.style.verticalAlign = 'middle';
+            
+            incrementButton = new TextButton();
+            incrementButton.text = '\u25B2';
+            addElement(incrementButton);
+            
+            decrementButton = new TextButton();
+            decrementButton.text = '\u25BC';
+            addElement(decrementButton);
+            
+            controller = new SpinnerMouseController();
+            addBead(controller);
+            
+            element.flexjs_wrapper = this;
+            
+            return element;
+        }        
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextArea.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextArea.as 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextArea.as
new file mode 100644
index 0000000..57bc3c3
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextArea.as
@@ -0,0 +1,126 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html
+{
+       import org.apache.flex.core.ITextModel;
+       import org.apache.flex.core.UIBase;
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;            
+    }
+       
+    /**
+     *  The TextArea class implements the basic control for
+     *  multi-line text input.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */    
+       public class TextArea extends UIBase
+       {
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function TextArea()
+               {
+                       super();
+               }
+               
+        /**
+         *  @copy org.apache.flex.html.Label#text
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         *  @flexjsignorecoercion HTMLInputElement
+         */
+               public function get text():String
+               {
+            COMPILE::AS3
+            {
+                return ITextModel(model).text;                    
+            }
+            COMPILE::JS
+            {
+                return (element as HTMLInputElement).value;
+            }
+               }
+
+        /**
+         *  @private
+         *  @flexjsignorecoercion HTMLInputElement
+         */
+               public function set text(value:String):void
+               {
+            COMPILE::AS3
+            {
+                ITextModel(model).text = value;                    
+            }
+            COMPILE::JS
+            {
+                (element as HTMLInputElement).value = value;
+            }
+               }
+               
+        /**
+         *  @copy org.apache.flex.html.Label#html
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function get html():String
+               {
+                       return ITextModel(model).html;
+               }
+
+        /**
+         *  @private
+         */
+               public function set html(value:String):void
+               {
+                       ITextModel(model).html = value;
+               }
+               
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+            element = document.createElement('textarea') as WrappedHTMLElement;
+            positioner = element;
+            positioner.style.position = 'relative';
+            element.flexjs_wrapper = this;
+            element.className = 'TextArea';
+            typeNames = 'TextArea';
+            
+            return element;
+        }        
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextButton.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextButton.as 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextButton.as
new file mode 100644
index 0000000..ca1bbcd
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextButton.as
@@ -0,0 +1,120 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html
+{
+       import org.apache.flex.core.ITextModel;
+       
+    /**
+     *  The TextButton class implements a basic button that
+     *  displays text.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */    
+       public class TextButton extends Button
+       {
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function TextButton()
+               {
+                       super();
+               }
+               
+        /**
+         *  @copy org.apache.flex.html.Label#text
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function get text():String
+               {
+            COMPILE::AS3
+            {                    
+                return ITextModel(model).text;
+            }
+            COMPILE::JS
+            {
+                return element.innerHTML;
+            }
+               }
+
+        /**
+         *  @private
+         */
+               public function set text(value:String):void
+               {
+            COMPILE::AS3
+            {
+                ITextModel(model).text = value;                    
+            }
+            COMPILE::JS
+            {
+                this.element.innerHTML = value;
+                this.dispatchEvent('textChange');                
+            }
+               }
+               
+        /**
+         *  @copy org.apache.flex.html.Label#html
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function get html():String
+               {
+            COMPILE::AS3
+            {
+                return ITextModel(model).html;                    
+            }
+            COMPILE::JS
+            {
+                return element.innerHTML;
+            }
+               }
+
+        /**
+         *  @private
+         */
+               public function set html(value:String):void
+               {
+            COMPILE::AS3
+            {
+                ITextModel(model).html = value;                    
+            }
+            COMPILE::JS
+            {
+                this.element.innerHTML = value;
+                this.dispatchEvent('textChange');                
+            }
+               }
+
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextInput.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextInput.as 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextInput.as
new file mode 100644
index 0000000..1861405
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TextInput.as
@@ -0,0 +1,185 @@
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html
+{
+       import org.apache.flex.core.ITextModel;
+       import org.apache.flex.core.UIBase;
+       import org.apache.flex.events.Event;
+    COMPILE::JS
+    {
+        import goog.events;
+        import org.apache.flex.core.WrappedHTMLElement;            
+    }
+
+       /**
+     *  Dispatched when the user changes the text.
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+       [Event(name="change", type="org.apache.flex.events.Event")]
+
+    /**
+     *  The TextInput class implements the basic control for
+     *  single-line text input.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */    
+       public class TextInput extends UIBase
+       {
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function TextInput()
+               {
+                       super();
+
+            COMPILE::AS3
+            {
+                model.addEventListener("textChange", textChangeHandler);       
             
+            }
+               }
+               
+        /**
+         *  @copy org.apache.flex.html.Label#text
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         *  @flexjsignorecoercion HTMLInputElement
+         */
+               public function get text():String
+               {
+            COMPILE::AS3
+            {
+                return ITextModel(model).text;                    
+            }
+            COMPILE::JS
+            {
+                return (element as HTMLInputElement).value;
+            }
+               }
+
+        /**
+         *  @private
+         *  @flexjsignorecoercion HTMLInputElement
+         */
+               public function set text(value:String):void
+               {
+            COMPILE::AS3
+            {
+                inSetter = true;
+                ITextModel(model).text = value;
+                inSetter = false;                    
+            }
+            COMPILE::JS
+            {
+                (element as HTMLInputElement).value = value;
+                dispatchEvent(new Event('textChange'));
+            }
+               }
+               
+        /**
+         *  @copy org.apache.flex.html.Label#html
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         *  @flexjsignorecoercion HTMLInputElement
+         */
+               public function get html():String
+               {
+            COMPILE::AS3
+            {
+                return ITextModel(model).html;                    
+            }
+            COMPILE::JS
+            {
+                return (element as HTMLInputElement).value;
+            }
+               }
+
+        /**
+         *  @private
+         *  @flexjsignorecoercion HTMLInputElement
+         */
+               public function set html(value:String):void
+               {
+            COMPILE::AS3
+            {
+                ITextModel(model).html = value;                    
+            }
+            COMPILE::JS
+            {
+                (element as HTMLInputElement).value = value;
+                dispatchEvent(new Event('textChange'));
+            }
+               }
+
+        private var inSetter:Boolean;
+        
+               /**
+                *  dispatch change event in response to a textChange event
+                *
+                *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+                */
+               public function textChangeHandler(event:Event):void
+               {
+            if (!inSetter)
+                dispatchEvent(new Event(Event.CHANGE));
+               }
+        
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+            element = document.createElement('input') as WrappedHTMLElement;
+            element.setAttribute('type', 'input');
+            element.className = 'TextInput';
+            typeNames = 'TextInput';
+            
+            //attach input handler to dispatch flexjs change event when user 
write in textinput
+            //goog.events.listen(element, 'change', killChangeHandler);
+            goog.events.listen(element, 'input', textChangeHandler);
+            
+            positioner = element;
+            positioner.style.position = 'relative';
+            element.flexjs_wrapper = this;
+            
+            return element;
+        }        
+        
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TitleBar.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TitleBar.as 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TitleBar.as
new file mode 100644
index 0000000..3902330
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/TitleBar.as
@@ -0,0 +1,146 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html
+{
+       import org.apache.flex.core.IBead;
+       import org.apache.flex.core.IBeadLayout;
+       import org.apache.flex.core.IChrome;
+       import org.apache.flex.core.ITitleBarModel;
+       import org.apache.flex.core.ValuesManager;
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;            
+    }
+       import org.apache.flex.events.Event;
+       import org.apache.flex.html.Label;
+       
+       /**
+        *  The TitleBar class is a Container component that displays a title 
and an
+        *  optional close button. The TitleBar uses the following bead types:
+        * 
+        *  org.apache.flex.core.IBeadModel: the data model, which includes the 
title and showCloseButton values.
+        *  org.apache.flex.core.IBeadView:  the bead that constructs the 
visual parts of the component.
+        *  org.apache.flex.core.IBeadLayout: the bead that handles size and 
position of the component parts 
+        *  (org.apache.flex.html.Label and org.apache.flex.html.Button).
+        *  org.apache.flex.core.IMeasurementBead: a bead that helps determine 
the size of the 
+        *  org.apache.flex.html.TitleBar for layout.
+        * 
+        *  @langversion 3.0
+        *  @playerversion Flash 10.2
+        *  @playerversion AIR 2.6
+        *  @productversion FlexJS 0.0
+        */
+       public class TitleBar extends Container implements IChrome
+       {
+               /**
+                *  constructor.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function TitleBar()
+               {
+                       super();
+                       
+                       className = "TitleBar";
+               }
+               
+               /**
+                *  The title string to display.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function get title():String
+               {
+                       return ITitleBarModel(model).title;
+               }
+               public function set title(value:String):void
+               {
+                       ITitleBarModel(model).title = value;
+               }
+               
+               /**
+                *  The HTML title to display.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function get htmlTitle():String
+               {
+                       return ITitleBarModel(model).htmlTitle;
+               }
+               public function set htmlTitle(value:String):void
+               {
+                       ITitleBarModel(model).htmlTitle = value;
+               }
+               
+               /**
+                *  Whether or not to show a org.apache.flex.html.Button that 
indicates the component
+                *  may be closed.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function get showCloseButton():Boolean
+               {
+                       return ITitleBarModel(model).showCloseButton;
+               }
+               public function set showCloseButton(value:Boolean):void
+               {
+                       ITitleBarModel(model).showCloseButton = value;
+               }
+               
+               /**
+                * @private
+                */
+               override public function addedToParent():void
+               {
+                       super.addedToParent();
+                       
+                       if( getBeadByType(IBeadLayout) == null )
+                               addBead(new 
(ValuesManager.valuesImpl.getValue(this, "iBeadLayout")) as IBead);
+               }
+        
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+            element = document.createElement('div') as WrappedHTMLElement;
+            
+            positioner = element;
+            positioner.style.position = 'relative';
+            element.flexjs_wrapper = this;
+            
+            className = 'TitleBar';
+            
+            return element;
+        }        
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ToggleTextButton.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ToggleTextButton.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ToggleTextButton.as
new file mode 100644
index 0000000..ea9b0f9
--- /dev/null
+++ 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ToggleTextButton.as
@@ -0,0 +1,170 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html
+{
+       import org.apache.flex.core.IStrand;
+       import org.apache.flex.core.IToggleButtonModel;
+       import org.apache.flex.core.IUIBase;
+       import org.apache.flex.core.ValuesManager;
+       import org.apache.flex.events.IEventDispatcher;
+    
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;
+    }
+       
+    //--------------------------------------
+    //  Events
+    //--------------------------------------
+    
+    /**
+     *  Dispatched when the user clicks on a button.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+       [Event(name="click", type="org.apache.flex.events.Event")]
+
+    /**
+     *  The ToggleButton class is a TextButton that supports
+     *  a selected property.
+     * 
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+       public class ToggleTextButton extends TextButton implements IStrand, 
IEventDispatcher, IUIBase
+       {
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function ToggleTextButton()
+               {
+                       super();
+            COMPILE::JS
+            {
+                this.typeNames = 'toggleTextButton';
+            }
+               }
+        
+        COMPILE::JS
+        private var _selected:Boolean;
+        
+        COMPILE::JS
+        private var SELECTED:String = "selected";
+        
+        /**
+         *  <code>true</code> if the Button is selected.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get selected():Boolean
+        {
+            COMPILE::AS3
+            {
+                return IToggleButtonModel(model).selected;                    
+            }
+            COMPILE::JS
+            {
+                return _selected;
+            }
+        }
+        
+        /**
+         *  @private
+         */
+        public function set selected(value:Boolean):void
+        {
+            COMPILE::AS3
+            {
+                IToggleButtonModel(model).selected = value;                    
+            }
+            COMPILE::JS
+            {
+                if (_selected != value) 
+                {
+                    _selected = value;
+                    
+                    var className:String = this.className;
+                    var typeNames:String = this.typeNames;
+                    if (value) {
+                        if (typeNames.indexOf(SELECTED) == -1) {
+                            typeNames = typeNames + SELECTED;
+                            if (className)
+                                element.className = typeNames + ' ' + 
className;
+                            else
+                                element.className = typeNames;
+                        }
+                    }
+                    else {
+                        if (typeNames.indexOf(SELECTED) == typeNames.length - 
SELECTED.length) {
+                            typeNames = typeNames.substring(0, 
typeNames.length - SELECTED.length);
+                            if (className)
+                                element.className = typeNames + ' ' + 
className;
+                            else
+                                element.className = typeNames;
+                        }
+                    }
+                }
+            }
+        }
+        
+        /**
+         *  @private
+         *  add another class selector
+         */
+        override public function get className():String
+        {
+            // we don't have a model yet so just pass through otherwise you 
will loop
+            if (!parent)
+                return super.className;
+            
+            var name:String = super.className;            
+            if (selected)
+                return "toggleTextButton_Selected" + (name ? " " + name : "");
+            else
+                return "toggleTextButton" + (name ? " " + name : "");
+        }
+        
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+            super.createElement();
+            element.addEventListener("click", clickHandler, false);
+            return element;
+        }
+        
+        COMPILE::JS
+        private function clickHandler(event:Event):void
+        {
+            selected = !selected;
+        }
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ToolTip.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ToolTip.as 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ToolTip.as
new file mode 100644
index 0000000..4093b09
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/ToolTip.as
@@ -0,0 +1,60 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html
+{
+       import org.apache.flex.core.ITextModel;
+       import org.apache.flex.core.UIBase;
+       import org.apache.flex.core.ValuesManager;
+       import org.apache.flex.events.Event;
+       import org.apache.flex.events.IEventDispatcher;
+       
+       /*
+        *  Label probably should extend TextField directly,
+        *  but the player's APIs for TextLine do not allow
+        *  direct instantiation, and we might want to allow
+        *  Labels to be declared and have their actual
+        *  view be swapped out.
+        */
+
+    /**
+     *  The Label class implements the basic control for labeling
+     *  other controls.  
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */    
+    public class ToolTip extends Label
+       {
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function ToolTip()
+               {
+                       super();
+               }
+               
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/VContainer.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/VContainer.as 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/VContainer.as
new file mode 100644
index 0000000..92ebdca
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/VContainer.as
@@ -0,0 +1,62 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html
+{
+       import org.apache.flex.core.ContainerBase;
+       import org.apache.flex.core.IChrome;
+       import org.apache.flex.core.IContainer;
+       import org.apache.flex.core.IUIBase;
+       import org.apache.flex.events.Event;
+       
+       [DefaultProperty("mxmlContent")]
+    
+    /**
+     *  A Container that has a VerticalLayout.
+     * 
+     *  This is effectively the same as the pattern
+     *  <code>
+     *  <basic:Container xmlns:basic="library://ns.apache.org/flexjs/basic">
+     *    <basic:layout>
+     *       <basic:VerticalLayout />
+     *    </basic:layout>
+     *  </basic:Container>
+     *  </code>
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */    
+       public class VContainer extends Container implements IContainer
+       {
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function VContainer()
+               {
+                       super();
+               }
+               
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/VRule.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/VRule.as 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/VRule.as
new file mode 100644
index 0000000..d727f2a
--- /dev/null
+++ b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/VRule.as
@@ -0,0 +1,68 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html
+{
+       import org.apache.flex.core.UIBase;
+    COMPILE::JS
+    {
+        import org.apache.flex.core.WrappedHTMLElement;            
+    }
+       
+    /**
+     *  The VRule class displays a vertical line
+     *
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */    
+       public class VRule extends UIBase
+       {
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function VRule()
+               {
+                       super();
+        }
+        
+        /**
+         * @flexjsignorecoercion org.apache.flex.core.WrappedHTMLElement
+         */
+        COMPILE::JS
+        override protected function createElement():WrappedHTMLElement
+        {
+            element = document.createElement('div') as WrappedHTMLElement;
+            element.style.borderLeftStyle = 'solid';
+            element.style.borderLeftWidth = '1px';
+            element.style.borderTop = 'none';
+            element.style.borderBottom = 'none';
+            element.style.borderRight = 'none';
+            positioner = element;
+            positioner.style.position = 'relative';
+            element.flexjs_wrapper = this;
+            return element;
+        }        
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/NumericOnlyTextInputBead.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/NumericOnlyTextInputBead.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/NumericOnlyTextInputBead.as
new file mode 100644
index 0000000..8790830
--- /dev/null
+++ 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/NumericOnlyTextInputBead.as
@@ -0,0 +1,199 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.accessories
+{
+       COMPILE::JS
+       {
+               import goog.events.BrowserEvent;
+       }
+       COMPILE::AS3
+       {
+               import flash.events.TextEvent;
+               
+               import org.apache.flex.core.CSSTextField;                       
+       }
+       import org.apache.flex.core.IBead;
+       import org.apache.flex.core.IStrand;
+       import org.apache.flex.events.Event;
+       import org.apache.flex.events.IEventDispatcher;
+       COMPILE::AS3
+       {
+               import org.apache.flex.html.beads.ITextFieldView;               
        
+       }
+       
+       /**
+        *  The NumericOnlyTextInputBead class is a specialty bead that can be 
used with
+        *  any TextInput control. The bead prevents non-numeric entry into the 
text input
+        *  area.
+        *  
+        *  @langversion 3.0
+        *  @playerversion Flash 10.2
+        *  @playerversion AIR 2.6
+        *  @productversion FlexJS 0.0
+        */
+       public class NumericOnlyTextInputBead implements IBead
+       {
+               /**
+                *  constructor.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function NumericOnlyTextInputBead()
+               {
+               }
+               
+               private var _strand:IStrand;
+               
+               /**
+                *  @copy org.apache.flex.core.IBead#strand
+                *  
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function set strand(value:IStrand):void
+               {
+                       _strand = value;
+                       
+                       COMPILE::AS3
+                       {
+                               
IEventDispatcher(value).addEventListener("viewChanged",viewChangeHandler);      
                                
+                       }
+                       COMPILE::JS
+                       {
+                               
IEventDispatcher(value).addEventListener("keypress",validateInput);             
                                                        
+                       }
+               }
+               
+               private var _decimalSeparator:String = ".";
+               
+               /**
+                *  The character used to separate the integer and fraction 
parts of numbers.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function get decimalSeparator():String
+               {
+                       return _decimalSeparator;
+               }
+               public function set decimalSeparator(value:String):void
+               {
+                       if (_decimalSeparator != value) {
+                               _decimalSeparator = value;
+                       }
+               }
+               
+        private var _maxChars:int = 0;
+        
+        /**
+         *  The character used to separate the integer and fraction parts of 
numbers.
+         *
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+        public function get maxChars():int
+        {
+            return _maxChars;
+        }
+        public function set maxChars(value:int):void
+        {
+            if (_maxChars != value) {
+                _maxChars = value;
+            }
+        }
+
+        /**
+                * @private
+                */
+               COMPILE::AS3
+               private function viewChangeHandler(event:Event):void
+               {                       
+                       // get the ITextFieldView bead, which is required for 
this bead to work
+                       var textView:ITextFieldView = 
_strand.getBeadByType(ITextFieldView) as ITextFieldView;
+                       if (textView) {
+                               var textField:CSSTextField = textView.textField;
+                               textField.restrict = "0-9" + decimalSeparator;
+                               textField.maxChars = maxChars;
+                               // listen for changes to this textField and 
prevent non-numeric values, such
+                               // as 34.09.94
+                               
textField.addEventListener(TextEvent.TEXT_INPUT, handleTextInput);
+                       }
+                       else {
+                               throw new Error("NumericOnlyTextInputBead 
requires strand to have an ITextFieldView bead");
+                       }
+               }
+               
+               /**
+                * @private
+                */
+               COMPILE::AS3
+               private function handleTextInput(event:TextEvent):void
+               {
+                       var insert:String = event.text;
+                       var caretIndex:int = (event.target as 
CSSTextField).caretIndex;
+                       var current:String = (event.target as 
CSSTextField).text;
+                       var value:String = current.substring(0,caretIndex) + 
insert + current.substr(caretIndex);
+                       var n:Number = Number(value);
+                       if (isNaN(n)) event.preventDefault();
+               }
+               
+               COMPILE::JS
+               private function validateInput(event:BrowserEvent):void
+               {
+                       var code:int = event.charCode;
+                       
+                       // backspace or delete
+                       if (event.keyCode == 8 || event.keyCode == 46) return;
+                       
+                       // tab or return/enter
+                       if (event.keyCode == 9 || event.keyCode == 13) return;
+                       
+                       // left or right cursor arrow
+                       if (event.keyCode == 37 || event.keyCode == 39) return;
+                       
+                       var key:String = String.fromCharCode(code);
+                       
+                       var regex:RegExp = /[0-9]|\./;
+                       if (!regex.test(key)) {
+                               event["returnValue"] = false;
+                               if (event.preventDefault) 
event.preventDefault();
+                               return;
+                       }
+                       var cursorStart:int = event.target.selectionStart;
+                       var cursorEnd:int = event.target.selectionEnd;
+                       var left:String = event.target.value.substring(0, 
cursorStart);
+                       var right:String = event.target.value.substr(cursorEnd);
+                       var complete:String = left + key + right;
+                       if (isNaN(parseFloat(complete))) {
+                               event["returnValue"] = false;
+                               if (event.preventDefault) 
event.preventDefault();
+                       }
+
+               }
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/PasswordInputBead.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/PasswordInputBead.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/PasswordInputBead.as
new file mode 100644
index 0000000..191339b
--- /dev/null
+++ 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/PasswordInputBead.as
@@ -0,0 +1,102 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.accessories
+{
+       COMPILE::AS3
+       {
+               import org.apache.flex.core.CSSTextField;                       
+       }
+       import org.apache.flex.core.IBead;
+       import org.apache.flex.core.IStrand;
+       import org.apache.flex.core.UIBase;
+       import org.apache.flex.events.Event;
+       import org.apache.flex.events.IEventDispatcher;
+       COMPILE::AS3
+       {
+               import org.apache.flex.html.beads.ITextFieldView;
+       }
+       
+       /**
+        *  The PasswordInput class is a specialty bead that can be used with
+        *  any TextInput control. The bead secures the text input area by 
masking
+        *  the input as it is typed.
+        *  
+        *  @langversion 3.0
+        *  @playerversion Flash 10.2
+        *  @playerversion AIR 2.6
+        *  @productversion FlexJS 0.0
+        */
+       public class PasswordInputBead implements IBead
+       {
+               /**
+                *  constructor.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function PasswordInputBead()
+               {
+               }
+               
+               private var _strand:IStrand;
+               
+               /**
+                *  @copy org.apache.flex.core.IBead#strand
+                *  
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function set strand(value:IStrand):void
+               {
+                       _strand = value;
+                       
+                       COMPILE::AS3
+                       {
+                               
IEventDispatcher(value).addEventListener("viewChanged",viewChangeHandler);      
                                
+                       }
+                       COMPILE::JS
+                       {
+                               var host:UIBase = value as UIBase;
+                               var e:HTMLInputElement = host.element as 
HTMLInputElement;
+                               e.type = 'password';
+                       }
+               }
+               
+               /**
+                * @private
+                */
+               COMPILE::AS3
+               private function viewChangeHandler(event:Event):void
+               {                       
+                       // get the ITextFieldView bead, which is required for 
this bead to work
+                       var textView:ITextFieldView = 
_strand.getBeadByType(ITextFieldView) as ITextFieldView;
+                       if (textView) {
+                               var textField:CSSTextField = textView.textField;
+                               textField.displayAsPassword = true;
+                       }
+                       else {
+                               throw new Error("PasswordInputBead requires 
strand to have a TextInputView bead");
+                       }
+               }
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/TextPromptBead.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/TextPromptBead.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/TextPromptBead.as
new file mode 100644
index 0000000..5447da6
--- /dev/null
+++ 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/TextPromptBead.as
@@ -0,0 +1,148 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.accessories
+{
+       COMPILE::AS3
+       {
+               import flash.text.TextFieldType;                        
+               
+               import org.apache.flex.core.CSSTextField;
+       }
+       
+       import org.apache.flex.core.IBead;
+       import org.apache.flex.core.IStrand;
+       import org.apache.flex.core.UIBase;
+       import org.apache.flex.events.Event;
+       import org.apache.flex.events.IEventDispatcher;
+       
+       /**
+        *  The TextPromptBead class is a specialty bead that can be used with
+        *  any TextInput control. The bead places a string into the input field
+        *  when there is no value associated with the text property.
+        *  
+        *  @langversion 3.0
+        *  @playerversion Flash 10.2
+        *  @playerversion AIR 2.6
+        *  @productversion FlexJS 0.0
+        */
+       public class TextPromptBead implements IBead
+       {
+               /**
+                *  constructor.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function TextPromptBead()
+               {
+               }
+               
+               private var _prompt:String;
+               
+               /**
+                *  The string to use as the placeholder prompt.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function get prompt():String
+               {
+                       return _prompt;
+               }
+               public function set prompt(value:String):void
+               {
+                       _prompt = value;
+               }
+               
+               private var _strand:IStrand;
+               
+               /**
+                *  @copy org.apache.flex.core.IBead#strand
+                *  
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                *  @flexjsignorecoercion HTMLInputElement
+                *  @flexjsignorecoercion org.apache.flex.core.UIBase;
+                */
+               public function set strand(value:IStrand):void
+               {
+                       _strand = value;
+                       
+                       COMPILE::AS3
+                       {
+                               // listen for changes in text to hide or show 
the prompt
+                               var model:Object = UIBase(_strand).model;
+                               if (!model.hasOwnProperty("text")) {
+                                       throw new Error("Model requires a text 
property when used with TextPromptBead");
+                               }
+                               
IEventDispatcher(model).addEventListener("textChange", handleTextChange);
+                               
+                               // create a TextField that displays the prompt 
- it shows
+                               // and hides based on the model's content
+                               promptField = new CSSTextField();
+                               promptField.selectable = false;
+                               promptField.type = TextFieldType.DYNAMIC;
+                               promptField.mouseEnabled = false;
+                               promptField.multiline = false;
+                               promptField.wordWrap = false;
+                               promptField.textColor = 0xBBBBBB;
+                               
+                               // trigger the event handler to display if 
needed
+                               handleTextChange(null);                         
        
+                       }
+                       COMPILE::JS
+                       {
+                               var host:UIBase = value as UIBase;
+                               var e:HTMLInputElement = host.element as 
HTMLInputElement;
+                               e.placeholder = prompt;
+                       }
+               }
+               
+               COMPILE::AS3
+               private var promptField:CSSTextField;
+               private var promptAdded:Boolean;
+               
+               /**
+                * @private
+                */
+               COMPILE::AS3
+               private function handleTextChange( event:Event ):void
+               {       
+                       // see what the model currently has to determine if the 
prompt should be
+                       // displayed or not.
+                       var model:Object = UIBase(_strand).model;
+                       
+                       if (model.text != null && model.text.length > 0 ) {
+                               if (promptAdded) 
UIBase(_strand).removeChild(promptField);
+                               promptAdded = false;
+                       }
+                       else {
+                               if (!promptAdded) 
UIBase(_strand).addChild(promptField);
+                               promptField.text = prompt;
+                               promptAdded = true;
+                       }
+               }
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/ToolTipBead.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/ToolTipBead.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/ToolTipBead.as
new file mode 100644
index 0000000..64d04bf
--- /dev/null
+++ 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/accessories/ToolTipBead.as
@@ -0,0 +1,141 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.accessories
+{
+       
+       import org.apache.flex.core.IBead;
+       import org.apache.flex.core.IPopUpHost;
+       import org.apache.flex.core.IStrand;
+       import org.apache.flex.core.IUIBase;
+       import org.apache.flex.core.UIBase;
+       import org.apache.flex.events.Event;
+       import org.apache.flex.events.IEventDispatcher;
+       import org.apache.flex.events.MouseEvent;
+       import org.apache.flex.events.utils.MouseUtils;
+       import org.apache.flex.geom.Point;
+       import org.apache.flex.html.ToolTip;
+       import org.apache.flex.utils.PointUtils;
+       import org.apache.flex.utils.UIUtils;
+       
+       /**
+        *  The ToolTipBead class is a specialty bead that can be used with
+        *  any control. The bead floats a string over a control if
+     *  the user hovers over the control with a mouse.
+        *  
+        *  @langversion 3.0
+        *  @playerversion Flash 10.2
+        *  @playerversion AIR 2.6
+        *  @productversion FlexJS 0.0
+        */
+       public class ToolTipBead implements IBead
+       {
+               /**
+                *  constructor.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function ToolTipBead()
+               {
+               }
+               
+               private var _toolTip:String;
+               
+               /**
+                *  The string to use as the toolTip.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function get toolTip():String
+               {
+                       return _toolTip;
+               }
+               public function set toolTip(value:String):void
+               {
+            _toolTip = value;
+               }
+               
+               private var _strand:IStrand;
+               
+               /**
+                *  @copy org.apache.flex.core.IBead#strand
+                *  
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function set strand(value:IStrand):void
+               {
+                       _strand = value;
+
+            IEventDispatcher(_strand).addEventListener(MouseEvent.MOUSE_OVER, 
rollOverHandler, false);
+               }
+               
+        private var tt:ToolTip;
+        private var host:IPopUpHost;
+        
+               /**
+                * @private
+                */
+               protected function rollOverHandler( event:MouseEvent ):void
+               {       
+            IEventDispatcher(_strand).addEventListener(MouseEvent.MOUSE_OUT, 
rollOutHandler, false);
+            
+            var comp:IUIBase = _strand as IUIBase
+            host = UIUtils.findPopUpHost(comp);
+                       if (tt) host.removeElement(tt);
+                       
+            tt = new ToolTip();
+            tt.text = toolTip;
+            var pt:Point = determinePosition(event, event.target);
+            tt.x = pt.x;
+            tt.y = pt.y;
+            host.addElement(tt, false); // don't trigger a layout
+               }
+               
+               /**
+                * @private
+                * Determines the position of the toolTip.
+                */
+               protected function determinePosition(event:MouseEvent, 
base:Object):Point
+               {
+                       var comp:IUIBase = _strand as IUIBase;
+                       var pt:Point = new Point(comp.width, comp.height);
+                       pt = PointUtils.localToGlobal(pt, comp);
+                       return pt;
+               }
+        
+        /**
+         * @private
+         */
+        private function rollOutHandler( event:MouseEvent ):void
+        {      
+            if (tt) {
+                host.removeElement(tt);
+                       }
+            tt = null;
+        }
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AlertMeasurementBead.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AlertMeasurementBead.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AlertMeasurementBead.as
new file mode 100644
index 0000000..dbe6c05
--- /dev/null
+++ 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AlertMeasurementBead.as
@@ -0,0 +1,88 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.beads
+{
+       import org.apache.flex.core.IMeasurementBead;
+       import org.apache.flex.core.IStrand;
+       
+       /**
+        *  The AlertMeasureBead class provides boundary measurements for an 
+        *  org.apache.flex.html.Alert component.
+        *  
+        *  @langversion 3.0
+        *  @playerversion Flash 10.2
+        *  @playerversion AIR 2.6
+        *  @productversion FlexJS 0.0
+        */
+       public class AlertMeasurementBead implements IMeasurementBead
+       {
+               /**
+                *  constructor.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function AlertMeasurementBead()
+               {
+               }
+               
+               /**
+                *  Returns the overall width of the org.apache.flex.html.Alert 
component.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function get measuredWidth():Number
+               {
+                       return 0;
+               }
+               
+               /**
+                *  Returns the overall height of the 
org.apache.flex.html.Alert component.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function get measuredHeight():Number
+               {
+                       return 0;
+               }
+               
+               private var _strand:IStrand;
+               
+               /**
+                *  @copy org.apache.flex.core.IBead#strand
+                *  
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function set strand(value:IStrand):void
+               {
+                       _strand = value;
+               }
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AlertView.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AlertView.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AlertView.as
new file mode 100644
index 0000000..5788d47
--- /dev/null
+++ 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/AlertView.as
@@ -0,0 +1,226 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.beads
+{
+    import org.apache.flex.core.BeadViewBase;
+       import org.apache.flex.core.IAlertModel;
+       import org.apache.flex.core.IBead;
+    import org.apache.flex.core.IBeadView;
+       import org.apache.flex.core.IMeasurementBead;
+    import org.apache.flex.core.IParent;
+       import org.apache.flex.core.IStrand;
+       import org.apache.flex.core.UIBase;
+       import org.apache.flex.core.ValuesManager;
+       import org.apache.flex.events.Event;
+       import org.apache.flex.events.IEventDispatcher;
+    import org.apache.flex.geom.Rectangle;
+       import org.apache.flex.html.Alert;
+       import org.apache.flex.html.ControlBar;
+    import org.apache.flex.html.Label;
+       import org.apache.flex.html.TextButton;
+       import org.apache.flex.html.TitleBar;
+       import org.apache.flex.utils.CSSContainerUtils;
+       
+       /**
+        *  The AlertView class creates the visual elements of the 
org.apache.flex.html.Alert
+        *  component. The job of the view bead is to put together the parts of 
the Alert, such as the 
+        *  title bar, message, and various buttons, within the space of the 
Alert component strand.
+        *  
+        *  @langversion 3.0
+        *  @playerversion Flash 10.2
+        *  @playerversion AIR 2.6
+        *  @productversion FlexJS 0.0
+        */
+       public class AlertView extends BeadViewBase implements IBeadView
+       {
+               /**
+                *  constructor.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function AlertView()
+               {
+               }
+               
+               private var _titleBar:TitleBar;
+               private var _controlBar:ControlBar;
+               private var _label:Label;
+               private var _okButton:TextButton;
+               private var _cancelButton:TextButton;
+               private var _yesButton:TextButton;
+               private var _noButton:TextButton;
+               
+               /**
+                *  @copy org.apache.flex.core.IBead#strand
+                *  
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               override public function set strand(value:IStrand):void
+               {
+                       super.strand = value;
+
+            var backgroundColor:Object = 
ValuesManager.valuesImpl.getValue(value, "background-color");
+                       var backgroundImage:Object = 
ValuesManager.valuesImpl.getValue(value, "background-image");
+                       if (backgroundColor != null || backgroundImage != null)
+                       {
+                               if (value.getBeadByType(IBackgroundBead) == 
null)
+                                       value.addBead(new 
(ValuesManager.valuesImpl.getValue(value, "iBackgroundBead")) as IBead);        
                              
+                       }
+                       
+                       var borderStyle:String;
+                       var borderStyles:Object = 
ValuesManager.valuesImpl.getValue(value, "border");
+                       if (borderStyles is Array)
+                       {
+                               borderStyle = borderStyles[1];
+                       }
+                       if (borderStyle == null)
+                       {
+                               borderStyle = 
ValuesManager.valuesImpl.getValue(value, "border-style") as String;
+                       }
+                       if (borderStyle != null && borderStyle != "none")
+                       {
+                               if (value.getBeadByType(IBorderBead) == null)
+                                       value.addBead(new 
(ValuesManager.valuesImpl.getValue(value, "iBorderBead")) as IBead);  
+                       }
+                       
+                       var flags:uint = 
IAlertModel(UIBase(_strand).model).flags;
+                       if( flags & Alert.OK ) {
+                               _okButton = new TextButton();
+                               _okButton.text = 
IAlertModel(UIBase(_strand).model).okLabel;
+                               _okButton.addEventListener("click",handleOK);
+                       }
+                       if( flags & Alert.CANCEL ) {
+                               _cancelButton = new TextButton();
+                               _cancelButton.text = 
IAlertModel(UIBase(_strand).model).cancelLabel;
+                               
_cancelButton.addEventListener("click",handleCancel);
+                       }
+                       if( flags & Alert.YES ) {
+                               _yesButton = new TextButton();
+                               _yesButton.text = 
IAlertModel(UIBase(_strand).model).yesLabel;
+                               _yesButton.addEventListener("click",handleYes);
+                       }
+                       if( flags & Alert.NO ) {
+                               _noButton = new TextButton();
+                               _noButton.text = 
IAlertModel(UIBase(_strand).model).noLabel;
+                               _noButton.addEventListener("click",handleNo);
+                       }
+                       
+                       _titleBar = new TitleBar();
+                       _titleBar.title = 
IAlertModel(UIBase(_strand).model).title;
+                       
+                       _label = new Label();
+                       _label.text = 
IAlertModel(UIBase(_strand).model).message;
+                       
+                       _controlBar = new ControlBar();
+                       if( _okButton ) _controlBar.addElement(_okButton);
+                       if( _cancelButton ) 
_controlBar.addElement(_cancelButton);
+                       if( _yesButton  ) _controlBar.addElement(_yesButton);
+                       if( _noButton ) _controlBar.addElement(_noButton);
+                       
+                   IParent(_strand).addElement(_titleBar);
+            IParent(_strand).addElement(_controlBar);
+            IParent(_strand).addElement(_label);
+                       
+                       sizeHandler(null);
+               }
+               
+               /**
+                * @private
+                */
+               private function sizeHandler(event:Event):void
+               {
+                       var labelMeasure:IMeasurementBead = 
_label.measurementBead;
+                       var titleMeasure:IMeasurementBead = 
_titleBar.measurementBead;
+                       var ctrlMeasure:IMeasurementBead  = 
_controlBar.measurementBead;
+                       var maxWidth:Number = 
Math.max(titleMeasure.measuredWidth, ctrlMeasure.measuredWidth, 
labelMeasure.measuredWidth);
+                       
+                       var metrics:Rectangle = 
CSSContainerUtils.getBorderAndPaddingMetrics(_strand);
+
+                       _titleBar.x = 0;
+                       _titleBar.y = 0;
+                       _titleBar.width = maxWidth;
+                       _titleBar.height = 25;
+                       _titleBar.dispatchEvent(new Event("layoutNeeded"));
+                       
+                       // content placement here
+                       _label.x = metrics.left;
+                       _label.y = _titleBar.y + _titleBar.height + metrics.top;
+                       _label.width = maxWidth - metrics.left - metrics.right;
+                       
+                       _controlBar.x = 0;
+                       _controlBar.y = _titleBar.height + _label.y + 
_label.height + metrics.bottom;
+                       _controlBar.width = maxWidth;
+                       _controlBar.height = 25;
+                       _controlBar.dispatchEvent(new Event("layoutNeeded"));
+                       
+                       UIBase(_strand).width = maxWidth;
+                       UIBase(_strand).height = _titleBar.height + 
_label.height + _controlBar.height + metrics.top + metrics.bottom;
+               }
+               
+               /**
+                * @private
+                */
+               private function handleOK(event:Event):void
+               {
+                       // create some custom event where the detail value
+                       // is the OK button flag. Do same for other event 
handlers
+                       dispatchCloseEvent(Alert.OK);
+               }
+               
+               /**
+                * @private
+                */
+               private function handleCancel(event:Event):void
+               {
+                       dispatchCloseEvent(Alert.CANCEL);
+               }
+               
+               /**
+                * @private
+                */
+               private function handleYes(event:Event):void
+               {
+                       dispatchCloseEvent(Alert.YES);
+               }
+               
+               /**
+                * @private
+                */
+               private function handleNo(event:Event):void
+               {
+                       dispatchCloseEvent(Alert.NO);
+               }
+               
+               /**
+                * @private
+                */
+               public function dispatchCloseEvent(buttonFlag:uint):void
+               {
+                       // TO DO: buttonFlag should be part of the event
+                       var newEvent:Event = new Event("close",true);
+                       IEventDispatcher(_strand).dispatchEvent(newEvent);
+               }
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/BackgroundImageBead.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/BackgroundImageBead.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/BackgroundImageBead.as
new file mode 100644
index 0000000..bee07e9
--- /dev/null
+++ 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/BackgroundImageBead.as
@@ -0,0 +1,112 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.beads
+{
+       import flash.display.Bitmap;
+       import flash.display.Loader;
+       import flash.display.LoaderInfo;
+       import flash.display.Sprite;
+       import flash.events.Event;
+       import flash.events.IOErrorEvent;
+       import flash.net.URLRequest;
+       
+       import org.apache.flex.core.IBead;
+       import org.apache.flex.core.IStrand;
+       import org.apache.flex.core.UIBase;
+       import org.apache.flex.core.ValuesManager;
+       
+       /**
+        *  The BackgroundImageBead is used to render an image as the 
background to any component
+        *  that supports it, such as Container.
+        * 
+        *  Note that this bead is for ActionScript only since CSS/HTML allows 
this just by specifying
+        *  a background image in the style selector. To use this bead, place a 
ClassReference to it
+        *  within @media -flex-flash { } group in the CSS declarations.
+        *  
+        *  @langversion 3.0
+        *  @playerversion Flash 10.2
+        *  @playerversion AIR 2.6
+        *  @productversion FlexJS 0.0
+        */
+       public class BackgroundImageBead implements IBead, IBackgroundBead
+       {
+               /**
+                *  Constructor
+                *  
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function BackgroundImageBead()
+               {
+                       backgroundSprite = new Sprite();
+               }
+               
+               private var _strand:IStrand;
+               private var backgroundSprite:Sprite;
+               private var bitmap:Bitmap;
+               private var loader:Loader;
+               
+               public function set strand(value:IStrand):void
+               {
+                       _strand = value;
+                       
+                       setupBackground(backgroundSprite);
+               }
+               
+               /**
+                * @private
+                */
+               private function setupBackground(sprite:Sprite, state:String = 
null):void
+               {
+                       var backgroundImage:Object = 
ValuesManager.valuesImpl.getValue(_strand, "background-image", state);
+                       if (backgroundImage)
+                       {
+                               loader = new Loader();
+                               var url:String = backgroundImage as String;
+                               loader.load(new URLRequest(url));
+                               
loader.contentLoaderInfo.addEventListener(IOErrorEvent.IO_ERROR, function 
(e:IOErrorEvent):void {
+                                       trace(e);
+                                       e.preventDefault();
+                               });
+                               
loader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, function 
(e:flash.events.Event):void { 
+                                       var host:UIBase = UIBase(_strand);
+                                       if (bitmap) {
+                                               host.removeChild(bitmap);
+                                       }
+                                       
+                                       bitmap = 
Bitmap(LoaderInfo(e.target).content);
+                                       
+                                       host.addChildAt(bitmap,0);
+                                       
+                                       if (isNaN(host.explicitWidth) && 
isNaN(host.percentWidth))
+                                               
host.setWidth(loader.content.width);
+                                       else
+                                               bitmap.width = 
UIBase(_strand).width;
+                                       
+                                       if (isNaN(host.explicitHeight) && 
isNaN(host.percentHeight))
+                                               
host.setHeight(loader.content.height);
+                                       else
+                                               bitmap.height = 
UIBase(_strand).height;
+                               });
+                       }
+               }
+       }
+}
\ No newline at end of file

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ButtonBarView.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ButtonBarView.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ButtonBarView.as
new file mode 100644
index 0000000..cbe0a3e
--- /dev/null
+++ 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/ButtonBarView.as
@@ -0,0 +1,69 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.beads
+{
+       import org.apache.flex.core.IBead;
+       import org.apache.flex.core.IBeadModel;
+       import org.apache.flex.core.IParent;
+       import org.apache.flex.core.IStrand;
+       import org.apache.flex.core.ValuesManager;
+       import org.apache.flex.core.UIBase;
+       import org.apache.flex.events.Event;
+       import org.apache.flex.events.IEventDispatcher;
+       import org.apache.flex.html.supportClasses.Border;
+
+       /**
+        *  The ButtonBarView class creates the visual elements of the 
org.apache.flex.html.ButtonBar 
+        *  component. A ButtonBar is a type of List and ButtonBarView extends 
the ListView bead, adding a border.
+        *  
+        *  @langversion 3.0
+        *  @playerversion Flash 10.2
+        *  @playerversion AIR 2.6
+        *  @productversion FlexJS 0.0
+        */
+       public class ButtonBarView extends ListView
+       {
+               /**
+                *  constructor.
+                *
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               public function ButtonBarView()
+               {
+                       super();
+               }
+                               
+               /**
+                *  @copy org.apache.flex.core.IBead#strand
+                *  
+                *  @langversion 3.0
+                *  @playerversion Flash 10.2
+                *  @playerversion AIR 2.6
+                *  @productversion FlexJS 0.0
+                */
+               override public function set strand(value:IStrand):void
+               {
+                       _strand = value;
+                       super.strand = value;
+               }               
+       }
+}

http://git-wip-us.apache.org/repos/asf/flex-asjs/blob/7853ef15/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CSSButtonView.as
----------------------------------------------------------------------
diff --git 
a/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CSSButtonView.as
 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CSSButtonView.as
new file mode 100644
index 0000000..fcd14cc
--- /dev/null
+++ 
b/frameworks/projects/HTML/src/main/flex/org/apache/flex/html/beads/CSSButtonView.as
@@ -0,0 +1,167 @@
+////////////////////////////////////////////////////////////////////////////////
+//
+//  Licensed to the Apache Software Foundation (ASF) under one or more
+//  contributor license agreements.  See the NOTICE file distributed with
+//  this work for additional information regarding copyright ownership.
+//  The ASF licenses this file to You under the Apache License, Version 2.0
+//  (the "License"); you may not use this file except in compliance with
+//  the License.  You may obtain a copy of the License at
+//
+//      http://www.apache.org/licenses/LICENSE-2.0
+//
+//  Unless required by applicable law or agreed to in writing, software
+//  distributed under the License is distributed on an "AS IS" BASIS,
+//  WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+//  See the License for the specific language governing permissions and
+//  limitations under the License.
+//
+////////////////////////////////////////////////////////////////////////////////
+package org.apache.flex.html.beads
+{
+    import flash.display.DisplayObject;
+    import flash.display.Loader;
+    import flash.display.Shape;
+    import flash.display.SimpleButton;
+    import flash.display.Sprite;
+    import flash.events.Event;
+    import flash.net.URLRequest;
+    
+    import org.apache.flex.core.BeadViewBase;
+    import org.apache.flex.core.IBeadView;
+    import org.apache.flex.core.IStrand;
+    import org.apache.flex.core.ITextModel;
+    import org.apache.flex.core.ValuesManager;
+    import org.apache.flex.events.Event;
+    import org.apache.flex.events.IEventDispatcher;
+    import org.apache.flex.utils.CSSBorderUtils;
+    import org.apache.flex.utils.CSSUtils;
+    import org.apache.flex.utils.StringTrimmer;
+
+    /**
+     *  The CSSButtonView class is the default view for
+     *  the org.apache.flex.html.Button class.
+     *  It allows the look of the button to be expressed
+     *  in CSS via the background-image style.  This view
+     *  does not display text.  Use CSSTextButtonView and
+     *  TextButton instead.
+     *  
+     *  @langversion 3.0
+     *  @playerversion Flash 10.2
+     *  @playerversion AIR 2.6
+     *  @productversion FlexJS 0.0
+     */
+       public class CSSButtonView extends BeadViewBase implements IBeadView
+       {
+        /**
+         *  Constructor.
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               public function CSSButtonView()
+               {
+                       upSprite = new Sprite();
+                       downSprite = new Sprite();
+                       overSprite = new Sprite();
+               }
+               
+               private var textModel:ITextModel;
+               
+               private var shape:Shape;
+               
+        /**
+         *  @copy org.apache.flex.core.IBead#strand
+         *  
+         *  @langversion 3.0
+         *  @playerversion Flash 10.2
+         *  @playerversion AIR 2.6
+         *  @productversion FlexJS 0.0
+         */
+               override public function set strand(value:IStrand):void
+               {
+                       super.strand = value;
+                       shape = new Shape();
+                       shape.graphics.beginFill(0xCCCCCC);
+                       shape.graphics.drawRect(0, 0, 10, 10);
+                       shape.graphics.endFill();
+                       SimpleButton(value).upState = upSprite;
+                       SimpleButton(value).downState = downSprite;
+                       SimpleButton(value).overState = overSprite;
+                       SimpleButton(value).hitTestState = shape;
+
+            setupBackground(overSprite, "hover");
+            setupBackground(downSprite, "active");
+            setupBackground(upSprite);
+            
+            
IEventDispatcher(_strand).addEventListener("widthChanged",sizeChangeHandler);
+            
IEventDispatcher(_strand).addEventListener("heightChanged",sizeChangeHandler);
+               }
+       
+        private function 
sizeChangeHandler(event:org.apache.flex.events.Event):void
+        {
+            setupSkins();
+        }
+        
+        protected function setupSkins():void
+        {
+            setupSkin(overSprite, "hover");
+            setupSkin(downSprite, "active");
+            setupSkin(upSprite);
+            updateHitArea();
+        }
+
+               private function setupSkin(sprite:Sprite, state:String = 
null):void
+               {
+                       var padding:Object = 
ValuesManager.valuesImpl.getValue(_strand, "padding", state);
+                       var paddingLeft:Object = 
ValuesManager.valuesImpl.getValue(_strand, "padding-left", state);
+                       var paddingRight:Object = 
ValuesManager.valuesImpl.getValue(_strand, "padding-right", state);
+                       var paddingTop:Object = 
ValuesManager.valuesImpl.getValue(_strand, "padding-top", state);
+                       var paddingBottom:Object = 
ValuesManager.valuesImpl.getValue(_strand, "padding-bottom", state);
+                       var pl:Number = CSSUtils.getLeftValue(paddingLeft, 
padding, DisplayObject(_strand).width);
+            var pr:Number = CSSUtils.getRightValue(paddingRight, padding, 
DisplayObject(_strand).width);
+            var pt:Number = CSSUtils.getTopValue(paddingTop, padding, 
DisplayObject(_strand).height);
+            var pb:Number = CSSUtils.getBottomValue(paddingBottom, padding, 
DisplayObject(_strand).height);
+                       
+                   CSSBorderUtils.draw(sprite.graphics, 
+                                       DisplayObject(_strand).width + pl + pr, 
+                                       DisplayObject(_strand).height + pt + pb,
+                    _strand as DisplayObject,
+                    state, true);
+               }
+               
+        private function setupBackground(sprite:Sprite, state:String = 
null):void
+        {
+            var backgroundImage:Object = 
ValuesManager.valuesImpl.getValue(_strand, "background-image", state);
+            if (backgroundImage)
+            {
+                var loader:Loader = new Loader();
+                sprite.addChildAt(loader, 0);
+                var url:String = backgroundImage as String;
+                loader.load(new URLRequest(url));
+                
loader.contentLoaderInfo.addEventListener(flash.events.Event.COMPLETE, function 
(e:flash.events.Event):void { 
+                    setupSkin(sprite, state);
+                    updateHitArea();
+                });
+            }
+            else {
+                setupSkin(sprite, state);
+                updateHitArea();
+            }
+        }
+        
+               private var upSprite:Sprite;
+               private var downSprite:Sprite;
+               private var overSprite:Sprite;
+                               
+               private function updateHitArea():void
+               {
+                       shape.graphics.clear();
+                       shape.graphics.beginFill(0xCCCCCC);
+                       shape.graphics.drawRect(0, 0, upSprite.width, 
upSprite.height);
+                       shape.graphics.endFill();
+                       
+               }
+       }
+}

Reply via email to