Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

flex ºÍswf»¥Ïàµ÷ÓÃ

as:
var app:Object;
function setApp(ap:Object):void{
this.app=ap;
}
btn.addEventListener(MouseEvent.CLICK,onClick);
function onClick(event:MouseEvent):void{ 
app.fun(btn.label);

flex:
private function onSwfLoaded(event:Event):void
{
  myloader.addEventListener(Event.COMPLETE, loaderHandler);
}
private function loaderHandler(event:Event):void
{
  Object(myloader.content).setApp(this);
}
public function fun(str:String):void
{
  trace(str);
}


Ïà¹ØÎĵµ£º

flexѧϰ ×Ô¶¨Òåʼþ

ÎÒ¸öÈ˾õµÃÕâ¸ö×Ô¶¨Òåʱ¼ä·â×°ÐԺܺ㬵«ÊÇÓе㸴ÔÓ£¬²»½¨Òé¼òµ¥±à³ÌÖÐʹÓÃ
´´½¨Ò»¸öMXML×é¼þ£¬½¨×Ô¶¨Òåʼþ
<?xml version="1.0" encoding="utf-8"?>
<mx:VBox xmlns:mx="http://www.adobe.com/2006/mxml">
<mx:Script>
<!--[CDATA[
private function clickHandler():void{
// var m ......

ÔÚFLEXÖеÄstageÒÔ¼°È«ÆÁÏà¹ØÄÚÈÝ

ÏÖÔÚÎÒÃÇÏÈ¿´¿´´úÂë,ÏÂÃæµÄ´úÂë×°ÔÚcreationCompleteʼþÖе÷ÓÃinit()À´Æô¶¯È«ÆÁ.
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="init()"
>
<mx:Scri ......

Flex ÖпÉÄܵ¼ÖÂÄÚ´æй¶µÄµØ·½

Flex ÖпÉÄܵ¼ÖÂÄÚ´æй¶µÄµØ·½
ÊÕ¼¯Á˲»ÉٵĻᵼÖÂÄÚ´æ鶵ÄÇé¿ö£º
ʼþ¼àÌý£º
¶Ô¸¸¼¶¶ÔÏó¼ÓÁ˼àÌýº¯Êý£¬»áÔì³ÉÄÚ´æй¶£¬Àý£º
override protected function mouseDownHandler(…):void
{
systemManager.addEventListener(“mouseUp”, mouseUpHandler);
......
½â¾ö£º
ÔÚÏú»Ù¶ÔÏóµÄʱºò£ ......

FLEXÈÝÆ÷µÄ²¼¾Ö¹æÔò

FLEXÖÐËùÓеIJ¼¾Ö¶¼ÐèÒªÈÝÆ÷¡£<mx:Application>±êǩʵ¼ÊÉϾÍÊÇÒ»¸öÈÝÆ÷¡£Ã¿¸öÈÝÆ÷¶¼ÓÐÒ»¶¨µÄ¹æÔòÀ´È·¶¨×ÓÔªËصÄÅÅÁз½Ê½£¬Ò²¾ÍÊDZ¾ÎÄÌÖÂÛµÄFLEXÈÝÆ÷²¼¾Ö¹æÔò¡£
VBox
×ÓÔªËØÑØ´¹Ö±·½ÏòÅÅÁС£Ã¿¸ö×ÓÔªËض¼»á»æÖÆÔÚÇ°Ò»¸ö×ÓÔªËصÄÏ·½¡£
HBox
×ÓÔªËØÑØˮƽ·½ÏòÅÅÁС£Ã¿¸ö×ÓÔªËض¼»á»æÖÆÔÚÇ°Ò»¸ö×ÓÔªËصÄÓÒ·½¡£
Canv ......

Flex°²È«É³Ïä

ÎÄÕÂÒ»£ºhttp://blog.csdn.net/eyking/archive/2009/10/21/4702330.aspx
Flex¾ÍÊÇÖÂÁ¦ÓÚRIAµÄÓ¦Óã¬AdobeΪÁËÀ©´óÕ½³¡£¬ÍƳöÁËAIR»·¾³£¬ÄÇô´Ëʱ²ÉÓÃFlex±àдµÄ³ÌÐòÔÚä¯ÀÀÆ÷ÖÐÓë×ÀÃæ»·¾³Ï¶¼¿ÉÒԺܺõÄÒÆÖ²ÁË¡£ÏñFlexÓëFlashÕâÑùÆæ¹ÖµÄ¶«Î÷£¬Õ½³¡²»½ö½öÔÚä¯ÀÀÆ÷ÉÏ£¬»¹Åܵ½ÁË×ÀÃæ»·¾³Ï¡£Ò»¸öºÜÖØÒªµÄ°²È«Ä£Ð;ͱ»Ìá³öÁË£ºF ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ