HTML 端:
PART 1:
复制代码 代码如下:
{{foreach from=$question.question_item item="it" name="question_item"}}
<tr>
<td align="left">{{$it.item_id}}</td>
<td align="left">{{$it.item_name}}</td>
<td align="left">9
<input type="hidden" class="swfhdn" value="{title:{{$it.item_name}},vote:12票,proportion:0.25,singleId:swfdv{{$key+1}}}"/></td>
</tr>
{{/foreach}}

PART 2:
复制代码 代码如下:
<div style="width:190px; height:10px; background-color:#FFF; float:left;"></div>
<div id="swfdv{{$key+1}}" class="swfarea"></div>
<input type="hidden" class="swfQuesCount" value="{{$key+10}}"/>

JS 文件:
复制代码 代码如下:
function createSWF(swfHome,swfHeight)
{
if(swfobject.hasFlashPlayerVersion("9"))
{
var flashvars = {};
flashvars.quesID = swfHome;
swfobject.embedSWF("swf/statistic2.swf",swfHome,"520",swfHeight,"9","",flashvars);
}
}
var aryMSG = new Array();
function resultArray() { return aryMSG; }
function init()
{
var ary = $(".swfhdn");
for(j = 0; j< ary.length; j++)
{
aryMSG.push(ary[j].value);
}
var arySWF = $(".swfarea");
for(i = 0; i < arySWF.length; i++)
{
var swfheight = $(".swfQuesCount")[i].value * 18 + 3;
createSWF(arySWF[i].id.toString(),swfheight.toString());
}
}

FLEX 端:
复制代码 代码如下:
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="http://www.adobe.com/2006/mxml"
layout="absolute" backgroundColor="0xffffff"
verticalScrollPolicy="off" horizontalScrollPolicy="off"
creationComplete="application1_creationCompleteHandler(event)">
<mx:VBox id="cvs" y="2" width="100%" height="100%" verticalGap="5"/>
<mx:Script>
<![CDATA[
import com.flexlib.moudel.statistical.StatisticalService;
import com.flexlib.moudel.statistical.StatisticalBar;
import com.flexlib.moudel.statistical.StatisticalPane;
import mx.events.FlexEvent;
private var res:StatisticalService = new StatisticalService();
public function StatisticalManager(ary:Array):void
{
var bar:StatisticalBar = new StatisticalBar();
bar.width = 350;
bar.height = 15;
bar.accurate = 1;
// bar.color = 0x9999ff;
var pane:StatisticalPane = new StatisticalPane();
pane.width = 520;
pane.height = 15;
pane.titleSpace = 50;
pane.voteSpace = 35;
pane.barSpace = 25;
pane.percentSpace = 60;
res.dataArray = ary;
res.autoColorEnabled =true;
res.geostrophyEnabled = true;
res.geostrophy = [0xffffff,0xcccccc];
res.StatisticalList(pane,bar,cvs);
}
protected function application1_creationCompleteHandler(event:FlexEvent):void
{
var item:Object = Application.application.parameters;
var aryMSG:Object = ExternalInterface.call("resultArray");
var strtmp:String;
var newAry:Array = new Array();
for(var i:int = 0; i < aryMSG.length; i++)
{
strtmp = aryMSG[i].substring(aryMSG[i].indexOf("singleId:") + 9,aryMSG[i].length - 1);
if(strtmp == item.quesID){ newAry.push(aryMSG[i]); }
}
StatisticalManager(newAry);
}
]]>
</mx:Script>
</mx:Application>
标签:
页面调用,swf

免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件! 如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
狼山资源网 Copyright www.pvsay.com

RTX 5090要首发 性能要翻倍!三星展示GDDR7显存

三星在GTC上展示了专为下一代游戏GPU设计的GDDR7内存。

首次推出的GDDR7内存模块密度为16GB,每个模块容量为2GB。其速度预设为32 Gbps(PAM3),但也可以降至28 Gbps,以提高产量和初始阶段的整体性能和成本效益。

据三星表示,GDDR7内存的能效将提高20%,同时工作电压仅为1.1V,低于标准的1.2V。通过采用更新的封装材料和优化的电路设计,使得在高速运行时的发热量降低,GDDR7的热阻比GDDR6降低了70%。