包code說明
|
PChome Online - Flash 廣告素材連結設定步驟 |
 |
|
|
‧ |
以按鈕為例,按鈕上的ActionScrip寫法如下所示: |
|
| on (rollOver) { |
| |
fscommand("mouseOver",_root.args); |
| } |
|
| on (release) { |
| |
if((_root.ad_url=="")||(_root.ad_url==undefined)||(_root.ad_url==null)){
fscommand("mouseClick", _root.args);
}else{
getURL(_root.ad_url, "_blank");
} |
| } |
|
|
‧ |
注意!fla
原始編輯檔請提供8.0 格式 (本公司目前不支援flash CS3的編輯檔
) |
‧ |
注意!swf
輸出檔請用flash 8.0以下(含8.0)的版本輸出 |
‧ |
注意!供稿前請務必將字體打散(Ctrl+B)再輸出swf。若需檢查字型是否己打散可用(Alt+F3)。 |
|
|
|
◎範例:以450x150大看板為例,在Flash MX 2004軟體的編輯環境下製作: |
|
|
|
在場景最上方新增一個圖層(Layer),在該圖層上新增一個尺吋為450x150的色塊,並對齊左上角。(若事先已經製作了透明按鈕,則直接跳至步驟五) |
|
|
|
|
選取色塊,並按下「F8」快速鍵,將色塊轉換成按鈕元件。 |
|
|
|
|
在按鈕元件上連續按兩下滑鼠左鍵,進入按鈕的編輯狀態。 |
|
|
|
|
將第一格(一般)的關鍵影格(keyframe)拖曳到第四格(感應區),可讓按鈕變成透明,接著跳回場景。 |
|
|
|
|
選取按鈕,並按下「F9」快速鍵,開啟Actionscript編輯視窗。 |
|
|
|
|
在視窗內輸入以下程式碼:
| on (rollOver) { |
| |
fscommand("mouseOver",_root.args); |
| } |
|
| on (release) { |
| |
if((_root.ad_url=="")||(_root.ad_url==undefined)||(_root.ad_url==null)){
fscommand("mouseClick", _root.args);
}else{
getURL(_root.ad_url, "_blank");
} |
| } |
|
輸入完成後關閉視窗。
|
|
|
|