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>
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
暂无“页面调用单个swf文件,嵌套出多个方法。”评论...
P70系列延期,华为新旗舰将在下月发布
3月20日消息,近期博主@数码闲聊站 透露,原定三月份发布的华为新旗舰P70系列延期发布,预计4月份上市。
而博主@定焦数码 爆料,华为的P70系列在定位上已经超过了Mate60,成为了重要的旗舰系列之一。它肩负着重返影像领域顶尖的使命。那么这次P70会带来哪些令人惊艳的创新呢?
根据目前爆料的消息来看,华为P70系列将推出三个版本,其中P70和P70 Pro采用了三角形的摄像头模组设计,而P70 Art则采用了与上一代P60 Art相似的不规则形状设计。这样的外观是否好看见仁见智,但辨识度绝对拉满。
更新动态
2024年05月09日
2024年05月09日
- 欢乐钓鱼大师银翼的奇术师怎么钓 欢乐钓鱼大师银翼的奇术师钓鱼攻略
- 陈琳.1994-你的柔情我永远不懂[WAV]
- 邓瑞霞2006-广东风云2IN1[南方]2CD[WAV+CUE]
- 黄征-爱情诺曼底-2003-APE整轨
- 妥协只是暂时的!《对马岛之魂》PC版的多人模式仍需绑定PSN
- 开启抢先体验后 《盗贼之海》成PS美国第二畅销游戏
- 《恶意不息》老板再用中文询问中国玩家:对汉化是否满意
- 2个女生.2000-坚固友情精选辑【EMI百代】【WAV+CUE】
- 潘越云李丽芬吴楚楚.1981-三人展(滚石民歌巨星系列)【滚石】【WAV+CUE】.
- 元若蓝.2006-爱无限大【滚石】【WAV+CUE】
- 刘德华《经典传说·粤语精选集》[WAV/分轨][610MB]
- 庄心妍《2020年新专辑歌曲 念》[WAV/分轨][400MB]
- 群星《音色精美绝伦 粤语经典 2CD》[WAV+CUE][1.4GB]
- 欢乐钓鱼大师不充钱怎么玩 欢乐钓鱼大师不充钱搞鱼竿玩法介绍
- 欢乐钓鱼大师隐藏奖励有什么 欢乐钓鱼大师隐藏奖励介绍