krpano开场的动画|或者图片

等到场景完全加载后,图片才消失,出现场景,既给了品牌的展示,用户体验也好。

把代码加入vour.xml   里面即可


<!-- 启动画面【很长代码】************************************************************************************** -->


<!-- 第一个layer是背景颜色 -->
<layer name="startpic_container"
preload="true"
alpha="1"
onloaded="tween(alpha,1.0);"
handcursor="true"
enabled="true"
children="true"
visible="true"
zorder="90"
type="container"
maskchildren="true"
keep="true"
width="100%"
height="100%"
bgcolor="0xCCCC99"
bgalpha="1" >
 
<!-- 第二个layer是logo --> 
<layer name="skin_title_logo3"
zorder="100"
keep="true"
x="0"
y="-80"
align="center"
url="skin/mylogo1.png"
scale="1"
alpha="0"
onloaded="tween(alpha,1.0);tween(layer[skin_title_pr].alpha,1.0);"
οnclick="tween(layer[startpic_container].ox,-2500,1);
delayedcall(2,set(layer[startpic_container].enabled,false);
set(layer[startpic_container].visible,false);
stopdelayedcall(startpic1);stopdelayedcall(startpic2);"
enabled="false" />

<!-- 第三个layer是logo下面的文字 -->  
<layer name="skin_title_pr"
background="true"
backgroundcolor="0x999999"
roundedge="10"
backgroundalpha="0"
border="true"
bordercolor="0x999999"
borderalpha="0"
borderwidth="4.0"
glow="0"
glowcolor="0xCCCCCC"
visible="true"
keep="true"
alpha="0"
onloaded=""
children="false"
align="center"
zorder="100"
autowidth="auto"
height="40"
url="%SWFPATH%/plugins/textfield.swf"
html="你要的文字"
css="text-align:center; color:#9B8179; font-family:FangSong; font-weight:bold; font-size:32px;"
x="0"
y="150"
οnclick="tween(layer[startpic_container].ox,-2500,1);
delayedcall(2,set(layer[startpic_container].enabled,false);
set(layer[startpic_container].visible,false);
stopdelayedcall(startpic1);stopdelayedcall(startpic2);"
enabled="false"
 
/>
 
 
 
</layer>
 
<events name="startlogoevents" keep="true"
onloadcomplete="
ifnot(layer[skin_title_logo3].enabled,
set(layer[skin_title_logo3].enabled,true);
set(layer[skin_title_pr].enabled,true);
delayedcall(startpic1,4,tween(layer[startpic_container].ox,-2500,1));
delayedcall(startpic2,5,set(layer[startpic_container].enabled,false);set(layer[startpic_container].visible,false));)
"/>
 
<!-- 启动画面结束 -->


<events name="startlogoevents" keep="true"
onloadcomplete="
ifnot(layer[skin_title_logo3].enabled,
set(layer[skin_title_logo3].enabled,true);
set(layer[skin_title_pr].enabled,true);
delayedcall(startpic1,4,tween(layer[startpic_container].ox,-2500,1));
delayedcall(startpic2,5,set(layer[startpic_container].enabled,false);set(layer[startpic_container].visible,false));)
"/>


<!-- 启动画面【很长代码】************************************************************************************** -->


<!-- 第一个layer是背景颜色 -->
<layer name="startpic_container"
preload="true"
alpha="1"
onloaded="tween(alpha,1.0);"
handcursor="true"
enabled="true"
children="true"
visible="true"
zorder="90"
type="container"
maskchildren="true"
keep="true"
width="100%"
height="100%"
bgcolor="0xCCCC99"
bgalpha="1" >
 
<!-- 第二个layer是logo --> 
<layer name="skin_title_logo3"
zorder="100"
keep="true"
x="0"
y="-80"
align="center"
url="skin/mylogo1.png"
scale="1"
alpha="0"
onloaded="tween(alpha,1.0);tween(layer[skin_title_pr].alpha,1.0);"
οnclick="tween(layer[startpic_container].ox,-2500,1);
delayedcall(2,set(layer[startpic_container].enabled,false);
set(layer[startpic_container].visible,false);
stopdelayedcall(startpic1);stopdelayedcall(startpic2);"
enabled="false" />

<!-- 第三个layer是logo下面的文字 -->  
<layer name="skin_title_pr"
background="true"
backgroundcolor="0x999999"
roundedge="10"
backgroundalpha="0"
border="true"
bordercolor="0x999999"
borderalpha="0"
borderwidth="4.0"
glow="0"
glowcolor="0xCCCCCC"
visible="true"
keep="true"
alpha="0"
onloaded=""
children="false"
align="center"
zorder="100"
autowidth="auto"
height="40"
url="%SWFPATH%/plugins/textfield.swf"
html="你要的文字"
css="text-align:center; color:#9B8179; font-family:FangSong; font-weight:bold; font-size:32px;"
x="0"
y="150"
οnclick="tween(layer[startpic_container].ox,-2500,1);
delayedcall(2,set(layer[startpic_container].enabled,false);
set(layer[startpic_container].visible,false);
stopdelayedcall(startpic1);stopdelayedcall(startpic2);"
enabled="false"
 
/>
 
 
 
</layer>
 
<events name="startlogoevents" keep="true"
onloadcomplete="
ifnot(layer[skin_title_logo3].enabled,
set(layer[skin_title_logo3].enabled,true);
set(layer[skin_title_pr].enabled,true);
delayedcall(startpic1,4,tween(layer[startpic_container].ox,-2500,1));
delayedcall(startpic2,5,set(layer[startpic_container].enabled,false);set(layer[startpic_container].visible,false));)
"/>
 
<!-- 启动画面结束 -->


<events name="startlogoevents" keep="true"
onloadcomplete="
ifnot(layer[skin_title_logo3].enabled,
set(layer[skin_title_logo3].enabled,true);
set(layer[skin_title_pr].enabled,true);
delayedcall(startpic1,4,tween(layer[startpic_container].ox,-2500,1));
delayedcall(startpic2,5,set(layer[startpic_container].enabled,false);set(layer[startpic_container].visible,false));)
"/>


  • 2
    点赞
  • 11
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值