2020 Tide@gamesofa
1. 發光和濾鏡無法正常顯示,但animate cc預覽的時候可以看到,檢查方式請參考下一單元。
2. 參考小明做的sample說明檔
X:\grp.mkt.htmlart\02公司製作物\01_廣告範本\07_html5廣告範本\1_AnimateCC濾鏡使用示範
3. 承上,簡單來講,就是做兩張圖,利用控制透明度的方式做動畫效果
<script src="https://s0.2mdn.net/ads/studio/cached_libs/createjs_2015.11.26_54e1c3722102182bb133912ad4442e19_min.js"></script>
<meta name="ad.size" content="width=336,height=280">
<script src="https://s0.2mdn.net/ads/studio/cached_libs/tweenmax_1.18.0_499ba64a23378545748ff12d372e59e9_min.js"></script>
<script src="https://tpc.googlesyndication.com/pagead/gadgets/html5/api/exitapi.js"></script>
<script src="https://s0.2mdn.net/ads/studio/cached_libs/createjs_2019.11.15_min.js"></script>
<title>336x280</title>
<!-- write your code here -->
<script src="https://code.createjs.com/createjs-2015.11.26.min.js"></script>
<meta name="ad.size" content="width=336,height=280">
<title>336x280</title>
<!-- write your code here -->
<script src="https://s0.2mdn.net/ads/studio/cached_libs/createjs_2015.11.26_54e1c3722102182bb133912ad4442e19_min.js"></script>
<meta name="ad.size" content="width=336,height=280">
<title>336x280</title>
<!-- write your code here -->
<script src="https://s0.2mdn.net/ads/studio/cached_libs/createjs_2019.11.15_min.js"></script>
<script src="filename.js?1490262948366"></script>
<script src="filename.js"></script>
chrome基於安全性問題,會封掉一些特效和js,用animate cc預覽時,能看到的效果,不一定能正常實現
sample 位置: specific_scope
//到下個場景
var root = this;
this.btn.on('click',function(){
root.gotoAndPlay('stage1');
})
//下載按鈕
this.btn_download.on('click',function(){
ExitApi.exit();
})
<script src="https://tpc.googlesyndication.com/pagead/gadgets/html5/api/exitapi.js"></script>
bitmap_hover.fla
完整檔案:bitmap_hover/final
練習檔案:bitmap_hover/practice
Text
//建立時間軸的參考變數
var root = this;
//將 mouseOver 偵測頻率改成預設(一秒20次)
stage.enableMouseOver();
this.btn.addEventListener("mouseover", fl_MouseOverHandler);
function fl_MouseOverHandler()
{
//播放互動效果,pic_mc是自己命名的物件名稱
root.pic_mc.gotoAndPlay('hover');
}
this.btn.addEventListener("mouseout", fl_MouseOutHandler_2);
function fl_MouseOutHandler_2()
{
root.pic_mc.gotoAndPlay('out');
}
//建立時間軸的參考變數
var root = this;
//將 mouseOver 偵測頻率改成預設(一秒20次)
stage.enableMouseOver();
this.btn.addEventListener("mouseover", fl_MouseOverHandler);
function fl_MouseOverHandler()
{
//播放互動效果
root.pic_mc.gotoAndPlay('hover');
}
this.btn.addEventListener("mouseout", fl_MouseOutHandler_2);
function fl_MouseOutHandler_2()
{
root.pic_mc.gotoAndPlay('out');
}
因為用animate cc開啟的話,他會模擬線上模式,但這個模式和google的線上模式不一致,所以必需確認本機開啟也沒有問題。
完整檔案:bitmap_hover_multi/final
練習檔案:bitmap_hover_multi/practice
//簡易版
var root = this;
stage.enableMouseOver();
this.btn.on('mouseover',function(){
root.pic_mc.gotoAndPlay('hover');
})
this.btn.on('mouseout',function(){
root.pic_mc.gotoAndPlay('out');
})
var root = this;
stage.enableMouseOver();
this.btn.on('mouseover',function(){
root.pic_mc.gotoAndPlay('hover');
})
this.btn.on('mouseout',function(){
root.pic_mc.gotoAndPlay('out');
})
this.btn2.on('mouseover',function(){
root.pic2_mc.gotoAndPlay('hover');
})
this.btn2.on('mouseout',function(){
root.pic2_mc.gotoAndPlay('out');
})