欧美bbbwbbbw肥妇,免费乱码人妻系列日韩,一级黄片

xflash里的hello world程序

 更新時間:2006年12月22日 00:00:00   作者:  
下面是hello world實例,雖然看起來與html里的按鈕一樣,但是,xflash里所有的元素都和頁面無關(guān),是純flash的。從代碼看,使用起來還是比較簡單的,只需要包含xflash.js文件就可以滿足進一步的開發(fā)要求了。
    具體使用方法,是創(chuàng)建一個xflash對象,然后可以調(diào)用該對象的方法,來實現(xiàn)各種各樣的功能。本實例在_root下創(chuàng)建了一個按鈕,并且給該按鈕添加了事件,語法與html非常接近,只是位置使用了pos屬性,里面的參數(shù)依次是x座標、y座標、對象寬和對象高。
    pos是xflash中比較重要的屬性,每一個元素都會有,除了可以采用常量之外,還可以使用關(guān)鍵字,比如本例中的c和m,分別表示橫向居中和縱向居中。
<script src=/xflash/xflash.js></script>
<xmp type="xfml">
    <button onclick="alert('hello,welcome to xflash develop world~~')" pos='c,m,150,21'>我是xflash按鈕,點擊我</button>
</xmp>
具體地說,是由xflash.js和xflash.swf相結(jié)合來實現(xiàn)解析的 

<script src=http://www.script8.com/xflash/xflash.js></script>
<script>
var xf=new xflash()
xf.createElement("_root","<button onclick=\"alert('Ricky悄悄地測試了一下~')\" pos='c,m,150,21'>Start</button>")

xf.createElement("_root2","<button onclick=\"alert('Ricky悄悄地測試了一下~')\" pos='200,m+10,150,21'>Start2</button>")
</script>

相關(guān)文章

最新評論