



Participação: Estruturação de elementos e conteúdo com tabless, flash e javascript (Mootools).
Agência: Labclick
Link: www.proamendoim.com.br
meuMc.rotation = 270;
trace(meuMc.rotation);
//Retorna: -90
Px = cosseno(radiano) * raio;
Py = seno(radiano) * raio;
var radius:Number = 100;
var circle:Shape = new Shape();
circle.graphics.lineStyle(1);
circle.graphics.moveTo(radius, 0);
for (var i:int = 0; i <= 360; i++)
{
var radian:Number = i * (Math.PI / 180);
var xPoint:Number = Math.cos(radian) * radius;
var yPoint:Number = Math.sin(radian) * radius;
circle.graphics.lineTo(xPoint, yPoint);
}
circle.graphics.endFill();
circle.x = stage.stageWidth / 2;
circle.y = stage.stageHeight / 2;
addChild(circle);
package { import fl.controls.Label; import fl.controls.TextInput; import flash.display.Sprite; import flash.events.Event; public class Flash extends Sprite { private var textInput1:TextInput; private var textInput2:TextInput; private var labell:Label; private var label2:Label; public function Flash() { criaLabels(); criarTextInputs(); criaBindable(); } private function criarTextInputs():void { textInput1 = new TextInput(); textInput2 = new TextInput(); textInput1.move(70, 10); textInput2.move(70, 40); addChild(textInput1); addChild(textInput2); } private function criaLabels():void { labell = new Label(); label2 = new Label(); labell.move(10, 10); label2.move(10, 40); labell.text = "Campo 1:"; label2.text = "Campo 2:"; addChild(labell); addChild(label2); } private function criaBindable():void { textInput1.addEventListener(Event.CHANGE, binding); } private function binding(e:Event):void { textInput2.text = textInput1.text; } } }
<?xml version="1.0" encoding="utf-8"?> <mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute"> <mx:TextInput id="campo1" x="79" y="10"/> <mx:TextInput x="79" y="40" text="{campo1.text}"/> <mx:Label x="10" y="12" text="Campo 1:"/> <mx:Label x="10" y="42" text="Campo 2:"/> </mx:Application>