AC_FL_RunContent( "src", "playerProductInstall",
"FlashVars", "MMredirectURL="+MMredirectURL+'&MMplayerType='+MMPlayerType+'&MMdoctitle='+MMdoctitle+"",
"width", "${width}",
"height", "${height}",
"align", "middle",
"id", "main",
"quality", "high",
"bgcolor", "${bgcolor}",
"name", "${application}",
"allowScriptAccess","sameDomain",
"type", "application/x-shockwave-flash",
"pluginspage", http://www.adobe.com/go/getflashplayer,
"flashVars" , "embedCode=test1234567"
);
2010年5月4日 星期二
Flex Button 的autoRepeat 須注意Event
最近剛好需要一個按住按鈕連發的功能,查了一下ActionScript 3.0 Language and Components Reference確定了Flex的Buttonu有一個autoRepeat屬性,只要設為ture就可以啟動button內部的Timer,結果奇怪怎麼在按鈕按下後只觸發了一次呢?????結果一查原來我習慣使用flash.events底下的MouseEvent而autoRepeat是使用FlexEvent發送所以就收不到連發事件囉!!請看以下範例
Example:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
applicationComplete="application1_applicationCompleteHandler(event)"
>
<s:layout>
<s:BasicLayout/>
</s:layout>
Example:
<?xml version="1.0" encoding="utf-8"?>
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:mx="library://ns.adobe.com/flex/mx" minWidth="955" minHeight="600"
applicationComplete="application1_applicationCompleteHandler(event)"
>
<s:layout>
<s:BasicLayout/>
</s:layout>
訂閱:
文章 (Atom)