[摘要]本次演示如何插入combobox场景菜单后,当场景跳转时,combobox菜单跟随跳转。
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 |
1、插入combobox菜单 <plugin name="combobox1" url="%SWFPATH%/plugins/combobox.swf" alturl="%SWFPATH%/plugins/combobox.js" align="righttop" x="10" y="10" zorder="2" rowcount="10" keep="true" visible="true"> <item name="opt1" caption="场景一选项" onclick="loadscene(scene_1, null, MERGE, BLEND(1));" /> <item name="opt2" caption="场景二选项" onclick="loadscene(scene_2, null, MERGE, BLEND(1));" /> </plugin> 2、onstart属性插入select_box_item(combobox1,opt1),场景启动时跳转到指定combobox,其他场景同理 <scene name="scene_1" title="1" onstart="select_box_item(combobox1,opt1)" thumburl="panos/1.tiles/thumb.jpg" lat="" lng="" heading=""> <view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" /> <preview url="panos/1.tiles/preview.jpg" /> <image type="CUBE" multires="true" tilesize="512" progressive="false"> <level tiledimagewidth="955" tiledimageheight="955"> <cube url="panos/1.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" /> </level> <level tiledimagewidth="512" tiledimageheight="512"> <cube url="panos/1.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" /> </level> <mobile> <cube url="panos/1.tiles/mobile_%s.jpg" /> </mobile> </image> <!-- place your scene hotspots here --> <hotspot name="spot1" style="skin_hotspotstyle" ath="-0.935" atv="15.036" linkedscene="scene_2" /> </scene> <scene name="scene_2" title="2" onstart="select_box_item(combobox1,opt2)" thumburl="panos/2.tiles/thumb.jpg" lat="" lng="" heading=""> <view hlookat="0" vlookat="0" fovtype="MFOV" fov="120" maxpixelzoom="2.0" fovmin="70" fovmax="140" limitview="auto" /> <preview url="panos/2.tiles/preview.jpg" /> <image type="CUBE" multires="true" tilesize="512" progressive="false"> <level tiledimagewidth="955" tiledimageheight="955"> <cube url="panos/2.tiles/%s/l2/%v/l2_%s_%v_%h.jpg" /> </level> <level tiledimagewidth="512" tiledimageheight="512"> <cube url="panos/2.tiles/%s/l1/%v/l1_%s_%v_%h.jpg" /> </level> <mobile> <cube url="panos/2.tiles/mobile_%s.jpg" /> </mobile> </image> <!-- place your scene hotspots here --> <hotspot name="spot1" style="skin_hotspotstyle" ath="-0.935" atv="15.036" linkedscene="scene_1" /> </scene> |