<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="vertical">
<mx:MenuBar labelField="@label" itemClick="handleMenuClick(event)">
...
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:Script>
<![CDATA[
private function traceMousePosition(event:MouseEvent):void{
...
private var scoutTime:Timer=new Timer(10000000,1);//闹钟计时器
private function scout() {
scoutTime.stop();
var curtime:Date=new Date();
var curHour:Number=curtime.getHours();
...
sethour.addEventListener(TextEvent.TEXT_INPUT,onTextInput);
sethour.addEventListener(FocusEvent.FOCUS_IN,onFocusInHour);
sethour.addEventListener(FocusEvent.FOCUS_OUT,onFocusOutHour);
AS3绘制虚线
for(var i:int=0;i<10;i++){
graphics.moveTo(50+i*20,50);
graphics.lineStyle(1,0xff,1);
graphics.lineTo(60+i*20,50);
}
1、动态方法(可应用于类文件生成的实例)
import fl.transitions.*;
import fl.transitions.easing.*;
var test:Test=new Test();
addChild(test);
btn.addEventListener(MouseEvent.CLICK,showit);
function showit(evt:MouseEvent) {
...
package {
import fl.controls.*;
import fl.managers.*;
import flash.display.*;
import flash.text.*;
public class Test extends Sprite {
public function Test() {
...
package components{
import flash.display.*;
import flash.events.*;
import flash.text.*;
import flash.filters.*;
import flash.net.*;
public class LockStage {
public static var stage:Stage;
...
1、让textarea滚动至最底端
textArea.verticalScrollPosition = textArea.maxVerticalScrollPosition;
2、控制datagrid的交换背景颜色
private var defaultAlternatingItemColors:Array = [0xF7F7F7, 0xFFFFFF];
dataGrid.setStyle("alternatingItemColors", defaultAlternatingItemColors);
...<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="vertical"
...