首页上一页 1 下一页尾页 1 条记录 1/1页
js怎么操作flash动画中的文字位置
发表在JavaWeb图书答疑
2015-03-05
是否精华
是
否
版块置顶:
是
否
明日科技老师你好
最近遇到一个flash操作动画中的文字的问题,需要咨询下你,我的页面有一个flash的动画沾满了整个网页,flash动画中有许多文字和click事件,其中的阅读任务栏中的阅读进度中的数字原本是三位数字结果在网页中显示出来了两位数字
上面的图片是我需要修改bug位置的讲述 下面是我的代码 我(董朝亮)的 QQ:993623069 电话是:13414333221
非常期待得到你的解决
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="us/ydjy.tld" prefix="ydjy" %>
<%@ page import="com.us.ydjy.support.uitls.SiteWebContext" %>
<%@ page import="com.us.ydjy.model.domain.system.User" %>
<%
SiteWebContext wc = new SiteWebContext(request, null);
User student=wc.getStudentUser();
%>
<html>
<head>
<title>阅读家园-学生端</title>
<meta http-equiv="description" content="阅读家园-学生端">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<script src="<ydjy:staticSite></ydjy:staticSite>/templates/js/jquery-1.10.2.min.js"></script>
<script src="<ydjy:staticSite></ydjy:staticSite>/templates/js/wms.js"></script>
<style type="text/css">
<!--
body {
padding-top: 0px;
padding-bottom: 0px;
margin-top: 0px;
margin-bottom: 0px;
}
-->
</style>
<body style="background: url('<ydjy:staticSite></ydjy:staticSite>/templates/images/bg/bg.jpg') repeat-x;background-color: #0099ff;">
<input type="hidden" id='cjf' value="${cjf }"/>
<input type="hidden" id='gjf' value="${gjf }"/>
<input type="hidden" id="cydl" value="${cydl }"/>
<input type="hidden" id="gydl" value="${gydl }"/>
<input type="hidden" id="taskListStr" value="${taskListStr }"/>
<input type="hidden" id="readingListStr" value="${readingListStr }"/>
<div id="myId">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockw
ave/cabs/flash/swflash.cab#version=6,0,29,0" id="flash" width="100%" height="100%">
<param name="movie" value="Main.swf"/>
<param name="quality" value="high"/>
<param name="wmode" value="transparent"/>
<embed src="Main.swf" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashp
layer" type="application/x-shockwave-flash" name="flash" width="100%" height="1300"></embed>
</object>
</td>
</tr>
</table>
</div>
</body>
<script type="text/javaScript">
//onLoad="pageInit();"
/*var so = new SWFObject("Main.swf", "flash", "100%", "100%", "9","#ff00ff");
so.addParam("wmode", "transparent");
so.write("myId"); */
//js获取参数
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
//http://localhost/student/toIndex.action?f=0
var _frame = getQueryString("f");//改变场景0:从头开始播放,1:跳到下一场景
if (_frame == null)
_frame = 0;
//加载flash完成后,flash调用此方法,用于控制是否显示动画
function pageInit() {
//thisMovie("flash").gotoStop(getFrame());
//alert("swf 加载完内容后")
thisMovie("flash").addMC(getFrame());
}
function setFrame(value) {
_frame = value;
}
function getFrame() {
return _frame;
}
function aa(value) {
alert(value);
}
function thisMovie(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName];
}
else {
return document[movieName];
}
}
//flash传参数value过来
function gotoJSfun(value) {
// alert(value)
if (value == "gerenBtnJF") {
sendToJiFen(dataGRJF());
}
else if (value == "nianjiBtnJF") {
sendToJiFen(dataNJJF());
}
else if (value == "gerenBtnYD") {
sendToYueDu(dataGRYD());
}
else if (value == "nianjiBtnYD") {
sendToYueDu(dataNJYD());
}
else if (value == "xiangce") {
sendToXiangCe(dataIMG());
}
else if (value == "gerenXX") {
sendToGeRen(dataGRXX());
}
else if (value == "cepingRW") {
sendToRenWu(dataCPRW());
}
else if (value == "yueduRW") {
sendToRenWu(dataYDRW());
}
}
//把积分的数据传给flash
function sendToJiFen(value) {
thisMovie("flash").getDataJF(value);
}
//把阅读量的数据传给flash
function sendToYueDu(value) {
thisMovie("flash").getDataYD(value);
}
//把相片的数据传给flash
function sendToXiangCe(value) {
// alert(value);
thisMovie("flash").getDataXC(value);
}
//把个人数据传给flash
function sendToGeRen(value) {
thisMovie("flash").getDataXX(value);
}
//把个人数据传给flash
function sendToRenWu(value) {
thisMovie("flash").getDataRW(value);
}
//个人积分
function dataGRJF() {
var arr = $('#cjf').val();
return eval('(' + arr + ')');
}
//年级积分
function dataNJJF() {
//var arr = [["钟子期1",95],["慕容紫英1",94],["林月如1",93],["戴安琪1",92],["谢泽鑫1",91]];
var arr = $('#gjf').val();
return eval('(' + arr + ')');
}
//个人阅读
function dataGRYD() {
//[姓名,阅读量]按阅读量排序从大到小
//var arr = [["钟子期2",90]];
var arr = $('#cydl').val();
return eval('(' + arr + ')');
}
//年级阅读
function dataNJYD() {
//[姓名,阅读量]按阅读量排序从大到小
//var arr = [["钟子期3",85],["慕容紫英3",84],["林月如3",83],["戴安琪3",82],["谢泽鑫3",81]];
var arr = $('#gydl').val();
return eval('(' + arr + ')');
}
//相册
function dataIMG() {
var arr = ["<ydjy:staticSite></ydjy:staticSite>/templates/images/login/ad01.jpg", "<ydjy:staticSite></ydjy:staticSite>/templates/images/login/ad02.jpg",
"<ydjy:staticSite></ydjy:staticSite>/templates/images/login/ad03.jpg", "<ydjy:staticSite></ydjy:staticSite>/templates/images/login/ad02.jpg"];
return arr;
}
//个人信息
function dataGRXX() {
//[头像路径,积分,阅读量]
var arr = [];
$.ajax({
type: 'post',
async: false,
cache: false,
url: '/student/ajaxGetStudentExperienceScore.action',
traditional: true,
dataType: 'text',
success: function (data) {
arr = ["<%=student.getAvatarUrl() %>", data, '<%=student.getBookWords() %>字', "<%=student.getFullName() %>"];
},
error: function (data) {}
});
return arr;
}
//测评任务
function dataCPRW() {
//[课题,网址,预留编号]
var arr = eval('(' + $("#taskListStr").val() + ')');// [["《西游记》测评","/student/dareTask.action?id=",1],["《水浒传》测评","/student/dareTask.action?id=",2]];
return arr;
}
//阅读任务
function dataYDRW() {
//[课题,开始时间,结束时间,已读页数,总页数]
debugger;
var arr = eval('(' + $("#readingListStr").val() + ')');//[["《西游记》","2014-11-12","2014-11-30",33,100]];
return arr;
}
//参加测评
function canjiaCP(url) {
location.href = url;
}
//填写页码
function tianxueYM() {
location.href = '/student/toReadingList.action';
}
/***********************************点击flash功能菜单调用事件****************************************/
function btn_sjpc()//当flash点击书籍评测时调用该方法
{
//alert('书籍评测被点击了');
location.href = '/student/myTask.action';
}
function btn_grzl()//当flash点击个人资料时调用该方法
{
//alert('个人资料被点击了') ;
location.href = '/student/toProfile.action';
}
function btn_ydjd()//当flash点击阅读进度时调用该方法
{
//alert('阅读进度被点击了');
location.href = '/student/toReadingList.action';
}
function btn_tsg()//当flash点击图书馆时调用该方法
{
//alert('图书馆被点击了');
location.href = '/student/toLibrary.action';
}
function btn_lyck()//当flash点击录音查询时调用该方法
{
//alert('录音查询被点击了');
location.href = '/student/audio/r_doAudio.action';
}
function btn_jfjl()//当flash点击积分奖励时调用该方法
{
//alert('积分奖励被点击了');
location.href = '/student/toIntegral.action';
}
function btn_dsbj()//当flash点击读书笔记时调用该方法
{
//alert('读书笔记被点击了');
location.href = '/student/note/toNoteList.action';
}
function btn_tc()//当flash点击退出时调用该方法
{
location.href = '/student/logout.action';
}
function JFname1(st) {
if (st == "GR") {
//alert('jf1 GR');
}
else if (st == "NJ") {
//alert('jf1 NJ');
}
}
function JFname2(st) {
if (st == "GR") {
//location.href='http://www.baidu.com/';
}
else if (st == "NJ") {
//location.href='http://daohang.qq.com/';
}
}
function JFname3(st) {
if (st == "GR") {
//location.href='http://www.baidu.com/';
}
else if (st == "NJ") {
//location.href='http://daohang.qq.com/';
}
}
function JFname4(st) {
if (st == "GR") {
//location.href='http://www.baidu.com/';
}
else if (st == "NJ") {
//location.href='http://daohang.qq.com/';
}
}
function JFname5(st) {
if (st == "GR") {
//location.href='http://www.baidu.com/';
}
else if (st == "NJ") {
//location.href='http://daohang.qq.com/';
}
}
/**********************************点击阅读量名字文本事件******************************************/
function YDname1(st) {
if (st == "GR") {
//alert('YDname1 GR');
}
else if (st == "NJ") {
//alert('YDname1 NJ');
}
}
function YDname2(st) {
if (st == "GR") {
//location.href='http://www.baidu.com/';
}
else if (st == "NJ") {
//location.href='http://daohang.qq.com/';
}
}
function YDname3(st) {
if (st == "GR") {
//location.href='http://www.baidu.com/';
}
else if (st == "NJ") {
//location.href='http://daohang.qq.com/';
}
}
function YDname4(st) {
if (st == "GR") {
//location.href='http://www.baidu.com/';
}
else if (st == "NJ") {
//location.href='http://daohang.qq.com/';
}
}
function YDname5(st) {
if (st == "GR") {
//location.href='http://www.baidu.com/';
}
else if (st == "NJ") {
//location.href='http://daohang.qq.com/';
}
}
function ajax(m) {
//alert(m);
var urltmp = "/c_" + m + ".action";
//var urltmp = "/student/getinfo.jsp";
$.ajax({
type: "POST",
url: urltmp,
success: function (data) {
//alert('ajax=rrrrrrrrr==='+data);
return "";
}
});
}
</scr[/font]ipt>
</html>
[/font][img src=null/img]
最近遇到一个flash操作动画中的文字的问题,需要咨询下你,我的页面有一个flash的动画沾满了整个网页,flash动画中有许多文字和click事件,其中的阅读任务栏中的阅读进度中的数字原本是三位数字结果在网页中显示出来了两位数字
上面的图片是我需要修改bug位置的讲述 下面是我的代码 我(董朝亮)的 QQ:993623069 电话是:13414333221
非常期待得到你的解决
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib uri="us/ydjy.tld" prefix="ydjy" %>
<%@ page import="com.us.ydjy.support.uitls.SiteWebContext" %>
<%@ page import="com.us.ydjy.model.domain.system.User" %>
<%
SiteWebContext wc = new SiteWebContext(request, null);
User student=wc.getStudentUser();
%>
<html>
<head>
<title>阅读家园-学生端</title>
<meta http-equiv="description" content="阅读家园-学生端">
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<script src="<ydjy:staticSite></ydjy:staticSite>/templates/js/jquery-1.10.2.min.js"></script>
<script src="<ydjy:staticSite></ydjy:staticSite>/templates/js/wms.js"></script>
<style type="text/css">
<!--
body {
padding-top: 0px;
padding-bottom: 0px;
margin-top: 0px;
margin-bottom: 0px;
}
-->
</style>
<body style="background: url('<ydjy:staticSite></ydjy:staticSite>/templates/images/bg/bg.jpg') repeat-x;background-color: #0099ff;">
<input type="hidden" id='cjf' value="${cjf }"/>
<input type="hidden" id='gjf' value="${gjf }"/>
<input type="hidden" id="cydl" value="${cydl }"/>
<input type="hidden" id="gydl" value="${gydl }"/>
<input type="hidden" id="taskListStr" value="${taskListStr }"/>
<input type="hidden" id="readingListStr" value="${readingListStr }"/>
<div id="myId">
<table width="100%" height="100%" border="0" cellpadding="0" cellspacing="0">
<tr>
<td align="center">
<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://download.macromedia.com/pub/shockw
ave/cabs/flash/swflash.cab#version=6,0,29,0" id="flash" width="100%" height="100%">
<param name="movie" value="Main.swf"/>
<param name="quality" value="high"/>
<param name="wmode" value="transparent"/>
<embed src="Main.swf" wmode="transparent" quality="high" pluginspage="http://www.macromedia.com/go/getflashp
layer" type="application/x-shockwave-flash" name="flash" width="100%" height="1300"></embed>
</object>
</td>
</tr>
</table>
</div>
</body>
<script type="text/javaScript">
//onLoad="pageInit();"
/*var so = new SWFObject("Main.swf", "flash", "100%", "100%", "9","#ff00ff");
so.addParam("wmode", "transparent");
so.write("myId"); */
//js获取参数
function getQueryString(name) {
var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
var r = window.location.search.substr(1).match(reg);
if (r != null) return unescape(r[2]);
return null;
}
//http://localhost/student/toIndex.action?f=0
var _frame = getQueryString("f");//改变场景0:从头开始播放,1:跳到下一场景
if (_frame == null)
_frame = 0;
//加载flash完成后,flash调用此方法,用于控制是否显示动画
function pageInit() {
//thisMovie("flash").gotoStop(getFrame());
//alert("swf 加载完内容后")
thisMovie("flash").addMC(getFrame());
}
function setFrame(value) {
_frame = value;
}
function getFrame() {
return _frame;
}
function aa(value) {
alert(value);
}
function thisMovie(movieName) {
if (navigator.appName.indexOf("Microsoft") != -1) {
return window[movieName];
}
else {
return document[movieName];
}
}
//flash传参数value过来
function gotoJSfun(value) {
// alert(value)
if (value == "gerenBtnJF") {
sendToJiFen(dataGRJF());
}
else if (value == "nianjiBtnJF") {
sendToJiFen(dataNJJF());
}
else if (value == "gerenBtnYD") {
sendToYueDu(dataGRYD());
}
else if (value == "nianjiBtnYD") {
sendToYueDu(dataNJYD());
}
else if (value == "xiangce") {
sendToXiangCe(dataIMG());
}
else if (value == "gerenXX") {
sendToGeRen(dataGRXX());
}
else if (value == "cepingRW") {
sendToRenWu(dataCPRW());
}
else if (value == "yueduRW") {
sendToRenWu(dataYDRW());
}
}
//把积分的数据传给flash
function sendToJiFen(value) {
thisMovie("flash").getDataJF(value);
}
//把阅读量的数据传给flash
function sendToYueDu(value) {
thisMovie("flash").getDataYD(value);
}
//把相片的数据传给flash
function sendToXiangCe(value) {
// alert(value);
thisMovie("flash").getDataXC(value);
}
//把个人数据传给flash
function sendToGeRen(value) {
thisMovie("flash").getDataXX(value);
}
//把个人数据传给flash
function sendToRenWu(value) {
thisMovie("flash").getDataRW(value);
}
//个人积分
function dataGRJF() {
var arr = $('#cjf').val();
return eval('(' + arr + ')');
}
//年级积分
function dataNJJF() {
//var arr = [["钟子期1",95],["慕容紫英1",94],["林月如1",93],["戴安琪1",92],["谢泽鑫1",91]];
var arr = $('#gjf').val();
return eval('(' + arr + ')');
}
//个人阅读
function dataGRYD() {
//[姓名,阅读量]按阅读量排序从大到小
//var arr = [["钟子期2",90]];
var arr = $('#cydl').val();
return eval('(' + arr + ')');
}
//年级阅读
function dataNJYD() {
//[姓名,阅读量]按阅读量排序从大到小
//var arr = [["钟子期3",85],["慕容紫英3",84],["林月如3",83],["戴安琪3",82],["谢泽鑫3",81]];
var arr = $('#gydl').val();
return eval('(' + arr + ')');
}
//相册
function dataIMG() {
var arr = ["<ydjy:staticSite></ydjy:staticSite>/templates/images/login/ad01.jpg", "<ydjy:staticSite></ydjy:staticSite>/templates/images/login/ad02.jpg",
"<ydjy:staticSite></ydjy:staticSite>/templates/images/login/ad03.jpg", "<ydjy:staticSite></ydjy:staticSite>/templates/images/login/ad02.jpg"];
return arr;
}
//个人信息
function dataGRXX() {
//[头像路径,积分,阅读量]
var arr = [];
$.ajax({
type: 'post',
async: false,
cache: false,
url: '/student/ajaxGetStudentExperienceScore.action',
traditional: true,
dataType: 'text',
success: function (data) {
arr = ["<%=student.getAvatarUrl() %>", data, '<%=student.getBookWords() %>字', "<%=student.getFullName() %>"];
},
error: function (data) {}
});
return arr;
}
//测评任务
function dataCPRW() {
//[课题,网址,预留编号]
var arr = eval('(' + $("#taskListStr").val() + ')');// [["《西游记》测评","/student/dareTask.action?id=",1],["《水浒传》测评","/student/dareTask.action?id=",2]];
return arr;
}
//阅读任务
function dataYDRW() {
//[课题,开始时间,结束时间,已读页数,总页数]
debugger;
var arr = eval('(' + $("#readingListStr").val() + ')');//[["《西游记》","2014-11-12","2014-11-30",33,100]];
return arr;
}
//参加测评
function canjiaCP(url) {
location.href = url;
}
//填写页码
function tianxueYM() {
location.href = '/student/toReadingList.action';
}
/***********************************点击flash功能菜单调用事件****************************************/
function btn_sjpc()//当flash点击书籍评测时调用该方法
{
//alert('书籍评测被点击了');
location.href = '/student/myTask.action';
}
function btn_grzl()//当flash点击个人资料时调用该方法
{
//alert('个人资料被点击了') ;
location.href = '/student/toProfile.action';
}
function btn_ydjd()//当flash点击阅读进度时调用该方法
{
//alert('阅读进度被点击了');
location.href = '/student/toReadingList.action';
}
function btn_tsg()//当flash点击图书馆时调用该方法
{
//alert('图书馆被点击了');
location.href = '/student/toLibrary.action';
}
function btn_lyck()//当flash点击录音查询时调用该方法
{
//alert('录音查询被点击了');
location.href = '/student/audio/r_doAudio.action';
}
function btn_jfjl()//当flash点击积分奖励时调用该方法
{
//alert('积分奖励被点击了');
location.href = '/student/toIntegral.action';
}
function btn_dsbj()//当flash点击读书笔记时调用该方法
{
//alert('读书笔记被点击了');
location.href = '/student/note/toNoteList.action';
}
function btn_tc()//当flash点击退出时调用该方法
{
location.href = '/student/logout.action';
}
function JFname1(st) {
if (st == "GR") {
//alert('jf1 GR');
}
else if (st == "NJ") {
//alert('jf1 NJ');
}
}
function JFname2(st) {
if (st == "GR") {
//location.href='http://www.baidu.com/';
}
else if (st == "NJ") {
//location.href='http://daohang.qq.com/';
}
}
function JFname3(st) {
if (st == "GR") {
//location.href='http://www.baidu.com/';
}
else if (st == "NJ") {
//location.href='http://daohang.qq.com/';
}
}
function JFname4(st) {
if (st == "GR") {
//location.href='http://www.baidu.com/';
}
else if (st == "NJ") {
//location.href='http://daohang.qq.com/';
}
}
function JFname5(st) {
if (st == "GR") {
//location.href='http://www.baidu.com/';
}
else if (st == "NJ") {
//location.href='http://daohang.qq.com/';
}
}
/**********************************点击阅读量名字文本事件******************************************/
function YDname1(st) {
if (st == "GR") {
//alert('YDname1 GR');
}
else if (st == "NJ") {
//alert('YDname1 NJ');
}
}
function YDname2(st) {
if (st == "GR") {
//location.href='http://www.baidu.com/';
}
else if (st == "NJ") {
//location.href='http://daohang.qq.com/';
}
}
function YDname3(st) {
if (st == "GR") {
//location.href='http://www.baidu.com/';
}
else if (st == "NJ") {
//location.href='http://daohang.qq.com/';
}
}
function YDname4(st) {
if (st == "GR") {
//location.href='http://www.baidu.com/';
}
else if (st == "NJ") {
//location.href='http://daohang.qq.com/';
}
}
function YDname5(st) {
if (st == "GR") {
//location.href='http://www.baidu.com/';
}
else if (st == "NJ") {
//location.href='http://daohang.qq.com/';
}
}
function ajax(m) {
//alert(m);
var urltmp = "/c_" + m + ".action";
//var urltmp = "/student/getinfo.jsp";
$.ajax({
type: "POST",
url: urltmp,
success: function (data) {
//alert('ajax=rrrrrrrrr==='+data);
return "";
}
});
}
</scr[/font]ipt>
</html>
[/font][img src=null/img]