private function btnCancel_click(e:MouseEvent):void
{
trace("btncancel click "+e.target);
trace("btncancel click "+e.currentTarget);
e.stopPropagation(); }
Wednesday, 30 September 2009
Tuesday, 29 September 2009
[Flex] dynamic parameter
a.strTel_1 = "1111";
a.strTel_2 = "2222";
a.strTel_3 = "3333";
a.strTel_4 = "4444";
a.strTel_5= "5555";
a.strTel_6 = "6666";
a.strTel_7 = "7777";
a.strTel_8 = "8888";
for (x=1; x <= 8; x++)
{
textDisplay.text += a["strTel_"+x.toString()]+"\n";
}
a.strTel_2 = "2222";
a.strTel_3 = "3333";
a.strTel_4 = "4444";
a.strTel_5= "5555";
a.strTel_6 = "6666";
a.strTel_7 = "7777";
a.strTel_8 = "8888";
for (x=1; x <= 8; x++)
{
textDisplay.text += a["strTel_"+x.toString()]+"\n";
}
[Flex] keep actionscript parameter setting
-- Keeping actionscrip by setting parameter
right button from the flex project > properties > flex compiller > "Additional Compiloer Arguments" > setup parameter as the below
-locale en_US -keep-generated-actionscript
right button from the flex project > properties > flex compiller > "Additional Compiloer Arguments" > setup parameter as the below
-locale en_US -keep-generated-actionscript
[Flex] screen Capture
private function capture() : void
{
var bd:BitmapData = new BitmapData(this.width,this.height);
bd.draw(this);
var encoder:JPEGEncoder = new JPEGEncoder(60);
var ba:ByteArray = encoder.encode(bd);
var file:File = File.desktopDirectory.resolvePath("Test2.jpg");
var fs:FileStream = new FileStream();
fs.addEventListener(OutputProgressEvent.OUTPUT_PROGRESS,onOut);
fs.openAsync(file, FileMode.WRITE);
fs.writeBytes(ba);
}
private function onOut(e:OutputProgressEvent):void
{
trace("ok");
e.currentTarget.close();
}
]]]
[/mx:Script]
[mx:Button x="284" y="194" label="Button" click="this.capture();"/]
[mx:DataGrid x="10" y="10"]
[mx:columns]
[mx:DataGridColumn headerText="Column 1" dataField="col1"/]
[mx:DataGridColumn headerText="Column 2" dataField="col2"/]
[mx:DataGridColumn headerText="Column 3" dataField="col3"/]
[/mx:columns]
[/mx:DataGrid]
{
var bd:BitmapData = new BitmapData(this.width,this.height);
bd.draw(this);
var encoder:JPEGEncoder = new JPEGEncoder(60);
var ba:ByteArray = encoder.encode(bd);
var file:File = File.desktopDirectory.resolvePath("Test2.jpg");
var fs:FileStream = new FileStream();
fs.addEventListener(OutputProgressEvent.OUTPUT_PROGRESS,onOut);
fs.openAsync(file, FileMode.WRITE);
fs.writeBytes(ba);
}
private function onOut(e:OutputProgressEvent):void
{
trace("ok");
e.currentTarget.close();
}
]]]
[/mx:Script]
[mx:Button x="284" y="194" label="Button" click="this.capture();"/]
[mx:DataGrid x="10" y="10"]
[mx:columns]
[mx:DataGridColumn headerText="Column 1" dataField="col1"/]
[mx:DataGridColumn headerText="Column 2" dataField="col2"/]
[mx:DataGridColumn headerText="Column 3" dataField="col3"/]
[/mx:columns]
[/mx:DataGrid]
[Flex] copy .. file
private function main() : void
{
var file:File = File.applicationDirectory.resolvePath("images/booklist.gif");
var cpy:File = File.desktopDirectory.resolvePath("create.gif");
try {
file.copyTo(cpy, true);
} catch (e:Error) {
//alert.showTitleBar("Overwirte?");
}
}
{
var file:File = File.applicationDirectory.resolvePath("images/booklist.gif");
var cpy:File = File.desktopDirectory.resolvePath("create.gif");
try {
file.copyTo(cpy, true);
} catch (e:Error) {
//alert.showTitleBar("Overwirte?");
}
}
[Flex] File browser
private function on_click() : void
{
var file:File = new File();
file.addEventListener(Event.SELECT,
function (e:Event):void
{
trace(file.nativePath);
}
);
file.browseForDirectory("search");
}
{
var file:File = new File();
file.addEventListener(Event.SELECT,
function (e:Event):void
{
trace(file.nativePath);
}
);
file.browseForDirectory("search");
}
Wednesday, 16 September 2009
[Flex] - Very Simple tranning course
http://www.youtube.com/watch?v=MLpWNQqkSDk&feature=PlayList&p=F9A84EB0F8DB1DB9&index=3
Wednesday, 9 September 2009
Google Setting (Connection)
Setting for Google talk - connection
When you start google talk, please start like below.
"C:\Program Files\Google\Google Talk\googletalk.exe" /nogaiaauth
When you start google talk, please start like below.
"C:\Program Files\Google\Google Talk\googletalk.exe" /nogaiaauth
Tuesday, 8 September 2009
Monday, 7 September 2009
Subscribe to:
Posts (Atom)