等到场景完全加载后,图片才消失,出现场景,既给了品牌的展示,用户体验也好。
把代码加入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));)
    
    
    
    “/>
 
