ÍøÒ³´«µÝ²ÎÊýµ½flexÖеķ½·¨
1.ÔÚ<Object>ºÍ<embed>ÖÐÉèÖÃflashVars²ÎÊý
£¬ÀýÈ磺
<object
id=’mySwf’ classid=’clsid:D27CDB6E-AE6D-11cf-96B8-444553540000′
codebase=’http://fpdownload.macromedia.com/get/flashplayer/current/swflash.cab’
height=’100%’ width=’100%’>
<param name=’src’ value=’FlashVarTest.swf’/>
<param name=’flashVars’ value=’firstName=Nick&lastName=Danger’/>
<embed name=’mySwf’ src=’FlashVarTest.swf’
pluginspage=’http://www.adobe.com/go/getflashplayer’ height=’100%’
width=’100%’ flashVars=’firstName=Nick&lastName=Danger’/>
<embed src=’TitleTest.mxml.swf?myName=Danger’ … />
</object>
2.»òÕßÔÚ<Object>ºÍ<embed>ÖеÄsrcÊôÐÔÖÐÖ±½Ó¼Ó²ÎÊý
£¬ÀýÈ磺
<object … >
<param name=’src’ value=’TitleTest.mxml.swf?
’firstName=Nick&lastName=Danger
’>
…
<embed src=’TitleTest.mxml.swf?
’firstName=Nick&lastName=Danger
’ … />
</object>
3.
Ð޸ļÓÔØflashµÄhtmlÒ³Ã棬ÕÒµ½µÚ¶þ¸öAC_FL_RunContent ÖеĴúÂëÄÚÈÝ£¬´úÂëÈçÏÂ
AC_FL_RunContent(
"
src
"
,
"
${swf}
"
,
"
width
"
,
"
${width}
"
,
"
height
"
,
"
${height}
"
,
"
align
"
,
"
middle
"
,
"
id
"
,
"
${application}
"
,
"
quality
"
,
"
high
"
,
"
bgcolor
"
,
"
${bgcolor}
"
,
"
name
"
,
"
${application}
"
,
&
Ïà¹ØÎĵµ£º
Flex ÖеÄStates(״̬)
¹Ø¼ü×Ö: flex, states
States ÊÇÒ»Ì×ÓÃÓÚ´´½¨×´Ì¬×é¼þµÄÇ¿´ó¹¤¾ß£¬Ò²¾ÍÊÇ˵×é¼þ¿ÉÒÔÓжà¸öÊÓͼ¡£
ʹÓÃStates À´Çл»ÊÓͼ¿ÉÒÔ½ÚÔ¼×ÊÔ´
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml" layout="absolute">
<mx:states> ......
flex ºÍjavascript»¥Ïàµ÷Óá£
Ò»¡¢flex µ÷ÓÃjavascript
Ö»ÐèʹÓþ²Ì¬µÄExternalInterface.call¾Í¿ÉÒÔÁË¡£
call ·½·¨ÖÁÉÙÒªÇóÒ»¸ö²ÎÊý£¬¾ÍËùµ÷ÓöÊýµÄÃû³Æ¡£
Ò²¿ÉÒÔ´«µÝ²ÎÊý¡£
È磺
ExternalInterface.call("alert","hello");
"hello"¾ÍÊÇ×÷Ϊalertµ ......
flex Ôڳɳ¤µÄ¹ý³ÌÖÐÀú¾²×É££¬µ«ÊÇʼÖÕÀë²»¿ªflashÔÚºǫ́×öºó¶Ü£¬ËûµÄºǫ́´úÂëÊÇActionscirp µ«ÊÇsliverlightµÄºǫ́´úÂëÊÇ.net µÄ¼¼Êõ ËùÒÔ˵slilverlightѧµÄʱºò£¬Ö»ÒªÄã»á.net¾Í¿ÉÒԷdz£¿ìµÄÉÏÊÖ£¬flex ÄãÒÔǰѧ¹ýflash¡£ÄãÒ²¿ÉÒԺܿìÉÏÊÖ ......