asp向flash传值

在做个动画,需要取动态的值大概是这样http://192.168.20.91/update/dtxyflash.swf?time=123需要取到当前页面地址的这个time... 在做个动画,需要取动态的值
大概是这样http://192.168.20.91/update/dtxyflash.swf?time=123
需要取到当前页面地址的这个time的值在flash里显示
展开
 我来答
月月亮的日记
2010-11-10 · TA获得超过4.1万个赞
知道大有可为答主
回答量:1332
采纳率:0%
帮助的人:2899万
展开全部
利用xml可以实现,把flash中图片的地址写入xml中,然后直接在xml中更改地址就可以了,迅雷主页中那个总在替换的flash就是这么做的,非常方便,但是你的flash基础和xml基础要非常扎实哦,
联创智恒
2010-10-30 · TA获得超过152个赞
知道答主
回答量:189
采纳率:0%
帮助的人:59.4万
展开全部
这样这样可以直接传递进去的,用SWF?这种方式只能参数预先传递,FLash在加载的时候获取,在运行中变量不能变化,用_root.参数名 来获取,
我建议最好用 flash 内部的程序请求ASP页面 获取这样操控更灵活

参考程序
onClipEvent (load)
{
movieWIDTH = Stage.width;
movieHEIGHT = Stage.height;
oldx = 1;
oldy = 1;
vx = (x - oldx) * 10;
vy = (y - oldy) * 10;
gravity = 0;
bounce = 9.000000E-001;
radius = this._width / 2;
ScaleRange = 200;
ScaleMin = 150;
Rotation = Math.random() * 4;
angle = 0;
angleRate = 1.000000E-001;
max = 12;
Sound1 = new Sound();
Sound1.attachSound("soccer_01");
Sound1.setVolume(10);
}

// [onClipEvent of sprite 31 in frame 1]
onClipEvent (enterFrame)
{
oldx = x;
oldy = y;
x = this._x;
y = this._y;
this._xscale = this._yscale = Math.abs(Math.sin(angle) * ScaleRange) + ScaleMin;
if (Math.abs(Math.sin(angle)) < 5.000000E-002)
{
Sound1.start(0, 1);
vx = vx * bounce;
vy = vy * bounce;
} // end if
angle = angle + angleRate;
if (dragging)
{
vx = (x - oldx) * 10;
vy = (y - oldy) * 10;
}
else
{
vy = vy + gravity;
x = x + int(vx) / 5;
y = y + vy / 10;
if (y < radius)
{
y = radius;
vx = vx * bounce;
vy = vy * -bounce;
} // end if
if (y > movieHEIGHT - radius)
{
y = movieHEIGHT - radius;
vx = vx * bounce;
vy = vy * -bounce;
Sound1.start(0, 1);
} // end if
if (x < radius)
{
x = radius;
vx = vx * -bounce;
vy = vy * bounce;
Sound1.start(0, 1);
} // end if
if (x > movieWIDTH - radius)
{
x = movieWIDTH - radius;
vx = vx * -bounce;
vy = vy * bounce;
Sound1.start(0, 1);
} // end if
with (this)
{
_x = x;
_y = y;
} // End of with
if (Math.abs(vx) > 1.000000E-001)
{
this.mcDetails._rotation = this.mcDetails._rotation + vx / 3;
} // end if
} // end else if
}

// [Action in Frame 1]
totalWidth = preloader_mc.percentbar_mc._width;
preloader_mc.percentbar_mc._width = 0;
preloader_mc.kPercent.text = "0%";
preloader_mc.onEnterFrame = function ()
{
var _loc4 = _root.getBytesLoaded();
var _loc3 = _root.getBytesTotal();
if (_loc3 != -1)
{
var _loc5 = Math.round(_loc4 / 1024);
var _loc6 = Math.round(_loc3 / 1024);
percent = Math.round(_loc5 / _loc6 * 100);
if (isNaN(percent))
{
this.kPercent.text = "0%";
}
else
{
this.kPercent.text = percent + "%";
this.percentbar_mc._width = totalWidth * (percent / 100);
} // end else if
if (_loc4 == _loc3 && _loc3 > 0)
{
delete this.onEnterFrame;
gotoAndPlay("start");
}
else if (_loc4 == -1)
{
failureReport_txt.text = "The file is not currently available. Please try again later. If you continue to receive this message, please contact the system administrator.";
} // end if
} // end else if
};
stop ();

// [Action in Frame 16]
function zhuan(key)
{
if (chek eq 0)
{
limit._visible = 1;
} // end if
if (chek eq 1)
{
_root.dart3.nextFrame();
_root.dart3.launching._y = -50;
var _loc8 = [1, 2, 3];
var _loc5 = _loc8.concat();
var _loc6 = key;
num = _loc5[_loc6];
trace ("随机背景" + _loc5[_loc6]);
_loc5.splice(_loc6, 1);
_root["bg" + num].board.gotoAndStop(rew);
_root["bg" + num].play();
initial_arr = [1, 2, 3, 4, 5, 6];
var _loc7 = initial_arr.concat();
_loc7.splice(chek - 1, 1);
var _loc4 = _loc7.concat();
for (var _loc2 = 0; _loc2 < 2; ++_loc2)
{
var _loc3 = random(_loc4.length);
_root["bg" + _loc5[_loc2]].board.gotoAndStop(_loc4[_loc3]);
trace ("bg" + _loc5[_loc2]);
trace ("随机抽出号码" + _loc4[_loc3]);
_loc4.splice(_loc3, 1);
} // end of for
} // end if
} // End of the function
myXML = new XML();
myXML.ignoreWhite = true;
myXML.onLoad = function (ok)
{
if (ok)
{
userid = myXML.firstChild.childNodes[0].firstChild;
chek = myXML.firstChild.childNodes[1].firstChild;
msg = myXML.firstChild.childNodes[2].firstChild;
rew = myXML.firstChild.childNodes[3].firstChild;
limit.msg_txt = msg;
}
else
{
trace ("error");
} // end else if
};
myXML.load("flash_come.jsp?" + Math.random() * 10000);
limit._visible = 0;
control._visible = 1;
control.useHandCursor = false;
btnreplay._visible = 0;
stop ();
已赞过 已踩过<
你对这个回答的评价是?
评论 收起
推荐律师服务: 若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询

为你推荐:

下载百度知道APP,抢鲜体验
使用百度知道APP,立即抢鲜体验。你的手机镜头里或许有别人想知道的答案。
扫描二维码下载
×

类别

我们会通过消息、邮箱等方式尽快将举报结果通知您。

说明

0/200

提交
取消

辅 助

模 式